ptolemy.vergil.actor
Class ClassDefinitionController
java.lang.Object
diva.graph.BasicNodeController
ptolemy.vergil.basic.LocatableNodeController
ptolemy.vergil.basic.NamedObjController
ptolemy.vergil.basic.ParameterizedNodeController
ptolemy.vergil.basic.IconController
ptolemy.vergil.kernel.AttributeController
ptolemy.vergil.actor.ActorController
ptolemy.vergil.actor.ClassDefinitionController
- All Implemented Interfaces:
- NodeController
- public class ClassDefinitionController
- extends ActorController
This class provides interaction with nodes that represent Ptolemy II
classes. This extends the base class by providing mechanisms in the
context menu for creating an instance, creating a subclass,
and converting to an instance.
NOTE: There should be only one instance of this class associated with
a given GraphController. This is because this controller listens for
changes to the graph and re-renders the ports of any actor instance
in the graph when the graph changes. If there is more than one instance,
this rendering will be done twice, which can result in bugs like port
labels appearing twice.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: ClassDefinitionController.java,v 1.16.2.2 2004/07/19 04:43:54 cxh Exp $
- Author:
- Edward A. Lee and Steve Neuendorffer
- Accepted Rating:
- Proposed Rating:
|
Field Summary |
protected ptolemy.vergil.actor.ClassDefinitionController.ConvertToInstanceAction |
_convertToInstanceAction
The action that handles converting a class to an instance. |
protected ptolemy.vergil.actor.ClassDefinitionController.CreateInstanceAction |
_createInstanceAction
The action that handles creating an instance from a class. |
protected ptolemy.vergil.actor.ClassDefinitionController.CreateSubclassAction |
_createSubclassAction
The action that handles creating a subclass from a class. |
|
Method Summary |
protected Figure |
_renderNode(java.lang.Object node)
Draw the node at its location. |
| Methods inherited from class diva.graph.BasicNodeController |
addNode, addNode, addNode, clearNode, drawNode, getController, getNodeInteractor, getNodeRenderer, removeNode, setNodeInteractor, setNodeRenderer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_convertToInstanceAction
protected ptolemy.vergil.actor.ClassDefinitionController.ConvertToInstanceAction _convertToInstanceAction
- The action that handles converting a class to an instance.
_createInstanceAction
protected ptolemy.vergil.actor.ClassDefinitionController.CreateInstanceAction _createInstanceAction
- The action that handles creating an instance from a class.
_createSubclassAction
protected ptolemy.vergil.actor.ClassDefinitionController.CreateSubclassAction _createSubclassAction
- The action that handles creating a subclass from a class.
ClassDefinitionController
public ClassDefinitionController(GraphController controller)
- Create an actor instance controller associated with the
specified graph controller with full access.
- Parameters:
controller - The associated graph controller.
ClassDefinitionController
public ClassDefinitionController(GraphController controller,
AttributeController.Access access)
- Create a controller associated with the specified graph
controller with the specified access.
- Parameters:
controller - The associated graph controller.access - The access level, one of FULL or PARTIAL.
_renderNode
protected Figure _renderNode(java.lang.Object node)
- Draw the node at its location. This overrides the base class
to highlight the actor to indicate that it is a class definition.
- Overrides:
_renderNode in class LocatableNodeController
- Parameters:
node - The node to render.