/** * 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); } } }
/** * Registers an object for notification of changes to the annotation. * * @param listener the object to register. */ public void addChangeListener(AnnotationChangeListener listener);
/** * Deregisters an object for notification of changes to the annotation. * * @param listener the object to deregister. */ public void removeChangeListener(AnnotationChangeListener listener);
/** * Registers an object to receive notification of changes to the * annotation. * * @param listener the object to register. * * @see #removeChangeListener(AnnotationChangeListener) */ @Override public void addChangeListener(AnnotationChangeListener listener) { this.listenerList.add(AnnotationChangeListener.class, listener); }
/** * Deregisters an object so that it no longer receives notification of * changes to the annotation. * * @param listener the object to deregister. * * @see #addChangeListener(AnnotationChangeListener) */ @Override public void removeChangeListener(AnnotationChangeListener listener) { this.listenerList.remove(AnnotationChangeListener.class, listener); }
/** * Registers an object to receive notification of changes to the * annotation. * * @param listener the object to register. * * @see #removeChangeListener(AnnotationChangeListener) */ public void addChangeListener(AnnotationChangeListener listener) { this.listenerList.add(AnnotationChangeListener.class, listener); }
/** * Deregisters an object so that it no longer receives notification of * changes to the annotation. * * @param listener the object to deregister. * * @see #addChangeListener(AnnotationChangeListener) */ public void removeChangeListener(AnnotationChangeListener listener) { this.listenerList.remove(AnnotationChangeListener.class, listener); }