コード例 #1
0
ファイル: JEditTextArea.java プロジェクト: zeph/grinder
 protected void fireCaretEvent() {
   Object[] listeners = listenerList.getListenerList();
   for (int i = listeners.length - 2; i >= 0; i--) {
     if (listeners[i] == CaretListener.class) {
       ((CaretListener) listeners[i + 1]).caretUpdate(caretEvent);
     }
   }
 }
コード例 #2
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);
     }
   }
 }
コード例 #3
0
ファイル: TLangTextField.java プロジェクト: ambro2/popeye
 protected void fireFocusGained(boolean temporary) {
   FocusEvent foo = new FocusEvent(this, this.getID(), temporary);
   // Guaranteed to return a non-null array
   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] == FocusListener.class) {
       ((FocusListener) listeners[i + 1]).focusGained(foo);
     }
   }
 }
コード例 #4
0
 /**
  * Notifies all listeners that have registered interest for notification on this event type. The
  * event instance is created lazily.
  *
  * @see EventListenerList
  */
 protected void fireStateChanged() {
   // Guaranteed to return a non-null array
   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] == ChangeListener.class) {
       // Lazily create the event:
       if (changeEvent == null) changeEvent = new ChangeEvent(this);
       ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);
     }
   }
 }
コード例 #5
0
 /**
  * Notifies all listeners that have registered interest for notification on this event type.
  *
  * @param e the <code>ActionEvent</code> to deliver to listeners
  * @see EventListenerList
  */
 protected void fireActionPerformed(ActionEvent e) {
   // Guaranteed to return a non-null array
   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] == ActionListener.class) {
       // Lazily create the event:
       // if (changeEvent == null)
       // changeEvent = new ChangeEvent(this);
       ((ActionListener) listeners[i + 1]).actionPerformed(e);
     }
   }
 }
コード例 #6
0
ファイル: TLangTextField.java プロジェクト: ambro2/popeye
  protected void fireActionPerformed(String command) {
    ActionEvent foo = new ActionEvent(this, this.getID(), command);

    // Guaranteed to return a non-null array
    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] == ActionListener.class) {
        ((ActionListener) listeners[i + 1]).actionPerformed(foo);
      }
    }
  }