Package org.jcsp.awt

Class KeyEventHandler

java.lang.Object
org.jcsp.awt.KeyEventHandler
All Implemented Interfaces:
KeyListener, EventListener

class KeyEventHandler extends Object implements KeyListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The Channel action event notifications are sent down.
  • Constructor Summary

    Constructors
    Constructor
    Description
    constructs a new KeyEventHandler with the specified output Channel.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • event

      private ChannelOutput event
      The Channel action event notifications are sent down.
  • Constructor Details

    • 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 Details

    • keyTyped

      public void keyTyped(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:
      keyTyped in interface KeyListener
      Parameters:
      e - The parameters associated with this event
    • keyPressed

      public void keyPressed(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:
      keyPressed in interface KeyListener
      Parameters:
      e - The parameters associated with this event
    • keyReleased

      public void keyReleased(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:
      keyReleased in interface KeyListener
      Parameters:
      e - The parameters associated with this event