java::awt::event::KeySource Class Reference

Inheritance diagram for java::awt::event::KeySource:

Inheritance graph
java::awt::Componentjava::util::EventSourcejava::lang::Interfacejava::lang::ScopeAdapterjava::lang::Objectjava::lang::Syncjava::lang::Lockjava::awt::Buttonjava::awt::Canvasjava::awt::Checkboxjava::awt::Choicejava::awt::Containerjava::awt::Labeljava::awt::ListBoxjava::awt::Scrollbarjava::awt::TextComponentjava::awt::Paneljava::awt::Windowjava::awt::Dialogjava::awt::Framejava::awt::TextAreajava::awt::TextField
[legend]
Collaboration diagram for java::awt::event::KeySource:

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 key event sources.

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

See also:
KeyEvent

KeyListener

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

Public Member Functions

virtual void addKeyListener (const Ref< KeyListener > l)
 Adds a listener to receive key events.
virtual void removeKeyListener (const Ref< KeyListener > l)
 Remove an key listener.
virtual jboolean hasKeyListeners () const
 Indicate there are listeners registered.
virtual Ref< ListgetKeyListeners () const
 Returns a list of all the key listeners registered.
virtual void processKeyEvent (const KeyEvent &e)
 Brodcast the event to all the registered key listeners.

Protected Attributes

LinkedList listeners
 REGISTER_MEMBERS

Member Function Documentation

virtual void java::awt::event::KeySource::addKeyListener ( const Ref< KeyListener l  )  [virtual]

Adds a listener to receive key events.

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

virtual void java::awt::event::KeySource::removeKeyListener ( const Ref< KeyListener l  )  [virtual]

Remove an key listener.

Parameters:
l the listener being removed
See also:
KeyEvent

virtual jboolean java::awt::event::KeySource::hasKeyListeners (  )  const [virtual]

Indicate there are listeners registered.

virtual Ref<List> java::awt::event::KeySource::getKeyListeners (  )  const [virtual]

Returns a list of all the key listeners registered.

Returns:
all KeyListeners or an empty list if no key listeners are currently registered
See also:
addKeyListener

removeKeyListener

virtual void java::awt::event::KeySource::processKeyEvent ( const KeyEvent e  )  [virtual]

Brodcast the event to all the registered key listeners.

Parameters:
e the Key Event being brocasted
See also:
KeyEvent


Member Data Documentation

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

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

Reimplemented from java::lang::Sync.

Reimplemented in java::awt::Button, java::awt::Canvas, java::awt::Checkbox, java::awt::Choice, java::awt::Dialog, java::awt::Frame, java::awt::Label, java::awt::ListBox, java::awt::Panel, java::awt::TextArea, and java::awt::TextField.


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