java::awt::event::ActionSource Class Reference

Inheritance diagram for java::awt::event::ActionSource:

Inheritance graph
java::awt::Buttonjava::awt::MenuItemjava::util::EventSourcejava::lang::Interfacejava::lang::ScopeAdapterjava::lang::Objectjava::lang::Syncjava::lang::Lockjava::awt::CheckboxMenuItemjava::awt::Menu
[legend]
Collaboration diagram for java::awt::event::ActionSource:

Collaboration graph
java::util::EventSourcejava::lang::Interfacejava::lang::ScopeAdapterjava::lang::Comparablejava::util::Collectionjava::lang::Objectjava::lang::ObjectRefjava::lang::Syncjava::lang::Lockjava::util::LinkedListjava::util::AbstractSequentialListjava::util::AbstractListjava::util::AbstractCollectionjava::util::List
[legend]

List of all members.


Detailed Description

The source abstract object for action event sources.

The class that is interested in broadcast an action event extends this object.

See also:
ActionEvent

ActionListener

Author:
Yuh-Jye Chang
Version:
1.0 07/19/04

Public Member Functions

virtual String getActionCommand () const =0
virtual void addActionListener (const Ref< ActionListener > l)
 Adds a listener to receive action events.
virtual void removeActionListener (const Ref< ActionListener > l)
 Remove an action listener.
virtual jboolean hasActionListeners () const
 Indicate there are listeners registered.
virtual Ref< ListgetActionListeners () const
 Returns a list of all the action listeners registered.
virtual void processActionEvent (const ActionEvent &e)
 Brodcast the event to all the registered action listeners.

Protected Attributes

LinkedList listeners
 REGISTER_MEMBERS

Member Function Documentation

virtual String java::awt::event::ActionSource::getActionCommand (  )  const [pure virtual]

Implemented in java::awt::Button, and java::awt::MenuItem.

virtual void java::awt::event::ActionSource::addActionListener ( const Ref< ActionListener l  )  [virtual]

Adds a listener to receive action events.

Parameters:
l the listener to receive events
See also:
ActionEvent

virtual void java::awt::event::ActionSource::removeActionListener ( const Ref< ActionListener l  )  [virtual]

Remove an action listener.

Parameters:
l the listener being removed
See also:
ActionEvent

virtual jboolean java::awt::event::ActionSource::hasActionListeners (  )  const [virtual]

Indicate there are listeners registered.

virtual Ref<List> java::awt::event::ActionSource::getActionListeners (  )  const [virtual]

Returns a list of all the action listeners registered.

Returns:
all ActionListeners or an empty list if no action listeners are currently registered
See also:
addActionListener

removeActionListener

virtual void java::awt::event::ActionSource::processActionEvent ( const ActionEvent e  )  [virtual]

Brodcast the event to all the registered action listeners.

Parameters:
e the Action Event being brocasted
See also:
ActionEvent


Member Data Documentation

LinkedList java::awt::event::ActionSource::listeners [protected]

java::awt::event::ActionSource::REGISTER_MEMBERS [protected]

Reimplemented from java::lang::Sync.

Reimplemented in java::awt::Button.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:13 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3