/** * Sends a {@link ChartProgressEvent} to all registered listeners. * * @param event information about the event that triggered the notification. */ protected void notifyListeners(ChartProgressEvent event) { Object[] listeners = this.progressListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartProgressListener.class) { ((ChartProgressListener) listeners[i + 1]).chartProgress(event); } } }
/** * Sends a {@link ChartProgressEvent} to all registered listeners. * * @param event information about the event that triggered the * notification. */ protected void notifyListeners(ChartProgressEvent event) { Object[] listeners = this.progressListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartProgressListener.class) { ((ChartProgressListener) listeners[i + 1]).chartProgress(event); } } }
/** * Registers an object for notification of progress events relating to the chart. * * @param listener the object being registered. */ public void addProgressListener(ChartProgressListener listener) { this.progressListeners.add(ChartProgressListener.class, listener); }
/** * Deregisters an object for notification of changes to the chart. * * @param listener the object being deregistered. */ public void removeProgressListener(ChartProgressListener listener) { this.progressListeners.remove(ChartProgressListener.class, listener); }
/** * Registers an object for notification of progress events relating to the * chart. * * @param listener the object being registered. * * @see #removeProgressListener(ChartProgressListener) */ public void addProgressListener(ChartProgressListener listener) { this.progressListeners.add(ChartProgressListener.class, listener); }
/** * Deregisters an object for notification of changes to the chart. * * @param listener the object being deregistered. * * @see #addProgressListener(ChartProgressListener) */ public void removeProgressListener(ChartProgressListener listener) { this.progressListeners.remove(ChartProgressListener.class, listener); }