/** * Sends a {@link ChartChangeEvent} to all registered listeners. * * @param event information about the event that triggered the * notification. */ protected void notifyListeners(OverlayChangeEvent event) { Object[] listeners = this.changeListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == OverlayChangeListener.class) { ((OverlayChangeListener) listeners[i + 1]).overlayChanged( event); } } }
/** * Handles a change to an overlay by repainting the panel. * * @param event * the event. * * @since 1.0.13 */ @Override public void overlayChanged(OverlayChangeEvent event) { repaint(); }
/** * Handles a change to an overlay by repainting the chart canvas. * * @param event the event. */ @Override public void overlayChanged(OverlayChangeEvent event) { draw(); }
/** * Sends a default {@link ChartChangeEvent} to all registered listeners. * <P> * This method is for convenience only. */ public void fireOverlayChanged() { OverlayChangeEvent event = new OverlayChangeEvent(this); notifyListeners(event); }
/** * Handles a change to an overlay by repainting the panel. * * @param event the event. * * @since 1.0.13 */ @Override public void overlayChanged(OverlayChangeEvent event) { repaint(); }
/** * Handles a change to an overlay by repainting the panel. * * @param event the event. * * @since 1.0.13 */ public void overlayChanged(OverlayChangeEvent event) { repaint(); }