1 package be
.nikiroo
.utils
.ui
;
3 import java
.awt
.event
.ActionListener
;
6 * The default {@link ActionListener} add/remove/fire methods.
10 public interface ListenerItem
{
12 * Check that this {@link ListenerItem} currently has
13 * {@link ActionListener}s that listen on it.
15 * @return TRUE if it has
17 public boolean hasListeners();
20 * Check how many events are currently waiting for an
21 * {@link ActionListener}.
23 * @return the number of waiting events (can be 0)
25 public int getWaitingEventCount();
28 * Adds the specified action listener to receive action events from this
29 * {@link ListenerItem}.
32 * the action listener to be added
34 public void addActionListener(ActionListener listener
);
37 * Removes the specified action listener so that it no longer receives
38 * action events from this {@link ListenerItem}.
41 * the action listener to be removed
43 public void removeActionListener(ActionListener listener
);
46 * Notify the listeners of an action.
48 * @param listenerCommand
49 * A string that may specify a command (possibly one of several)
50 * associated with the event
52 public void fireActionPerformed(String listenerCommand
);