ptolemy.vergil.fsm
Class FSMGraphModel.StateModel

java.lang.Object
  extended by ptolemy.vergil.basic.NamedObjNodeModel
      extended by ptolemy.vergil.fsm.FSMGraphModel.StateModel
All Implemented Interfaces:
NodeModel
Enclosing class:
FSMGraphModel

public class FSMGraphModel.StateModel
extends NamedObjNodeModel

The model for an icon that represent states.


Constructor Summary
FSMGraphModel.StateModel()
           
 
Method Summary
 java.lang.String getDeleteNodeMoML(java.lang.Object node)
          Return a MoML String that will delete the given node from the Ptolemy model.
 java.lang.Object getParent(java.lang.Object node)
          Return the graph parent of the given node.
 java.util.Iterator inEdges(java.lang.Object node)
          Return an iterator over the edges coming into the given node.
 java.util.Iterator outEdges(java.lang.Object node)
          Return an iterator over the edges coming into the given node.
 void removeNode(java.lang.Object eventSource, java.lang.Object node)
          Remove the given node from the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSMGraphModel.StateModel

public FSMGraphModel.StateModel()
Method Detail

getDeleteNodeMoML

public java.lang.String getDeleteNodeMoML(java.lang.Object node)
Return a MoML String that will delete the given node from the Ptolemy model. This assumes that the context is the container of the state.

Specified by:
getDeleteNodeMoML in class NamedObjNodeModel
Parameters:
node - The node to be deleted.
Returns:
A valid MoML string.

getParent

public java.lang.Object getParent(java.lang.Object node)
Return the graph parent of the given node.

Parameters:
node - The node, which is assumed to be a location.
Returns:
The container of the icon's container, which should be the root of this graph model.

inEdges

public java.util.Iterator inEdges(java.lang.Object node)
Return an iterator over the edges coming into the given node. This method first ensures that there is an arc object for every link. The iterator is constructed by removing any arcs that do not have the given node as head.

Parameters:
node - The node, which is assumed to be a location.
Returns:
An iterator of Arc objects, all of which have the given node as their head.

outEdges

public java.util.Iterator outEdges(java.lang.Object node)
Return an iterator over the edges coming into the given node. This method first ensures that there is an arc object for every link. The iterator is constructed by removing any arcs that do not have the given node as tail.

Parameters:
node - The node, which is assumed to be a location.
Returns:
An iterator of Arc objects, all of which have the given node as their tail.

removeNode

public void removeNode(java.lang.Object eventSource,
                       java.lang.Object node)
Remove the given node from the model. The node is assumed to be a Locatable belonging to an entity.

Specified by:
removeNode in class NamedObjNodeModel
Parameters:
eventSource - The event source.
node - The given node to be deleted.