コード例 #1
0
 protected void fireViewDestroyingEvent(DrawingView view) {
   final Object[] listeners = listenerList.getListenerList();
   ViewChangeListener vsl = null;
   for (int i = listeners.length - 2; i >= 0; i -= 2) {
     if (listeners[i] == ViewChangeListener.class) {
       vsl = (ViewChangeListener) listeners[i + 1];
       vsl.viewDestroying(view);
     }
   }
 }
コード例 #2
0
 /**
  * An appropriate event is triggered and all registered observers are notified if the drawing view
  * has been changed, e.g. by switching between several internal frames. This method is usually not
  * needed in SDI environments.
  */
 protected void fireViewSelectionChangedEvent(DrawingView oldView, DrawingView newView) {
   final Object[] listeners = listenerList.getListenerList();
   ViewChangeListener vsl = null;
   for (int i = listeners.length - 2; i >= 0; i -= 2) {
     if (listeners[i] == ViewChangeListener.class) {
       vsl = (ViewChangeListener) listeners[i + 1];
       vsl.viewSelectionChanged(oldView, newView);
     }
   }
 }