|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.input.action.KeyInputAction
InputAction defines an interface for creating input actions.
These actions can correspond to any event defined by a key value. The
InputHandler class typically maintains a collection of the
actions and when required calls the actions performAction
method.
InputHandler| Field Summary | |
protected boolean |
allowsRepeats
If true, a single button press results in multiple calls to this class's performAction(float) |
protected java.lang.String |
key
A name that identifies this action. |
protected char |
keyChar
The char associated with this event. |
protected float |
speed
A speed value that, if desired, can change how actions are performed. |
| Constructor Summary | |
KeyInputAction()
|
|
| Method Summary | |
boolean |
allowsRepeats()
Returns true if a single key press is set to allow repeated performAction calls. |
java.lang.String |
getKey()
getKey retrieves the key associated with this action. |
char |
getKeyChar()
getKey retrieves the key associated with this action. |
float |
getSpeed()
Returns the currently set speed. |
void |
setAllowsRepeats(boolean allow)
Sets if a single key press allows repeated performAction calls. |
void |
setKey(java.lang.String key)
setKey sets the key associated with this action. |
void |
setKeyChar(char keyChar)
setKey sets the key associated with this action. |
void |
setSpeed(float speed)
setSpeed defines the speed at which this action occurs. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jme.input.action.InputAction |
performAction |
| Field Detail |
protected boolean allowsRepeats
protected float speed
protected java.lang.String key
protected char keyChar
| Constructor Detail |
public KeyInputAction()
| Method Detail |
public void setSpeed(float speed)
setSpeed defines the speed at which this action occurs.
setSpeed in interface InputActionspeed - the speed at which this action occurs.public float getSpeed()
getSpeed in interface InputActionpublic java.lang.String getKey()
getKey retrieves the key associated with this action.
getKey in interface InputActionpublic void setKey(java.lang.String key)
setKey sets the key associated with this action.
setKey in interface InputActionkey - the key associated with the action.public char getKeyChar()
getKey retrieves the key associated with this action.
public void setKeyChar(char keyChar)
setKey sets the key associated with this action.
public boolean allowsRepeats()
public void setAllowsRepeats(boolean allow)
allow - If true, a single key press allows fo repeated performAction
calls.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||