/** * Notifies all registered listeners that the chart title has changed in some way. * * @param event an object that contains information about the change to the title. */ protected void notifyListeners(TitleChangeEvent event) { if (this.notify) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == TitleChangeListener.class) { ((TitleChangeListener) listeners[i + 1]).titleChanged(event); } } } }
/** * Notifies all registered listeners that the chart title has changed in * some way. * * @param event an object that contains information about the change to * the title. */ protected void notifyListeners(TitleChangeEvent event) { if (this.notify) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == TitleChangeListener.class) { ((TitleChangeListener) listeners[i + 1]).titleChanged( event); } } } }
/** * Registers an object for notification of changes to the title. * * @param listener the object that is being registered. */ public void addChangeListener(TitleChangeListener listener) { this.listenerList.add(TitleChangeListener.class, listener); }
/** * Unregisters an object for notification of changes to the chart title. * * @param listener the object that is being unregistered. */ public void removeChangeListener(TitleChangeListener listener) { this.listenerList.remove(TitleChangeListener.class, listener); }