All pastes #752113 Raw Edit

Someone

public java v1 · immutable
#752113 ·published 2007-10-28 01:36 UTC
rendered paste body
    protected void fireCreationPerformed(JTextFieldWithCompletionEvent event) {        // Guaranteed to return a non-null array        Object[] listeners = listenerList.getListenerList();        JTextFieldWithCompletionEvent 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]==JTextFieldWithCompletionListener.class) {                // Lazily create the event:                if (e == null)                      e = new JTextFieldWithCompletionEvent(JTextFieldWithCompletion.this);                ((JTextFieldWithCompletionListener)listeners[i+1]).creationWanted(e);            }                  }    }