org.apache.pivot.wtk
Class Keyboard

java.lang.Object
  extended by org.apache.pivot.wtk.Keyboard

public final class Keyboard
extends Object

Class representing the system keyboard.


Nested Class Summary
static class Keyboard.KeyCode
          Contains a set of key code constants that are common to all locales.
static class Keyboard.KeyLocation
          Enumeration representing key locations.
static class Keyboard.KeyStroke
          Represents a keystroke, a combination of a keycode and modifier flags.
static class Keyboard.Modifier
          Enumeration representing keyboard modifiers.
 
Constructor Summary
Keyboard()
           
 
Method Summary
static DropAction getDropAction()
          Returns the current drop action.
static int getModifiers()
          Returns a bitfield representing the keyboard modifiers that are currently pressed.
static boolean isPressed(Keyboard.Modifier modifier)
          Tests the pressed state of a modifier.
protected static void setModifiers(int modifiers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Keyboard

public Keyboard()
Method Detail

getModifiers

public static int getModifiers()
Returns a bitfield representing the keyboard modifiers that are currently pressed.


setModifiers

protected static void setModifiers(int modifiers)

isPressed

public static boolean isPressed(Keyboard.Modifier modifier)
Tests the pressed state of a modifier.

Parameters:
modifier -
Returns:
true if the modifier is pressed; false, otherwise.

getDropAction

public static DropAction getDropAction()
Returns the current drop action.

Returns:
The drop action corresponding to the currently pressed modifier keys, or null if no modifiers are pressed.