ptolemy.vergil.basic
Class NodeControllerFactory
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.kernel.util.SingletonAttribute
ptolemy.vergil.basic.NodeControllerFactory
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable, Singleton
- Direct Known Subclasses:
- DependencyHighlighter, HierarchicalModeControllerFactory, HierarchicalStateControllerFactory, HierarchicalStateControllerFactory, ResizableAttributeControllerFactory, StateMatcherController.Factory, TransformationAttributeController.Factory, TransformEventController.Factory
public class NodeControllerFactory
- extends SingletonAttribute
This is an attribute that produces a custom node controller.
This base class produces a node controller that offers only a
configure command in the context menu, and invokes a dialog to
edit parameters in response to that command. It does this by
returning an instance of IconController
in its create() method. Derived classes can override this
base class to put whatever they want in the context menu,
invoking whatever dialogs are appropriate.
To use this class, just insert it as an attribute inside
any Ptolemy II object, and then right clicking on the icon for
that object will result in the use of the controller specified
here. The instance by convention will be named "_controllerFactory",
but the only reason to enforce this is that only the first such
controller factory found as an attribute will be used.
It is a singleton, so placing it any container will replace any
previous controller factory with the same name.
- Since:
- Ptolemy II 2.0
- Version:
- $Id: NodeControllerFactory.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Edward A. Lee
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
NodeControllerFactory(NamedObj container,
java.lang.String name)
Construct a new attribute with the given container and name. |
Methods inherited from class ptolemy.kernel.util.Attribute |
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NodeControllerFactory
public NodeControllerFactory(NamedObj container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
- Construct a new attribute with the given container and name.
- Parameters:
container
- The container.name
- The name.
- Throws:
IllegalActionException
- If the attribute cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
attribute with this name.
create
public NamedObjController create(GraphController controller)
- Return a new node controller. This base class returns an
instance of IconController. Derived
classes can return some other class to customize the
context menu.
- Parameters:
controller
- The associated graph controller.
- Returns:
- A new node controller.