fr.lri.swingstates.canvas
Class CStateMachine.LeaveOnShape

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

public class CStateMachine.LeaveOnShape
extends CStateMachine.MouseOnShape

A transition triggered when mouse cursor leaves a CShape.

Author:
Caroline Appert

Constructor Summary
CStateMachine.LeaveOnShape()
          Builds a transition triggered when the cursor leaves with any modifier a CShape.
CStateMachine.LeaveOnShape(int modifier)
          Builds a transition triggered when the cursor leaves a CShape that loops on the current state.
CStateMachine.LeaveOnShape(java.lang.String outState)
          Builds a transition triggered when the cursor leaves with any modifier 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.LeaveOnShape

public CStateMachine.LeaveOnShape()
Builds a transition triggered when the cursor leaves with any modifier a CShape.


CStateMachine.LeaveOnShape

public CStateMachine.LeaveOnShape(int modifier)
Builds a transition triggered when the cursor leaves 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.LeaveOnShape

public CStateMachine.LeaveOnShape(java.lang.String outState)
Builds a transition triggered when the cursor leaves with any modifier a CShape.

Parameters:
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.