fr.lri.swingstates.canvas
Class CStateMachine.ReleaseOnShape

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

public class CStateMachine.ReleaseOnShape
extends CStateMachine.MouseOnShape

A transition triggered by a mouse button released on a CShape.

Author:
Caroline Appert

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

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


CStateMachine.ReleaseOnShape

public CStateMachine.ReleaseOnShape(java.lang.String outState)
Builds a transition triggered by a mouse released event with any modifier and any button on a CShape.

Parameters:
outState - The name of the output state

CStateMachine.ReleaseOnShape

public CStateMachine.ReleaseOnShape(int button)
Builds a transition triggered by a mouse released event with any modifier on a CShape that loops on the current state.

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

CStateMachine.ReleaseOnShape

public CStateMachine.ReleaseOnShape(int button,
                                    int modifier)
Builds a transition triggered by a mouse released event on a CShape 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.ReleaseOnShape

public CStateMachine.ReleaseOnShape(int button,
                                    java.lang.String outState)
Builds a transition triggered by a mouse released event with any modifier on a CShape.

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

CStateMachine.ReleaseOnShape

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

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.