com.flagstone.transform.button
Enum ButtonKey

java.lang.Object
  extended by java.lang.Enum<ButtonKey>
      extended by com.flagstone.transform.button.ButtonKey
All Implemented Interfaces:
Serializable, Comparable<ButtonKey>

public enum ButtonKey
extends Enum<ButtonKey>

ButtonKey is used to provide mapping from special keys to codes recognised by the Flash Player.


Enum Constant Summary
BACKSPACE
          Code for the button event that occurs when the backspace key is pressed on the keyboard.
DELETE
          Code for the button event that occurs when the delete key is pressed on the keyboard.
DOWN
          Code for the button event that occurs when the down arrow key is pressed on the keyboard.
END
          Code for the button event that occurs when the end key is pressed on the keyboard.
ENTER
          Code for the button event that occurs when the enter key is pressed on the keyboard.
ESCAPE
          Code for the button event that occurs when the escape key is pressed on the keyboard.
HOME
          Code for the button event that occurs when the home key is pressed on the keyboard.
INSERT
          Code for the button event that occurs when the insert key is pressed on the keyboard.
LEFT
          Code for the button event that occurs when the left arrow key is pressed on the keyboard.
PAGE_DOWN
          Code for the button event that occurs when the page down key is pressed on the keyboard.
PAGE_UP
          Code for the button event that occurs when the page up key is pressed on the keyboard.
RIGHT
          Code for the button event that occurs when the right arrow key is pressed on the keyboard.
TAB
          Code for the button event that occurs when the tab key is pressed on the keyboard.
UP
          Code for the button event that occurs when the up arrow key is pressed on the keyboard.
 
Method Summary
static ButtonKey fromInt(int keyCode)
          Get the ButtonKey for an encoded value.
 int getValue()
          Get the value that will be encoded to represent the ButtonKey.
static ButtonKey valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ButtonKey[] 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

LEFT

public static final ButtonKey LEFT
Code for the button event that occurs when the left arrow key is pressed on the keyboard.


RIGHT

public static final ButtonKey RIGHT
Code for the button event that occurs when the right arrow key is pressed on the keyboard.


HOME

public static final ButtonKey HOME
Code for the button event that occurs when the home key is pressed on the keyboard.


END

public static final ButtonKey END
Code for the button event that occurs when the end key is pressed on the keyboard.


INSERT

public static final ButtonKey INSERT
Code for the button event that occurs when the insert key is pressed on the keyboard.


DELETE

public static final ButtonKey DELETE
Code for the button event that occurs when the delete key is pressed on the keyboard.


BACKSPACE

public static final ButtonKey BACKSPACE
Code for the button event that occurs when the backspace key is pressed on the keyboard.


ENTER

public static final ButtonKey ENTER
Code for the button event that occurs when the enter key is pressed on the keyboard.


UP

public static final ButtonKey UP
Code for the button event that occurs when the up arrow key is pressed on the keyboard.


DOWN

public static final ButtonKey DOWN
Code for the button event that occurs when the down arrow key is pressed on the keyboard.


PAGE_UP

public static final ButtonKey PAGE_UP
Code for the button event that occurs when the page up key is pressed on the keyboard.


PAGE_DOWN

public static final ButtonKey PAGE_DOWN
Code for the button event that occurs when the page down key is pressed on the keyboard.


TAB

public static final ButtonKey TAB
Code for the button event that occurs when the tab key is pressed on the keyboard.


ESCAPE

public static final ButtonKey ESCAPE
Code for the button event that occurs when the escape key is pressed on the keyboard.

Method Detail

values

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

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

valueOf

public static ButtonKey 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

fromInt

public static ButtonKey fromInt(int keyCode)
Get the ButtonKey for an encoded value.

Parameters:
keyCode - the encoded value representing a key.
Returns:
the ButtonKey for the encoded value.

getValue

public int getValue()
Get the value that will be encoded to represent the ButtonKey.

Returns:
the value that will be encoded.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.