|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.lri.swingstates.sm.Transition
fr.lri.swingstates.sm.transitions.Event
fr.lri.swingstates.sm.transitions.EventOnPosition
fr.lri.swingstates.canvas.CStateMachine.EventOnShape
public abstract class CStateMachine.EventOnShape
A transition triggered on a CShape in the canvas. OnShape transitions allow developpers to retrieve the shape in the canvas where this transition has been fired:
Transition tshape = new EventOnShape ("anEvent") {
public void action() {
// colors in red the shape on which the transition has been fired
getShape().setFillPaint(Color.RED);
}
}
| Constructor Summary | |
|---|---|
CStateMachine.EventOnShape(java.lang.Class eventClass)
Builds a transition on a CShape with no modifier that can be triggered by any virtual events whose type is a subclass of eventClass. |
|
CStateMachine.EventOnShape(java.lang.Class eventClass,
java.lang.String outState)
Builds a transition on a CShape with no modifier that can be triggered by any virtual events whose type is a subclass of eventClass. |
|
CStateMachine.EventOnShape(java.lang.String keyEvent)
Builds a transition on a CShape with no modifier that loops on the current state. |
|
CStateMachine.EventOnShape(java.lang.String keyEvent,
java.lang.String outState)
Builds a transition on a CShape with no modifier. |
|
| Method Summary | |
|---|---|
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. |
boolean |
matches(java.util.EventObject eventObject)
Tests if an event can trigger that transition. |
java.lang.String |
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 |
|---|
public CStateMachine.EventOnShape(java.lang.String keyEvent)
keyEvent - The string describing the events for which this transition
must be triggered
public CStateMachine.EventOnShape(java.lang.String keyEvent,
java.lang.String outState)
keyEvent - The string describing the events for which this transition
must be triggeredoutState - The name of the output state
public CStateMachine.EventOnShape(java.lang.Class eventClass,
java.lang.String outState)
eventClass.
eventClass - The class of eventsoutState - The name of the output statepublic CStateMachine.EventOnShape(java.lang.Class eventClass)
eventClass.
eventClass - The class of events| Method Detail |
|---|
public CShape getShape()
public java.lang.String toString()
toString in class EventOnPositionpublic java.awt.geom.Point2D getPoint()
getPoint in class EventOnPositionpublic boolean matches(java.util.EventObject eventObject)
matches in class EventOnPositioneventObject - The event to test
eventObject
can trigger this transition.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||