Package ptolemy.actor.gui
Class LevelSkippingTableauFactory
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.gui.TableauFactory
-
- ptolemy.actor.gui.LevelSkippingTableauFactory
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Configurable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class LevelSkippingTableauFactory extends TableauFactory
This class is an attribute that creates a tableau to view an object contained by the model associated with the specified effigy. When a model is opened, this object looks for a contained entity with the name given by entityName, or looks for the first contained entity if no name is given, and opens that entity rather than the model associated with the specified effigy.- Since:
- Ptolemy II 1.0
- Version:
- $Id$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Red (eal)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description StringParameter
entityName
The name of the contained entity to open, or an empty string to just open the first one found.-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description LevelSkippingTableauFactory(NamedObj container, java.lang.String name)
Create a factory with the given name and container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tableau
createTableau(Effigy effigy)
Create a tableau for the specified effigy by identifying an object contained by the specified effigy as given by entityName, or the first entity contained by that object if no entityName is given.-
Methods inherited from class ptolemy.actor.gui.TableauFactory
_configureTableau, configure, getConfigureSource, getConfigureText
-
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, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, 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, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
-
-
-
-
Field Detail
-
entityName
public StringParameter entityName
The name of the contained entity to open, or an empty string to just open the first one found. This is a string that defaults to empty.
-
-
Constructor Detail
-
LevelSkippingTableauFactory
public LevelSkippingTableauFactory(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Create a 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
-
createTableau
public Tableau createTableau(Effigy effigy) throws java.lang.Exception
Create a tableau for the specified effigy by identifying an object contained by the specified effigy as given by entityName, or the first entity contained by that object if no entityName is given. If the specified effigy is not an instance of PtolemyEffigy, this simply return null. If the model associated with the effigy does not contain the specified entity, then also return null.- Overrides:
createTableau
in classTableauFactory
- Parameters:
effigy
- The model effigy.- Returns:
- A tableau for the effigy, or null if one cannot be created.
- Throws:
java.lang.Exception
- If the factory should be able to create a Tableau for the effigy, but something goes wrong.
-
-