Package org.jcsp.awt
Class KeyEventHandler
java.lang.Object
org.jcsp.awt.KeyEventHandler
- All Implemented Interfaces:
KeyListener
,EventListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChannelOutput
The 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 TypeMethodDescriptionvoid
Invoked when the Component the event handler is listening to has a key pressed.void
Invoked when the Component the event handler is listening to has a key released.void
Invoked 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:
keyTyped
in 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:
keyPressed
in 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:
keyReleased
in interfaceKeyListener
- Parameters:
e
- The parameters associated with this event
-