Package ptolemy.vergil.modal
Class FSMViewerGraphController
- java.lang.Object
-
- diva.graph.AbstractGraphController
-
- ptolemy.vergil.basic.BasicGraphController
-
- ptolemy.vergil.basic.WithIconGraphController
-
- ptolemy.vergil.basic.RunnableGraphController
-
- ptolemy.vergil.modal.FSMViewerGraphController
-
- All Implemented Interfaces:
GraphController,ExecutionListener,DebugListener,ValueListener
- Direct Known Subclasses:
FSMGraphController
public class FSMViewerGraphController extends RunnableGraphController
A graph controller for the Ptolemy II finite-state machine viewer. This controller allows states to be moved and context menus to be accessed, but does not provide interaction for adding or removing states or transitions.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Steve Neuendorffer, Contributor: Edward A. Lee
- Pt.AcceptedRating:
- Red (johnr)
- Pt.ProposedRating:
- Red (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.vergil.basic.WithIconGraphController
WithIconGraphController.NewPortAction
-
Nested classes/interfaces inherited from class ptolemy.vergil.basic.BasicGraphController
BasicGraphController.OpenBaseClassAction, BasicGraphController.SchematicContextMenuFactory, BasicGraphController.UnitSolverDialogAction
-
-
Field Summary
Fields Modifier and Type Field Description protected NamedObjController_attributeControllerThe attribute controller.protected TransitionController_modalTransitionControllerThe modal transition controller.protected StateController_stateControllerThe state controller.protected TransitionController_transitionControllerThe transition controller.-
Fields inherited from class ptolemy.vergil.basic.WithIconGraphController
_editIconAction, _portController, _removeIconAction
-
Fields inherited from class ptolemy.vergil.basic.BasicGraphController
_animated, _animationRenderer, _configureAction, _configureMenuFactory, _menuCreator, _menuFactory, _openBaseClassAction, _unitSolverDialogAction
-
-
Constructor Summary
Constructors Constructor Description FSMViewerGraphController()Create a new controller with default port, state, and transition controllers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_addHotKeys(JGraph jgraph)Add hot keys to the actions in the given JGraph.protected void_createControllers()Create the controllers for nodes in this graph.voidevent(DebugEvent event)React to an event by highlighting the new state.EdgeControllergetEdgeController(java.lang.Object edge)Return the edge controller appropriate for the given node.NodeControllergetNodeController(java.lang.Object object)Return the node controller appropriate for the given node.protected voidinitializeInteraction()Initialize all interaction on the graph pane.voidsetConfiguration(Configuration configuration)Set the configuration.-
Methods inherited from class ptolemy.vergil.basic.RunnableGraphController
_getManager, _report, _report, addToMenuAndToolbar, executionError, executionFinished, managerStateChanged
-
Methods inherited from class ptolemy.vergil.basic.WithIconGraphController
getNewPortLocation
-
Methods inherited from class ptolemy.vergil.basic.BasicGraphController
_areThereActiveErrorHighlights, _getClearAllErrorHighlightsChangeRequest, _initializeInteraction, clearAllErrorHighlights, clearAnimation, getAnimationDelay, getConfiguration, getConfigureMenuFactory, getFrame, highlightError, message, setAnimationDelay, setFigure, setFrame, valueChanged
-
Methods inherited from class diva.graph.AbstractGraphController
addEdge, addEdge, addGraphViewListener, addNode, addNode, addNode, addNode, clear, clearEdge, clearNode, dispatch, drawEdge, drawNode, drawNode, getFigure, getGraphModel, getGraphPane, getSelectionModel, removeEdge, removeGraphViewListener, removeNode, rerender, rerenderEdge, rerenderNode, setGraphModel, setGraphPane, setSelectionModel
-
-
-
-
Field Detail
-
_attributeController
protected NamedObjController _attributeController
The attribute controller.
-
_stateController
protected StateController _stateController
The state controller.
-
_transitionController
protected TransitionController _transitionController
The transition controller.
-
_modalTransitionController
protected TransitionController _modalTransitionController
The modal transition controller.
-
-
Method Detail
-
event
public void event(DebugEvent event)
React to an event by highlighting the new state.- Specified by:
eventin interfaceDebugListener- Overrides:
eventin classBasicGraphController- Parameters:
event- The debug event.
-
getNodeController
public NodeController getNodeController(java.lang.Object object)
Return the node controller appropriate for the given node.- Specified by:
getNodeControllerin interfaceGraphController- Overrides:
getNodeControllerin classBasicGraphController- Parameters:
object- The object to get a controller for.- Returns:
- A custom node controller if there is one, and null otherwise.
-
getEdgeController
public EdgeController getEdgeController(java.lang.Object edge)
Return the edge controller appropriate for the given node.- Specified by:
getEdgeControllerin interfaceGraphController- Specified by:
getEdgeControllerin classAbstractGraphController
-
setConfiguration
public void setConfiguration(Configuration configuration)
Set the configuration. This is may be used by derived controllers to open files or URLs.- Overrides:
setConfigurationin classWithIconGraphController- Parameters:
configuration- The configuration.- See Also:
BasicGraphController.getConfiguration()
-
_addHotKeys
protected void _addHotKeys(JGraph jgraph)
Add hot keys to the actions in the given JGraph.- Overrides:
_addHotKeysin classRunnableGraphController- Parameters:
jgraph- The JGraph to which hot keys are to be added.
-
_createControllers
protected void _createControllers()
Create the controllers for nodes in this graph. In this base class, controllers with PARTIAL access are created. This is called by the constructor, so derived classes that override this must be careful not to reference local variables defined in the derived classes, because the derived classes will not have been fully constructed by the time this is called.- Overrides:
_createControllersin classWithIconGraphController
-
initializeInteraction
protected void initializeInteraction()
Initialize all interaction on the graph pane. This method is called by the setGraphPane() method of the superclass. This initialization cannot be done in the constructor because the controller does not yet have a reference to its pane at that time.- Overrides:
initializeInteractionin classWithIconGraphController
-
-