/** * Receives notification of a change to an {@link Annotation} added to * this plot. * * @param event information about the event (not used here). * * @since 1.0.14 */ @Override public void annotationChanged(AnnotationChangeEvent event) { if (getParent() != null) { getParent().annotationChanged(event); } else { PlotChangeEvent e = new PlotChangeEvent(this); notifyListeners(e); } }
/** * Notifies all registered listeners that the annotation has changed. * * @param event contains information about the event that triggered the * notification. * * @see #addChangeListener(AnnotationChangeListener) * @see #removeChangeListener(AnnotationChangeListener) */ protected void notifyListeners(AnnotationChangeEvent event) { Object[] listeners = this.listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == AnnotationChangeListener.class) { ((AnnotationChangeListener) listeners[i + 1]).annotationChanged( event); } } }
/** * Receives notification of a change to an {@link Annotation} added to * this plot. * * @param event information about the event (not used here). * * @since 1.0.14 */ public void annotationChanged(AnnotationChangeEvent event) { if (getParent() != null) { getParent().annotationChanged(event); } else { PlotChangeEvent e = new PlotChangeEvent(this); notifyListeners(e); } }
/** * Notifies all registered listeners that the annotation has changed. * * @see #addChangeListener(AnnotationChangeListener) */ protected void fireAnnotationChanged() { if (notify) { notifyListeners(new AnnotationChangeEvent(this, this)); } }