A set of ActionListeners. More...
Inherits MessageListener.
Public Member Functions | |
| ActionListenerList () throw () | |
| Creates an empty list. | |
| ~ActionListenerList () throw () | |
| Destructor. | |
| void | addActionListener (ActionListener *listener) throw () |
| Adds a listener to the list. | |
| void | removeActionListener (ActionListener *listener) throw () |
| Removes a listener from the list. | |
| void | removeAllActionListeners () throw () |
| Removes all listeners from the list. | |
| void | sendActionMessage (const String &message) const |
| Broadcasts a message to all the registered listeners. | |
| void | handleMessage (const Message &) |
A set of ActionListeners.
Listeners can be added and removed from the list, and messages can be broadcast to all the listeners.
| ActionListenerList::ActionListenerList | ( | ) | throw () |
Creates an empty list.
| ActionListenerList::~ActionListenerList | ( | ) | throw () |
Destructor.
| void ActionListenerList::addActionListener | ( | ActionListener * | listener | ) | throw () |
Adds a listener to the list.
(Trying to add a listener that's already on the list will have no effect).
| void ActionListenerList::removeActionListener | ( | ActionListener * | listener | ) | throw () |
Removes a listener from the list.
If the listener isn't on the list, this won't have any effect.
| void ActionListenerList::removeAllActionListeners | ( | ) | throw () |
Removes all listeners from the list.
| void ActionListenerList::sendActionMessage | ( | const String & | message | ) | const |
Broadcasts a message to all the registered listeners.
This sends the message asynchronously.
If a listener is on the list when this method is called but is removed from the list before the message arrives, it won't receive the message. Similarly listeners that are added to the list after the message is sent but before it arrives won't get the message either.
| void ActionListenerList::handleMessage | ( | const Message & | ) | [virtual] |
For internal use only.
Implements MessageListener.
1.6.3