sm
Class StateMachine.State.EventOnTag

java.lang.Object
  extended bysm.StateMachine.State.Transition
      extended bysm.StateMachine.State.EventOnPosition
          extended bysm.StateMachine.State.EventOnShape
              extended bysm.StateMachine.State.EventOnTag
Direct Known Subclasses:
StateMachine.State.EnterOnTag, StateMachine.State.LeaveOnTag, StateMachine.State.MouseOnTag
Enclosing class:
StateMachine.State

public abstract class StateMachine.State.EventOnTag
extends StateMachine.State.EventOnShape

A transition triggered on a tagged shape in the canvas. OnTag transitions allow developpers to retrieve the shape in the canvas where this transition has been fired:

 	Transition tshape = new EventOnTag ("ellipse", BUTTON1) {
 		public void action() {
 			// colors in red all the shapes having the tag "ellipse"
 			getTagObject().setFillPaint(Color.RED);
 		}
 	}

Author:
Caroline Appert

Constructor Summary
StateMachine.State.EventOnTag(SMTag t, java.lang.String e)
          Constructs a transition with any modifier on a tagged shape that loops on the current state.
StateMachine.State.EventOnTag(SMTag t, java.lang.String e, int m)
          Constructs a transition on a tagged shape that loops on the current state.
StateMachine.State.EventOnTag(SMTag t, java.lang.String e, int m, java.lang.String a)
          Constructs a transition on a tagged shape that loops on the current state.
StateMachine.State.EventOnTag(SMTag t, java.lang.String e, java.lang.String a)
          Constructs a transition with any modifier on a tagged shape.
StateMachine.State.EventOnTag(java.lang.String n, java.lang.String e)
          Constructs a transition with any modifier on a tagged shape that loops on the current state.
StateMachine.State.EventOnTag(java.lang.String n, java.lang.String e, int m)
          Constructs a transition on a tagged shape that loops on the current state.
StateMachine.State.EventOnTag(java.lang.String n, java.lang.String e, int m, java.lang.String a)
          Constructs a transition on a tagged shape that loops on the current state.
StateMachine.State.EventOnTag(java.lang.String n, java.lang.String e, java.lang.String a)
          Constructs a transition with any modifier on a tagged shape.
 
Method Summary
 java.lang.String getTagName()
          Returns the name of the tag attached to the SMShape on which the mouse event firing this transition has occured.
 SMTag getTagObject()
          Returns the tag instance attached to the SMShape on which the mouse event firing this transition has occured.
 
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.EventOnTag

public StateMachine.State.EventOnTag(SMTag t,
                                     java.lang.String e)
Constructs a transition with any modifier on a 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"*

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(java.lang.String n,
                                     java.lang.String e)
Constructs a transition with any modifier on a 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"*

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(SMTag t,
                                     java.lang.String e,
                                     int m)
Constructs a transition on a 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"*
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(java.lang.String n,
                                     java.lang.String e,
                                     int m)
Constructs a transition on a 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"*
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(java.lang.String n,
                                     java.lang.String e,
                                     java.lang.String a)
Constructs a transition with any modifier on a 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"*
a - The name of the output state

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(SMTag t,
                                     java.lang.String e,
                                     java.lang.String a)
Constructs a transition with any modifier on a 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"*
a - The name of the output state

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(java.lang.String n,
                                     java.lang.String e,
                                     int m,
                                     java.lang.String a)
Constructs a transition on a 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"*
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
a - The name of the output state

StateMachine.State.EventOnTag

public StateMachine.State.EventOnTag(SMTag t,
                                     java.lang.String e,
                                     int m,
                                     java.lang.String a)
Constructs a transition on a 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"*
m - The modifier: NOMODIFIER, CONTROL, ALT, SHIFT, ALT_CONTROL, CONTROL_SHIFT, ALT_SHIFT or ALT_CONTROL_SHIFT
a - The name of the output state
Method Detail

getTagName

public java.lang.String getTagName()
Returns the name of the tag attached to the SMShape on which the mouse event firing this transition has occured.

Returns:
Returns name of the tag.

getTagObject

public SMTag getTagObject()
Returns the tag instance attached to the SMShape on which the mouse event firing this transition has occured.

Returns:
Returns the tag instance.