ptolemy.vergil.basic
Class WithIconGraphController

java.lang.Object
  extended bydiva.graph.AbstractGraphController
      extended byptolemy.vergil.basic.BasicGraphController
          extended byptolemy.vergil.basic.WithIconGraphController
All Implemented Interfaces:
DebugListener, GraphController, ValueListener
Direct Known Subclasses:
RunnableGraphController

public abstract class WithIconGraphController
extends BasicGraphController

A base class for Ptolemy II graph controllers for objects that can have icons. This adds to the base class the context menu items "Edit Custom Icon" and "Remove Custom Icon". This also adds a port controller.

Since:
Ptolemy II 4.0
Version:
$Id: WithIconGraphController.java,v 1.8 2004/04/13 03:49:58 cxh Exp $
Author:
Edward A. Lee
Accepted Rating:
Red (johnr)
Proposed Rating:
Red (eal)

Nested Class Summary
 class WithIconGraphController.NewPortAction
          An action to create a new port.
 
Nested classes inherited from class ptolemy.vergil.basic.BasicGraphController
BasicGraphController.OpenBaseClassAction, BasicGraphController.SchematicContextMenuFactory, BasicGraphController.UnitSolverDialogAction
 
Field Summary
protected static EditIconAction _editIconAction
          The edit custom icon action.
protected  NamedObjController _portController
          The port controller.
protected static RemoveIconAction _removeIconAction
          The remove custom icon action.
 
Fields inherited from class ptolemy.vergil.basic.BasicGraphController
_animated, _animationRenderer, _configureAction, _menuCreator, _menuFactory, _openBaseClassAction, _unitSolverDialogAction
 
Constructor Summary
WithIconGraphController()
          Create a new controller.
 
Method Summary
protected  void _createControllers()
          Create the controllers for nodes in this graph.
protected  void initializeInteraction()
          Initialize all interaction on the graph pane.
 void setConfiguration(Configuration configuration)
          Set the configuration.
 
Methods inherited from class ptolemy.vergil.basic.BasicGraphController
_initializeInteraction, addToMenuAndToolbar, clearAnimation, event, getAnimationDelay, getConfiguration, getFrame, getNodeController, 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, getEdgeController, 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
 

Field Detail

_editIconAction

protected static EditIconAction _editIconAction
The edit custom icon action.


_portController

protected NamedObjController _portController
The port controller.


_removeIconAction

protected static RemoveIconAction _removeIconAction
The remove custom icon action.

Constructor Detail

WithIconGraphController

public WithIconGraphController()
Create a new controller.

Method Detail

setConfiguration

public void setConfiguration(Configuration configuration)
Set the configuration. This is used by some of the controllers when opening files or URLs.

Overrides:
setConfiguration in class BasicGraphController
Parameters:
configuration - The configuration.

_createControllers

protected void _createControllers()
Create the controllers for nodes in this graph. In this base class, a port controller with PARTIAL access is 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 BasicGraphController

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. Regrettably, the canvas is not yet associated with the GraphPane, so you can't do any initialization that involves the canvas.

Overrides:
initializeInteraction in class BasicGraphController