fr.lri.swingstates.canvas
Class CStateMachine.MouseOnTag

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.EventOnTag
                      extended by fr.lri.swingstates.canvas.CStateMachine.MouseOnTag
Direct Known Subclasses:
CStateMachine.ClickOnTag, CStateMachine.DragOnTag, CStateMachine.EnterOnTag, CStateMachine.LeaveOnTag, CStateMachine.MoveOnTag, CStateMachine.PressOnTag, CStateMachine.ReleaseOnTag, CStateMachine.WheelOnTag
Enclosing class:
CStateMachine

public class CStateMachine.MouseOnTag
extends CStateMachine.EventOnTag

A transition triggered by a mouse event on a tagged shape in the canvas. The transition is specialized by a button and modifiers. Constants used for button and modifier are static fields in BasicInputStateMachine.

Author:
Caroline Appert
See Also:
BasicInputStateMachine.BUTTON1, BasicInputStateMachine.BUTTON2, BasicInputStateMachine.BUTTON3, BasicInputStateMachine.NOBUTTON, BasicInputStateMachine.ANYBUTTON, BasicInputStateMachine.CONTROL, BasicInputStateMachine.ALT, BasicInputStateMachine.SHIFT, BasicInputStateMachine.CONTROL_SHIFT, BasicInputStateMachine.ALT_CONTROL, BasicInputStateMachine.ALT_SHIFT, BasicInputStateMachine.ALT_CONTROL_SHIFT, BasicInputStateMachine.NOMODIFIER, BasicInputStateMachine.ANYMODIFIER

Constructor Summary
CStateMachine.MouseOnTag(java.lang.Class tagClass)
          Builds a mouse transition with any modifier and any button on a tagged shape that loops on the current state.
CStateMachine.MouseOnTag(java.lang.Class tagClass, int button)
          Builds a mouse transition with no modifier on tagged shape that loops on the current state.
CStateMachine.MouseOnTag(java.lang.Class tagClass, int button, int modifier)
          Builds a mouse transition on tagged shape that loops on the current state.
CStateMachine.MouseOnTag(java.lang.Class tagClass, int button, int modifier, java.lang.String outState)
          Builds a mouse transition on tagged shape.
CStateMachine.MouseOnTag(java.lang.Class tagClass, int button, java.lang.String outState)
          Builds a mouse transition with no modifier on tagged shape.
CStateMachine.MouseOnTag(java.lang.Class tagClass, java.lang.String outState)
          Builds a mouse transition with any modifier and any button on a tagged shape.
CStateMachine.MouseOnTag(CTag tag)
          Builds a mouse transition with any modifier and any button on a tagged shape that loops on the current state.
CStateMachine.MouseOnTag(CTag tag, int button)
          Builds a mouse transition with no modifier on tagged shape that loops on the current state.
CStateMachine.MouseOnTag(CTag tag, int button, int modifier)
          Builds a mouse transition on tagged shape that loops on the current state.
CStateMachine.MouseOnTag(CTag tag, int button, int modifier, java.lang.String outState)
          Builds a mouse transition on tagged shape.
CStateMachine.MouseOnTag(CTag tag, int button, java.lang.String outState)
          Builds a mouse transition with no modifier on tagged shape.
CStateMachine.MouseOnTag(CTag tag, java.lang.String outState)
          Builds a mouse transition with any modifier and any button on a tagged shape.
CStateMachine.MouseOnTag(java.lang.String tagName, int button)
          Builds a mouse transition with no modifier on a tagged shape that loops on the current state.
CStateMachine.MouseOnTag(java.lang.String tagName, int button, int modifier)
          Builds a mouse transition on tagged shape that loops on the current state.
CStateMachine.MouseOnTag(java.lang.String tagName, int button, int modifier, java.lang.String outState)
          Builds a mouse transition on tagged shape.
CStateMachine.MouseOnTag(java.lang.String tagName, int button, java.lang.String outState)
          Builds a mouse transition with no modifier on tagged shape.
 
