org.crsh.keyboard
Enum KeyType

java.lang.Object
  extended by java.lang.Enum<KeyType>
      extended by org.crsh.keyboard.KeyType
All Implemented Interfaces:
Serializable, Comparable<KeyType>

public enum KeyType
extends Enum<KeyType>

The type of a key.

Author:
Julien Viet

Enum Constant Summary
BACKSPACE
          Delete left char.
CHARACTER
          The key is a character and the value is the actual char code point.
DELETE
          Delete right char.
DOWN
          Down arrow .
ENTER
          Enter.
LEFT
          Left arrow .
RIGHT
          Right arrow .
UNKNOWN
          Anything not categorizable.
UP
          Up arrow .
 
Method Summary
static KeyType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static KeyType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CHARACTER

public static final KeyType CHARACTER
The key is a character and the value is the actual char code point.


UP

public static final KeyType UP
Up arrow .


DOWN

public static final KeyType DOWN
Down arrow .


LEFT

public static final KeyType LEFT
Left arrow .


RIGHT

public static final KeyType RIGHT
Right arrow .


DELETE

public static final KeyType DELETE
Delete right char.


BACKSPACE

public static final KeyType BACKSPACE
Delete left char.


ENTER

public static final KeyType ENTER
Enter.


UNKNOWN

public static final KeyType UNKNOWN
Anything not categorizable.

Method Detail

values

public static KeyType[] 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 (KeyType c : KeyType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static KeyType valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2015 eXo Platform SAS. All Rights Reserved.