sm
Class StateMachine.State.MouseOnTag

java.lang.Object
  extended bysm.StateMachine.State.Transition
      extended bysm.StateMachine.State.EventOnPosition
          extended bysm.StateMachine.State.EventOnShape
              extended bysm.StateMachine.State.EventOnTag
                  extended bysm.StateMachine.State.MouseOnTag
Direct Known Subclasses:
StateMachine.State.ClickOnTag, StateMachine.State.DragOnTag, StateMachine.State.MoveOnTag, StateMachine.State.PressOnTag, StateMachine.State.ReleaseOnTag
Enclosing class:
StateMachine.State

public class StateMachine.State.MouseOnTag
extends StateMachine.State.EventOnTag

A transition triggered by a mouse event on a tagged shape in the canvas. The transition is specified by a button and modifiers. The position of the mouse when the transition fired can be retrieved.

Author:
Caroline Appert

Constructor Summary
StateMachine.State.MouseOnTag(SMTag t, java.lang.String e, int b)
          Constructs a mouse transition with no modifier on tagged shape that loops on the current state.
StateMachine.State.MouseOnTag(SMTag t, java.lang.String e, int b, int m)
          Constructs a mouse transition on tagged shape that loops on the current state.
StateMachine.State.MouseOnTag(SMTag t, java.lang.String e, int b, int m, java.lang.String a)
          Constructs a mouse transition on tagged shape.
StateMachine.State.MouseOnTag(SMTag t, java.lang.String e, int b, java.lang.String a)
          Constructs a mouse transition with no modifier on tagged shape.
StateMachine.State.MouseOnTag(java.lang.String n, java.lang.String e, int b)
          Constructs a mouse transition with no modifier on tagged shape that loops on the current state.
StateMachine.State.MouseOnTag(java.lang.String n, java.lang.String e, int b, int m)
          Constructs a mouse transition on tagged shape that loops on the current state.
StateMachine.State.MouseOnTag(java.lang.String n, java.lang.String e, int b, int m, java.lang.String a)
          Constructs a mouse transition on tagged shape.
StateMachine.State.MouseOnTag(java.lang.String n, java.lang.String e, int b, java.lang.String a)
          Constructs a mouse transition with no modifier on tagged shape.
 
Method Summary
 int getButton()
          Returns the button of the mouse event that fires this transition.
 
Methods inherited from class sm.StateMachine.State.EventOnTag
getTagName, getTagObject
 
Methods inherited from class sm.StateMachine.State.EventOnShape
getShape, hashKey, toString
 
Methods inherited from class sm.StateMachine.State.EventOnPosition
getInputEvent, getPoint, setInputEvent
 
Methods inherited from class sm.StateMachine.State.Transition
action, getModifier, getOutputStateName, getVirtualEvent, guard, oldToString, setVirtualEvent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(SMTag t,
                                     java.lang.String e,
                                     int b,
                                     int m,
                                     java.lang.String a)
Constructs a mouse transition on tagged shape.

Parameters:
t - The tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
a - The name of the output state
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(SMTag t,
                                     java.lang.String e,
                                     int b,
                                     int m)
Constructs a mouse transition on tagged shape that loops on the current state.

Parameters:
t - The tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(SMTag t,
                                     java.lang.String e,
                                     int b,
                                     java.lang.String a)
Constructs a mouse transition with no modifier on tagged shape.

Parameters:
t - The tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
a - The name of the output state

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(SMTag t,
                                     java.lang.String e,
                                     int b)
Constructs a mouse transition with no modifier on tagged shape that loops on the current state.

Parameters:
t - The tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(java.lang.String n,
                                     java.lang.String e,
                                     int b,
                                     int m,
                                     java.lang.String a)
Constructs a mouse transition on tagged shape.

Parameters:
n - The name of the tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
a - The name of the output state
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(java.lang.String n,
                                     java.lang.String e,
                                     int b,
                                     int m)
Constructs a mouse transition on tagged shape that loops on the current state.

Parameters:
n - The name of the tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(java.lang.String n,
                                     java.lang.String e,
                                     int b,
                                     java.lang.String a)
Constructs a mouse transition with no modifier on tagged shape.

Parameters:
n - The name of the tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
a - The name of the output state

StateMachine.State.MouseOnTag

public StateMachine.State.MouseOnTag(java.lang.String n,
                                     java.lang.String e,
                                     int b)
Constructs a mouse transition with no modifier on tagged shape that loops on the current state.

Parameters:
n - The name of the tag
e - The string describing the events for which this transition must be triggered: "Down", "Motion", "Move", "Up", "Click" or "Gesture"*
b - The button of the mouse event: NOBUTTON, BUTTON1, BUTTON2 or BUTTON3
Method Detail

getButton

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

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