public enum Key extends Enum<Key>
Enum Constant and Description |
---|
Animation |
ChangeSet |
EAST |
EditKeys |
Help |
JUMP |
NE |
NewGame |
NORTH |
NW |
Quit |
ResetScore |
SE |
SOUTH |
STAY |
SW |
WEST |
Modifier and Type | Method and Description |
---|---|
int |
getKeyCode()
Get this Key's keyCode.
|
int |
getMove()
Return a move corresponding to this Key.
|
static Key |
lookup(int keyCode)
Return the Key corresponding to the given keyCode.
|
void |
setKeyCode(int keyCode)
Set this Key's keyCode; mark keyMap for rehash.
|
static Key |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Key[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Key JUMP
public static final Key SW
public static final Key SOUTH
public static final Key SE
public static final Key WEST
public static final Key STAY
public static final Key EAST
public static final Key NW
public static final Key NORTH
public static final Key NE
public static final Key Animation
public static final Key ChangeSet
public static final Key EditKeys
public static final Key Help
public static final Key NewGame
public static final Key Quit
public static final Key ResetScore
public static Key[] values()
for (Key c : Key.values()) System.out.println(c);
public static Key valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getKeyCode()
public void setKeyCode(int keyCode)
public int getMove()
public static Key lookup(int keyCode)
Copyright © 2007 Gem City Software. Distributed under the terms of the GPL