Пример #1
0
 protected void fireEditingStopped() {
   Object[] listeners = listenerList.getListenerList();
   // Process the listeners last to first, notifying
   // those that are interested in this event
   for (int i = listeners.length - 2; i >= 0; i -= 2) {
     if (listeners[i] == CellEditorListener.class) {
       // Lazily create the event:
       if (changeEvent == null) changeEvent = new ChangeEvent(this);
       ((CellEditorListener) listeners[i + 1]).editingStopped(changeEvent);
     }
   }
 }
Пример #2
0
 /*
  * Notify all listeners that have registered interest for
  * notification on this event type.  The event instance
  * is lazily created using the parameters passed into
  * the fire method.
  * @see EventListenerList
  */
 protected void fireTreeStructureChanged(
     Object source, Object[] path, int[] childIndices, Object[] children) {
   // Guaranteed to return a non-null array
   Object[] listeners = listenerList.getListenerList();
   TreeModelEvent e = null;
   // Process the listeners last to first, notifying
   // those that are interested in this event
   for (int i = listeners.length - 2; i >= 0; i -= 2) {
     if (listeners[i] == TreeModelListener.class) {
       // Lazily create the event:
       if (e == null)
         e =
             new TreeModelEvent(
                 source, path,
                 childIndices, children);
       ((TreeModelListener) listeners[i + 1]).treeStructureChanged(e);
     }
   }
 }
Пример #3
0
 public void removeTreeModelListener(TreeModelListener l) {
   listenerList.remove(TreeModelListener.class, l);
 }
Пример #4
0
 public void addTreeModelListener(TreeModelListener l) {
   listenerList.add(TreeModelListener.class, l);
 }
Пример #5
0
 public void addTreeModelListener(TreeModelListener l) {
   listeners.add(TreeModelListener.class, l);
   System.out.println(TreeModelListener.class);
 }
Пример #6
0
 public void removeCellEditorListener(CellEditorListener l) {
   listenerList.remove(CellEditorListener.class, l);
 }
Пример #7
0
 public void addCellEditorListener(CellEditorListener l) {
   listenerList.add(CellEditorListener.class, l);
 }