net.thefrontside.freestyle.event
Class KeyEvent

java.lang.Object
  extended bynet.thefrontside.freestyle.event.Event
      extended bynet.thefrontside.freestyle.event.KeyEvent

public class KeyEvent
extends Event

A Message object which is passed to a registered KeyEventHandler, when a user types a key on the keyboard.

for more information on how key events are generated, see http://www.thefrontside.net/freestyle/architecture/focus

See Also:
KeyEventHandler

Constructor Summary
KeyEvent(java.lang.String type, Component target, int keyCode, boolean isShiftDown, boolean isCtrlDown)
          Create A KeyEvent with the given parameters.
 
Method Summary
 int getKeyCode()
          Gets the unicode keyCode for this event.
 boolean isCtrlDown()
          Indicates whether the CTRL key was depressed when this KeyEvent occured
 boolean isShiftDown()
          Indicates whether the SHIFT key was depressed when this KeyEvent occured
 
Methods inherited from class net.thefrontside.freestyle.event.Event
activate, consume, getTarget, getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyEvent

public KeyEvent(java.lang.String type,
                Component target,
                int keyCode,
                boolean isShiftDown,
                boolean isCtrlDown)
Create A KeyEvent with the given parameters. Event objects are created automatically by the Freestyle runtime in response to user interface events, so there should be no need to instantiate KeyEvent objects manually.

Method Detail

isCtrlDown

public boolean isCtrlDown()
Indicates whether the CTRL key was depressed when this KeyEvent occured

Returns:
true if the CTRL key was depressed

isShiftDown

public boolean isShiftDown()
Indicates whether the SHIFT key was depressed when this KeyEvent occured

Returns:
true if the SHIFT key was depressed

getKeyCode

public int getKeyCode()
Gets the unicode keyCode for this event.

Returns:
an int corresponding to the unicode keyCode of the key that generated this event.

Welcome to the Millenium!!!!!

© 2006 The Front Side. All rights reserved.