Class KeyEventHandler
java.lang.Object
org.jcsp.awt.KeyEventHandler
- All Implemented Interfaces:
KeyListener, EventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChannelOutputThe Channel action event notifications are sent down. -
Constructor Summary
ConstructorsConstructorDescriptionKeyEventHandler(ChannelOutput event) constructs a new KeyEventHandler with the specified output Channel. -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when the Component the event handler is listening to has a key pressed.voidInvoked when the Component the event handler is listening to has a key released.voidInvoked when the Component the event handler is listening to has a key pressed and then released.
-
Field Details
-
event
The Channel action event notifications are sent down.
-
-
Constructor Details
-
KeyEventHandler
constructs a new KeyEventHandler with the specified output Channel.- Parameters:
event- The Channel to send the event notification down
-
-
Method Details
-
keyTyped
Invoked when the Component the event handler is listening to has a key pressed and then released. Notifies the event process that a KeyEvent has occurred by sending the KeyEvent Object. Some notifications will be lost so there are no guarantees that all events generated will be processed.- Specified by:
keyTypedin interfaceKeyListener- Parameters:
e- The parameters associated with this event
-
keyPressed
Invoked when the Component the event handler is listening to has a key pressed. Notifies the event process that a KeyEvent has occurred by sending the KeyEvent Object. Some notifications will be lost so there are no guarantees that all events generated will be processed.- Specified by:
keyPressedin interfaceKeyListener- Parameters:
e- The parameters associated with this event
-
keyReleased
Invoked when the Component the event handler is listening to has a key released. Notifies the event process that a KeyEvent has occurred by sending the KeyEvent Object. Some notifications will be lost so there are no guarantees that all events generated will be processed.- Specified by:
keyReleasedin interfaceKeyListener- Parameters:
e- The parameters associated with this event
-