org.jagatoo.input.events
Class KeyStateEvent

java.lang.Object
  extended by org.jagatoo.input.events.InputEvent
      extended by org.jagatoo.input.events.KeyboardEvent
          extended by org.jagatoo.input.events.KeyStateEvent
Direct Known Subclasses:
KeyPressedEvent, KeyReleasedEvent

public abstract class KeyStateEvent
extends KeyboardEvent

This type of eevnt is fired when a key was pressed or released.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jagatoo.input.events.KeyboardEvent
KeyboardEvent.SubType
 
Nested classes/interfaces inherited from class org.jagatoo.input.events.InputEvent
InputEvent.Type
 
Constructor Summary
protected KeyStateEvent(KeyboardEvent.SubType subType)
          Creates a new KeyboardEvent with the default settings
protected KeyStateEvent(Keyboard keyboard, KeyboardEvent.SubType subType, Key key, int modifierMask, long when, long lastWhen)
          Initialises the new KeyboardEvent using the given values.
 
Method Summary
 boolean getKeyBooleanState()
           
 InputState getKeyState()
           
 
Methods inherited from class org.jagatoo.input.events.KeyboardEvent
getKey, getKeyboard, getKeyCode, getModifierMask, getSubType, set, toString
 
Methods inherited from class org.jagatoo.input.events.InputEvent
getComponent, getLastWhen, getType, getWhen, set, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyStateEvent

protected KeyStateEvent(KeyboardEvent.SubType subType)
Creates a new KeyboardEvent with the default settings


KeyStateEvent

protected KeyStateEvent(Keyboard keyboard,
                        KeyboardEvent.SubType subType,
                        Key key,
                        int modifierMask,
                        long when,
                        long lastWhen)
Initialises the new KeyboardEvent using the given values.

Parameters:
keyCode - the key-code whose state changed
when - the timestamp of the KeyboardEvent
Method Detail

getKeyState

public final InputState getKeyState()

getKeyBooleanState

public final boolean getKeyBooleanState()