fr.lri.swingstates.canvas
Class CStateMachine.MoveOnShape

java.lang.Object
  extended by fr.lri.swingstates.sm.Transition
      extended by fr.lri.swingstates.sm.transitions.Event
          extended by fr.lri.swingstates.sm.transitions.EventOnPosition
              extended by fr.lri.swingstates.canvas.CStateMachine.EventOnShape
                  extended by fr.lri.swingstates.canvas.CStateMachine.MouseOnShape
                      extended by fr.lri.swingstates.canvas.CStateMachine.MoveOnShape
Enclosing class:
CStateMachine

public class CStateMachine.MoveOnShape
extends CStateMachine.MouseOnShape

A transition triggered by a mouse moved event on a CShape with no mouse button down.

Author:
Caroline Appert

Constructor Summary
CStateMachine.MoveOnShape()
          Builds a transition triggered by a mouse moved event with mo modifier down on a CShape that loops on the current state.
CStateMachine.MoveOnShape(int modifier)
          Builds a transition triggered by a mouse moved event on a CShape that loops on the current state.
CStateMachine.MoveOnShape(int modifier, java.lang.String outState)
          Builds a transition triggered by a mouse moved event on a CShape.
CStateMachine.MoveOnShape(java.lang.String outState)
          Builds a transition triggered by a mouse moved event with any modifier on a CShape.
 
Method Summary
 boolean matches(java.util.EventObject eventObject)
          Tests if an event can trigger that transition.
 
Methods inherited from class fr.lri.swingstates.canvas.CStateMachine.MouseOnShape
getButton, getInputEvent, getModifier, getMouseEvent, getPoint, getShape, toString
 
Methods inherited from class fr.lri.swingstates.sm.Transition
action, getEvent, getInputState, getOutputState, guard, oldToString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CStateMachine.MoveOnShape

public CStateMachine.MoveOnShape()
Builds a transition triggered by a mouse moved event with mo modifier down on a CShape that loops on the current state.


CStateMachine.MoveOnShape

public CStateMachine.MoveOnShape(int modifier)
Builds a transition triggered by a mouse moved event on a CShape that loops on the current state.

Parameters:
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

CStateMachine.MoveOnShape

public CStateMachine.MoveOnShape(java.lang.String outState)
Builds a transition triggered by a mouse moved event with any modifier on a CShape.

Parameters:
outState - The name of the output state

CStateMachine.MoveOnShape

public CStateMachine.MoveOnShape(int modifier,
                                 java.lang.String outState)
Builds a transition triggered by a mouse moved event on a CShape.

Parameters:
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
outState - The name of the output state
Method Detail

matches

public boolean matches(java.util.EventObject eventObject)
Tests if an event can trigger that transition.

Overrides:
matches in class CStateMachine.EventOnShape
Parameters:
eventObject - The event to test
Returns:
True if the eventObject can trigger this transition.