Package org.jcsp.awt
Class KeyEventHandler
- java.lang.Object
-
- org.jcsp.awt.KeyEventHandler
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.util.EventListener
class KeyEventHandler extends java.lang.Object implements java.awt.event.KeyListener
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelOutputeventThe Channel action event notifications are sent down.
-
Constructor Summary
Constructors Constructor Description KeyEventHandler(ChannelOutput event)constructs a new KeyEventHandler with the specified output Channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidkeyPressed(java.awt.event.KeyEvent e)Invoked when the Component the event handler is listening to has a key pressed.voidkeyReleased(java.awt.event.KeyEvent e)Invoked when the Component the event handler is listening to has a key released.voidkeyTyped(java.awt.event.KeyEvent e)Invoked when the Component the event handler is listening to has a key pressed and then released.
-
-
-
Field Detail
-
event
private ChannelOutput event
The Channel action event notifications are sent down.
-
-
Constructor Detail
-
KeyEventHandler
public KeyEventHandler(ChannelOutput event)
constructs a new KeyEventHandler with the specified output Channel.- Parameters:
event- The Channel to send the event notification down
-
-
Method Detail
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent e)
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 interfacejava.awt.event.KeyListener- Parameters:
e- The parameters associated with this event
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
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 interfacejava.awt.event.KeyListener- Parameters:
e- The parameters associated with this event
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent e)
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 interfacejava.awt.event.KeyListener- Parameters:
e- The parameters associated with this event
-
-