sm
Class StateMachine.State.KeyPress

java.lang.Object
  extended bysm.StateMachine.State.Transition
      extended bysm.StateMachine.State.KeyTransition
          extended bysm.StateMachine.State.KeyPress
Enclosing class:
StateMachine.State

public class StateMachine.State.KeyPress
extends StateMachine.State.KeyTransition

A transition triggered by a key pressed event. Keys can be specified either by the ASCII character they represent or by their keycode.

Author:
Caroline Appert

Constructor Summary
StateMachine.State.KeyPress()
          Constructs a transition triggered by a key pressed event with any modifier that loops on the current state.
StateMachine.State.KeyPress(char c)
          Constructs a transition triggered by a key pressed event with any modifier that loops on the current state.
StateMachine.State.KeyPress(char c, int m)
          Constructs a transition triggered by a key pressed event that loops on the current state.
StateMachine.State.KeyPress(char c, int m, java.lang.String a)
          Constructs a transition triggered by a key pressed event.
StateMachine.State.KeyPress(char c, java.lang.String a)
          Constructs a transition triggered by a key pressed event with any modifier.
StateMachine.State.KeyPress(int k)
          Constructs a transition triggered by a key pressed event with any modifier that loops on the current state.
StateMachine.State.KeyPress(int k, int m)
          Constructs a transition triggered by a key pressed event that loops on the current state.
StateMachine.State.KeyPress(int k, int m, java.lang.String a)
          Constructs a transition triggered by a key pressed event.
StateMachine.State.KeyPress(int k, java.lang.String a)
          Constructs a transition triggered by a key pressed event with any modifier.
StateMachine.State.KeyPress(java.lang.String a)
          Constructs a transition triggered by a key pressed event with any modifier.
 
Methods inherited from class sm.StateMachine.State.KeyTransition
getChar, getInputEvent, getKeyCode, setChar, setInputEvent, setKeyCode
 
Methods inherited from class sm.StateMachine.State.Transition
action, getModifier, getOutputStateName, getVirtualEvent, guard, hashKey, oldToString, setVirtualEvent, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(java.lang.String a)
Constructs a transition triggered by a key pressed event with any modifier.

Parameters:
a - The name of the output state

StateMachine.State.KeyPress

public StateMachine.State.KeyPress()
Constructs a transition triggered by a key pressed event with any modifier that loops on the current state.


StateMachine.State.KeyPress

public StateMachine.State.KeyPress(char c,
                                   java.lang.String a)
Constructs a transition triggered by a key pressed event with any modifier.

Parameters:
c - The char corresponding to the key event
a - The name of the output state

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(int k,
                                   java.lang.String a)
Constructs a transition triggered by a key pressed event with any modifier.

Parameters:
k - The key code (ASCII) corresponding to the key event
a - The name of the output state

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(char c)
Constructs a transition triggered by a key pressed event with any modifier that loops on the current state.

Parameters:
c - The char corresponding to the key event

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(int k)
Constructs a transition triggered by a key pressed event with any modifier that loops on the current state.

Parameters:
k - The key code (ASCII) corresponding to the key event

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(char c,
                                   int m,
                                   java.lang.String a)
Constructs a transition triggered by a key pressed event.

Parameters:
c - The char corresponding to the key event
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
a - The name of the output state

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(int k,
                                   int m,
                                   java.lang.String a)
Constructs a transition triggered by a key pressed event.

Parameters:
k - The key code (ASCII) corresponding to the key event
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
a - The name of the output state

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(char c,
                                   int m)
Constructs a transition triggered by a key pressed event that loops on the current state.

Parameters:
c - The char corresponding to the key event
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.KeyPress

public StateMachine.State.KeyPress(int k,
                                   int m)
Constructs a transition triggered by a key pressed event that loops on the current state.

Parameters:
k - The key code (ASCII) corresponding to the key event
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT