edu.stanford.hci.dtools
Class RunModeTracker

java.lang.Object
  extended by edu.stanford.hci.dtools.RunModeTracker
All Implemented Interfaces:
HardwareInputEventListener, java.io.Serializable

public class RunModeTracker
extends java.lang.Object
implements HardwareInputEventListener, java.io.Serializable

This software is distributed under the BSD License.

Author:
Michael Bernstein ( mbernst(AT)stanford.edu ), Bjoern Hartmann ( bjoern(AT)stanford.edu )
See Also:
Serialized Form

Constructor Summary
RunModeTracker()
           
 
Method Summary
 void componentStateChanged(InputComponent component)
          Translate a hardware event into a meaningful action (i.e.
 StateModel getCurrentState()
          Returns the state which is currently active, or null if no such state
 boolean getRecording()
           
 StateModel getStartState()
          Returns the state which is registered as the state to jump to when starting run mode
 void setCurrentState(StateModel state)
          Changes the state which is currently active in run mode (red border)
 void setRecording(boolean r)
           
 void setStartState(StateModel state)
          Changes the state which Run Mode jumps to when activated
 void startRecording()
           
 void stopRecording()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunModeTracker

public RunModeTracker()
Method Detail

getCurrentState

public StateModel getCurrentState()
Returns the state which is currently active, or null if no such state

Returns:

getStartState

public StateModel getStartState()
Returns the state which is registered as the state to jump to when starting run mode

Returns:

setCurrentState

public void setCurrentState(StateModel state)
Changes the state which is currently active in run mode (red border)

Parameters:
state -

setStartState

public void setStartState(StateModel state)
Changes the state which Run Mode jumps to when activated

Parameters:
state -

componentStateChanged

public void componentStateChanged(InputComponent component)
Translate a hardware event into a meaningful action (i.e. follow a transition)

Specified by:
componentStateChanged in interface HardwareInputEventListener

getRecording

public boolean getRecording()

setRecording

public void setRecording(boolean r)

startRecording

public void startRecording()

stopRecording

public void stopRecording()