Method Summary
 int getButton()
          Returns the button of the mouse event that fires this transition.
 java.awt.event.InputEvent getInputEvent()
           
 java.awt.event.MouseEvent getMouseEvent()
           
 java.awt.geom.Point2D getPoint()
          Returns the location at which this transition has occured.
 CShape getShape()
          Returns the CShape on which the event firing this transition has occured.
 java.lang.String toString()
          
 
Methods inherited from class fr.lri.swingstates.canvas.CStateMachine.EventOnTag
getTag, getTagName, matches
 
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.MouseOnTag

public CStateMachine.MouseOnTag(CTag tag,
                                java.lang.String outState)
Builds a mouse transition with any modifier and any button on a tagged shape.

Parameters:
tag - The tag
outState - The name of the output state

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(CTag tag)
Builds a mouse transition with any modifier and any button on a tagged shape that loops on the current state.

Parameters:
tag - The tag

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.Class tagClass,
                                java.lang.String outState)
Builds a mouse transition with any modifier and any button on a tagged shape.

Parameters:
tagClass - The class of the tag
outState - The name of the output state

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.Class tagClass)
Builds a mouse transition with any modifier and any button on a tagged shape that loops on the current state.

Parameters:
tagClass - The class of the tag

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(CTag tag,
                                int button,
                                int modifier,
                                java.lang.String outState)
Builds a mouse transition on tagged shape.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(CTag tag,
                                int button,
                                int modifier)
Builds a mouse transition on tagged shape that loops on the current state.

Parameters:
tag - The tag
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.MouseOnTag

public CStateMachine.MouseOnTag(CTag tag,
                                int button,
                                java.lang.String outState)
Builds a mouse transition with no modifier on tagged shape.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(CTag tag,
                                int button)
Builds a mouse transition with no modifier on tagged shape that loops on the current state.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.String tagName,
                                int button,
                                int modifier,
                                java.lang.String outState)
Builds a mouse transition on tagged shape.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.String tagName,
                                int button,
                                int modifier)
Builds a mouse transition on tagged shape that loops on the current state.

Parameters:
tagName - The name of the tag
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.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.String tagName,
                                int button,
                                java.lang.String outState)
Builds a mouse transition with no modifier on tagged shape.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.String tagName,
                                int button)
Builds a mouse transition with no modifier on a tagged shape that loops on the current state.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.Class tagClass,
                                int button,
                                int modifier,
                                java.lang.String outState)
Builds a mouse transition on tagged shape.

Parameters:
tagClass - The class of the tag
button - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
outState - The name of the output state
modifier - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.Class tagClass,
                                int button,
                                int modifier)
Builds a mouse transition on tagged shape that loops on the current state.

Parameters:
tagClass - The class of the tag
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.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.Class tagClass,
                                int button,
                                java.lang.String outState)
Builds a mouse transition with no modifier on tagged shape.

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

CStateMachine.MouseOnTag

public CStateMachine.MouseOnTag(java.lang.Class tagClass,
                                int button)
Builds a mouse transition with no modifier on tagged shape that loops on the current state.

Parameters:
tagClass - The class of the tag
button - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
Method Detail

toString

public java.lang.String toString()

Overrides:
toString in class CStateMachine.EventOnTag

getButton

public int getButton()
Returns the button of the mouse event that fires this transition.

Returns:
the button of the mouse event that fires this transition (NOBUTTON, BUTTON1, BUTTON2 or BUTTON3).

getInputEvent

public java.awt.event.InputEvent getInputEvent()
Returns:
the awt input event that fires this transition.

getMouseEvent

public java.awt.event.MouseEvent getMouseEvent()
Returns:
the awt mouse event that fires this transition.

getPoint

public java.awt.geom.Point2D getPoint()
Returns the location at which this transition has occured.

Overrides:
getPoint in class CStateMachine.EventOnShape
Returns:
the location at which the mouse event firing this transition has occured.

getShape

public CShape getShape()
Returns the CShape on which the event firing this transition has occured.

Overrides:
getShape in class CStateMachine.EventOnShape
Returns:
the CShape on which the event firing this transition has occured.