fr.lri.swingstates.canvas
Class CStateMachine.DragOnShape

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.DragOnShape
Enclosing class:
CStateMachine

public class CStateMachine.DragOnShape
extends CStateMachine.MouseOnShape

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

Author:
Caroline Appert

Constructor Summary
CStateMachine.DragOnShape()
          Builds a transition triggered by a mouse dragged event with any modifier and any button on a CShape that loops on the current state.
CStateMachine.DragOnShape(int button)
          Builds a transition triggered by a mouse dragged event with any modifier on a shape that loops on the current state.
CStateMachine.DragOnShape(int button, int modifier)
          Builds a transition triggered by a mouse dragged event on a shape that loops on the current state.
CStateMachine.DragOnShape(int button, int modifier, java.lang.String outState)
          Builds a transition triggered by a mouse dragged event on a shape.
CStateMachine.DragOnShape(int button, java.lang.String outState)
          Builds a transition triggered by a mouse dragged event with any modifier on a shape.
CStateMachine.DragOnShape(java.lang.String outState)
          Builds a transition triggered by a mouse dragged 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.DragOnShape

public CStateMachine.DragOnShape()
Builds a transition triggered by a mouse dragged event with any modifier and any button on a CShape that loops on the current state.


CStateMachine.DragOnShape

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

Parameters:
outState - The name of the output state

CStateMachine.DragOnShape

public CStateMachine.DragOnShape(int button)
Builds a transition triggered by a mouse dragged event with any modifier on a shape that loops on the current state.

Parameters:
button - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3

CStateMachine.DragOnShape

public CStateMachine.DragOnShape(int button,
                                 int modifier)
Builds a transition triggered by a mouse dragged event on a shape that loops on the current state.

Parameters:
button - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

CStateMachine.DragOnShape

public CStateMachine.DragOnShape(int button,
                                 java.lang.String outState)
Builds a transition triggered by a mouse dragged event with any modifier on a shape.

Parameters:
button - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
outState - The name of the output state

CStateMachine.DragOnShape

public CStateMachine.DragOnShape(int button,
                                 int modifier,
                                 java.lang.String outState)
Builds a transition triggered by a mouse dragged event on a shape.

Parameters:
button - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
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.