| Package | com.yworks.support |
| Class | public class Transition |
| Inheritance | Transition flash.events.EventDispatcher |
StateMachine.
A transition connects to States and is created
using the StateMachine.createTransition method.
| Property | Defined By | ||
|---|---|---|---|
| enabled : Boolean
Enables or disables this transition. | Transition | ||
| eventRecognizer : Function
Gets or sets the event recognizer that will be used in the
isTrigger method. | Transition | ||
| source : State [read-only]
The source state this transition connects to. | Transition | ||
| tag : Object
Gets or sets a custom tag that is associated with this transition. | Transition | ||
| target : State [read-only]
The target state this transition connects to. | Transition | ||
| Method | Defined By | ||
|---|---|---|---|
Transition(owner:StateMachine, source:State, target:State, er:Function = null, transDoneCallback:Function = null)
Creates a transition between two states for a StateMachine
| Transition | ||
isTrigger(evt:Event):Boolean
Determines whether this transition is triggered by the given event. | Transition | ||
toString():String [override]
A String representation of this transition. | Transition | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the transition has been traversed. | Transition | |||
| enabled | property |
enabled:BooleanEnables or disables this transition.
A disabled transition will not be traversed by the state machine automatically.
public function get enabled():Boolean public function set enabled(value:Boolean):void| eventRecognizer | property |
eventRecognizer:Function
Gets or sets the event recognizer that will be used in the
isTrigger method.
public function get eventRecognizer():Function public function set eventRecognizer(value:Function):void| source | property |
source:State [read-only] The source state this transition connects to.
public function get source():State| tag | property |
tag:ObjectGets or sets a custom tag that is associated with this transition.
public function get tag():Object public function set tag(value:Object):void| target | property |
target:State [read-only] The target state this transition connects to.
public function get target():State| Transition | () | Constructor |
public function Transition(owner:StateMachine, source:State, target:State, er:Function = null, transDoneCallback:Function = null)
Creates a transition between two states for a StateMachine
owner:StateMachine — the StateMachine this transition belongs to.
| |
source:State — The source state.
| |
target:State — The target state.
| |
er:Function (default = null) — An event recognizer that determines whether a given event triggers this transition.
| |
transDoneCallback:Function (default = null) — Event listener for the transitionDone event. The listener has to take a
TransitionEvent as an argument.
|
| isTrigger | () | method |
public function isTrigger(evt:Event):BooleanDetermines whether this transition is triggered by the given event.
Parameters
evt:Event — The event to check.
|
Boolean — true if the given event can trigger this tranision
|
| toString | () | method |
override public function toString():StringA String representation of this transition.
ReturnsString — A String representation of this transition.
|
| transitionDone | Event |
com.yworks.support.TransitionEventcom.yworks.support.TransitionEvent.TRANSITION_DONEDispatched when the transition has been traversed.