ActionListenerList Class Reference

A set of ActionListeners. More...

Inherits MessageListener.

List of all members.

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 &)

Detailed Description

A set of ActionListeners.

Listeners can be added and removed from the list, and messages can be broadcast to all the listeners.

See also:
ActionListener, ActionBroadcaster

Constructor & Destructor Documentation

ActionListenerList::ActionListenerList (  )  throw ()

Creates an empty list.

ActionListenerList::~ActionListenerList (  )  throw ()

Destructor.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Apr 26 11:42:09 2010 for JUCE by  doxygen 1.6.3