Package org.apache.pivot.wtk
Enum Keyboard.KeyLocation
- java.lang.Object
-
- java.lang.Enum<Keyboard.KeyLocation>
-
- org.apache.pivot.wtk.Keyboard.KeyLocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Keyboard.KeyLocation>
- Enclosing class:
- Keyboard
public static enum Keyboard.KeyLocation extends java.lang.Enum<Keyboard.KeyLocation>
Enumeration representing key locations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Keyboard.KeyLocation
fromAWTLocation(int awtKeyLocation)
Translate the given native AWT key location constant into one of our values.static Keyboard.KeyLocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Keyboard.KeyLocation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STANDARD
public static final Keyboard.KeyLocation STANDARD
The "standard" location; in the regular key location.
-
LEFT
public static final Keyboard.KeyLocation LEFT
On the left side of the keyboard.
-
RIGHT
public static final Keyboard.KeyLocation RIGHT
On the right side of the keyboard.
-
KEYPAD
public static final Keyboard.KeyLocation KEYPAD
On the numeric keypad.
-
-
Method Detail
-
values
public static Keyboard.KeyLocation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Keyboard.KeyLocation c : Keyboard.KeyLocation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Keyboard.KeyLocation valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
fromAWTLocation
public static Keyboard.KeyLocation fromAWTLocation(int awtKeyLocation)
Translate the given native AWT key location constant into one of our values.- Parameters:
awtKeyLocation
- The native location.- Returns:
- The corresponding one of our values.
-
-