Package ptolemy.vergil.actor
Class ActorController
- java.lang.Object
-
- All Implemented Interfaces:
NodeController
- Direct Known Subclasses:
ActorInstanceController,ClassDefinitionController,MatchResultViewer.MatchResultActorController,TransformationEditor.TransformationActorController
public abstract class ActorController extends AttributeController
This class provides interaction with nodes that represent Ptolemy II entities. It provides a double click binding and context menu entry to edit the parameters of the node ("Configure"), a command to get documentation, and a command to open an actor. It can have one of two access levels, FULL or PARTIAL. If the access level is FULL, the the context menu also contains a command to rename the node and to configure its ports. In addition, a layout algorithm is applied so that the figures for ports are automatically placed on the sides of the figure for the entity.NOTE: This class is abstract because it is missing the code for laying out ports. Use the concrete subclasses ActorInstanceController or ClassDefinitionController instead.
- Since:
- Ptolemy II 2.0
- Version:
- $Id$
- Author:
- Steve Neuendorffer and Edward A. Lee, Elaine Cheong, Contributor: Sven Koehler
- See Also:
ActorInstanceController,ClassDefinitionController- Pt.AcceptedRating:
- Red (johnr)
- Pt.ProposedRating:
- Red (eal)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classActorController.ListenToActorActionAn action to listen to debug messages in the actor.-
Nested classes/interfaces inherited from class ptolemy.vergil.kernel.AttributeController
AttributeController.Access
-
Nested classes/interfaces inherited from class ptolemy.vergil.basic.IconController
IconController.IconRenderer
-
-
Field Summary
Fields Modifier and Type Field Description protected AttributeController.Access_accessThe access level defined in the constructor.protected EditIconAction_editIconActionThe action that handles edit custom icon.protected RotateOrFlipPorts_flipPortsHorizontalAn action that handles flipping the ports horizontally.protected RotateOrFlipPorts_flipPortsVerticalAn action that handles flipping the ports vertically.protected LookInsideAction_lookInsideActionThe action that handles opening an actor.protected ptolemy.vergil.actor.ActorController.OpenInstanceAction_openInstanceActionThe action that handles opening an instance.protected RemoveIconAction_removeIconActionThe action that handles removing a custom icon.protected RotateOrFlipPorts_rotatePortsClockwiseAn action that handles rotating the ports by 90 degrees.protected RotateOrFlipPorts_rotatePortsCounterclockwiseAn action that handles rotating the ports by 90 degrees.-
Fields inherited from class ptolemy.vergil.kernel.AttributeController
_appearanceMenuActionFactory, _listenToAction, _renameAction, FULL, PARTIAL
-
Fields inherited from class ptolemy.vergil.basic.ParameterizedNodeController
_configureAction, _configureMenuFactory, _menuCreator, _menuFactory
-
Fields inherited from class ptolemy.vergil.basic.NamedObjController
_configuration
-
Fields inherited from class ptolemy.vergil.basic.LocatableNodeController
_decoratable, CLASS_ELEMENT_HIGHLIGHT_COLOR
-
-
Constructor Summary
Constructors Constructor Description ActorController(GraphController controller)Create an entity controller associated with the specified graph controller with full access.ActorController(GraphController controller, AttributeController.Access access)Create an entity controller associated with the specified graph controller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String_getComponentType()Get the class label of the component.voidaddHotKeys(JGraph jgraph)Add hot keys to the actions in the given JGraph.voidaddMenuItemFactory(MenuItemFactory menuItemFactory)If access is FULL, then add the jni.ArgumentDailogFactory() to _menuFactory.voidsetConfiguration(Configuration configuration)Set the configuration.-
Methods inherited from class ptolemy.vergil.kernel.AttributeController
_moveToFirstDescription, _moveToLastDescription, renderDecoratorHighlight, renderHighlight
-
Methods inherited from class ptolemy.vergil.basic.ParameterizedNodeController
getConfigureMenuFactory
-
Methods inherited from class ptolemy.vergil.basic.LocatableNodeController
_drawChildren, _getCompositeFigure, _hide, _isPropertySet, _renderNode, addNode, drawNode, getLocation, hasLocation, locateFigure, setLocation, setSnapResolution
-
Methods inherited from class diva.graph.BasicNodeController
addNode, addNode, addNode, clearNode, drawNode, getController, getNodeInteractor, getNodeRenderer, removeNode, setNodeInteractor, setNodeRenderer
-
-
-
-
Field Detail
-
_access
protected AttributeController.Access _access
The access level defined in the constructor.
-
_editIconAction
protected EditIconAction _editIconAction
The action that handles edit custom icon.
-
_flipPortsHorizontal
protected RotateOrFlipPorts _flipPortsHorizontal
An action that handles flipping the ports horizontally.
-
_flipPortsVertical
protected RotateOrFlipPorts _flipPortsVertical
An action that handles flipping the ports vertically.
-
_lookInsideAction
protected LookInsideAction _lookInsideAction
The action that handles opening an actor. This is accessed by by ActorViewerController to create a hot key for the editor. The name "lookInside" is historical and preserved to keep backward compatibility with subclasses.
-
_openInstanceAction
protected ptolemy.vergil.actor.ActorController.OpenInstanceAction _openInstanceAction
The action that handles opening an instance.
-
_removeIconAction
protected RemoveIconAction _removeIconAction
The action that handles removing a custom icon.
-
_rotatePortsClockwise
protected RotateOrFlipPorts _rotatePortsClockwise
An action that handles rotating the ports by 90 degrees.
-
_rotatePortsCounterclockwise
protected RotateOrFlipPorts _rotatePortsCounterclockwise
An action that handles rotating the ports by 90 degrees.
-
-
Constructor Detail
-
ActorController
public ActorController(GraphController controller)
Create an entity controller associated with the specified graph controller with full access.- Parameters:
controller- The associated graph controller.
-
ActorController
public ActorController(GraphController controller, AttributeController.Access access)
Create an entity controller associated with the specified graph controller.- Parameters:
controller- The associated graph controller.access- The access level.
-
-
Method Detail
-
addMenuItemFactory
public void addMenuItemFactory(MenuItemFactory menuItemFactory)
If access is FULL, then add the jni.ArgumentDailogFactory() to _menuFactory. If access is not FULL, then do nothing.- Parameters:
menuItemFactory- The MenuItemFactory to be added.
-
addHotKeys
public void addHotKeys(JGraph jgraph)
Add hot keys to the actions in the given JGraph. It would be better that this method was added higher in the hierarchy. Now most controllers- Overrides:
addHotKeysin classAttributeController- Parameters:
jgraph- The JGraph to which hot keys are to be added.
-
setConfiguration
public void setConfiguration(Configuration configuration)
Set the configuration. This is used to open documentation files.- Overrides:
setConfigurationin classAttributeController- Parameters:
configuration- The configuration.
-
_getComponentType
protected java.lang.String _getComponentType()
Get the class label of the component.- Overrides:
_getComponentTypein classAttributeController- Returns:
- the class label of the component.
-
-