Package org.jcsp.awt

Class 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 ChannelOutput event
      The 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
      void keyPressed​(java.awt.event.KeyEvent e)
      Invoked when the Component the event handler is listening to has a key pressed.
      void keyReleased​(java.awt.event.KeyEvent e)
      Invoked when the Component the event handler is listening to has a key released.
      void keyTyped​(java.awt.event.KeyEvent e)
      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 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:
        keyTyped in interface java.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:
        keyPressed in interface java.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:
        keyReleased in interface java.awt.event.KeyListener
        Parameters:
        e - The parameters associated with this event