ptolemy.vergil.basic
Class ContextMenuFactoryCreator

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.util.Attribute
          extended by ptolemy.vergil.basic.ContextMenuFactoryCreator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

public class ContextMenuFactoryCreator
extends Attribute

An object that can create a tableau for a model.

This class allows the configuration option "contextMenuFactory" to be passed via the moml configuration. A suitable MenuFactory is instantiated and returned by a call to the createContextMenuFactory() method.

Version:
$Id: ContextMenuFactoryCreator.java 47957 2008-01-26 02:51:33Z cxh $
Author:
Matthew Brooke
See Also:
Serialized Form
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
 
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
ContextMenuFactoryCreator(NamedObj container, java.lang.String name)
          Create a context menu factory with the given name and container.
 
Method Summary
 MenuFactory createContextMenuFactory(GraphController controller)
          Create the KeplerContextMenuFactory class and return it.
 
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, 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
 

Constructor Detail

ContextMenuFactoryCreator

public ContextMenuFactoryCreator(NamedObj container,
                                 java.lang.String name)
                          throws IllegalActionException,
                                 NameDuplicationException
Create a context menu factory with the given name and container.

Parameters:
container - The container.
name - The name.
Throws:
IllegalActionException - If the container is incompatible with this attribute.
NameDuplicationException - If the name coincides with an attribute already in the container.
Method Detail

createContextMenuFactory

public MenuFactory createContextMenuFactory(GraphController controller)
Create the KeplerContextMenuFactory class and return it.

Parameters:
controller - The GraphController in which to search for a ContextMenuFactoryCreate attribute.
Returns:
a KeplerContextMenuFactory