ptolemy.vergil.actor
Class ActorEditorGraphController
java.lang.Object
diva.graph.AbstractGraphController
ptolemy.vergil.basic.BasicGraphController
ptolemy.vergil.basic.WithIconGraphController
ptolemy.vergil.basic.RunnableGraphController
ptolemy.vergil.actor.ActorViewerGraphController
ptolemy.vergil.actor.ActorEditorGraphController
- All Implemented Interfaces:
- GraphController, ExecutionListener, DebugListener, ValueListener
- Direct Known Subclasses:
- CaseGraphFrame.CaseGraphController, GTFrame.GTActorGraphController, MatchResultViewer.MatchResultActorGraphController
public class ActorEditorGraphController
- extends ActorViewerGraphController
A Graph Controller for the Ptolemy II schematic editor. In addition to the
interaction allowed in the viewer, this controller allows nodes to be
dragged and dropped onto its graph. Relations can be created by
control-clicking on the background. Links can be created by control-clicking
and dragging on a port or a relation. In addition links can be created by
clicking and dragging on the ports that are inside an entity.
Anything can be deleted by selecting it and pressing
the delete key on the keyboard.
- Since:
- Ptolemy II 2.0
- Version:
- $Id: ActorEditorGraphController.java,v 1.65.4.1 2008/03/25 23:38:51 cxh Exp $
- Author:
- Steve Neuendorffer, Contributor: Edward A. Lee
- Accepted Rating:
- Proposed Rating:
|
Field Summary |
protected javax.swing.Action |
_newRelationAction
Action for creating a new relation. |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_newRelationAction
protected javax.swing.Action _newRelationAction
- Action for creating a new relation.
ActorEditorGraphController
public ActorEditorGraphController()
- Create a new basic controller with default
terminal and edge interactors.
addToMenuAndToolbar
public void addToMenuAndToolbar(javax.swing.JMenu menu,
javax.swing.JToolBar toolbar)
- Add commands to the specified menu and toolbar, as appropriate
for this controller. In this class, commands are added to create
ports and relations.
- Overrides:
addToMenuAndToolbar in class ActorViewerGraphController
- Parameters:
menu - The menu to add to, or null if none.toolbar - The toolbar to add to, or null if none.
setConfiguration
public void setConfiguration(Configuration configuration)
- Set the configuration. The configuration is used when
opening documentation files.
- Overrides:
setConfiguration in class ActorViewerGraphController
- Parameters:
configuration - The configuration.- See Also:
BasicGraphController.getConfiguration()
_createControllers
protected void _createControllers()
- Create the controllers for nodes in this graph.
In this class, controllers with FULL 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:
_createControllers in class ActorViewerGraphController
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:
initializeInteraction in class ActorViewerGraphController
_initializeInteraction
protected void _initializeInteraction(NamedObjController controller)
- Initialize interactions for the specified controller. This
method is called when a new controller is constructed. In this
class, this method attaches a link creator to the controller
if the controller is an instance of ExternalIOPortController,
IOPortController, or RelationController.
- Overrides:
_initializeInteraction in class BasicGraphController
- Parameters:
controller - The controller for which to initialize interaction.