Package ptolemy.domains.ptera.lib
Class TableauParameter
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.kernel.util.AbstractSettableAttribute
-
- ptolemy.data.expr.Variable
-
- ptolemy.data.expr.Parameter
-
- ptolemy.domains.ptera.lib.TableauParameter
-
- All Implemented Interfaces:
java.lang.Cloneable
,Initializable
,HasTypeConstraints
,Typeable
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
,Settable
,ValueListener
- Direct Known Subclasses:
DebuggerParameter
public class TableauParameter extends Parameter implements Initializable
A parameter to encapsulate a tableau. The tableau can be used by different events for user interaction.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- See Also:
Report
,SetTableau
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Yellow (tfeng)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.data.expr.Variable
Variable.CircularDependencyError, Variable.VariableScope
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
Nested classes/interfaces inherited from interface ptolemy.kernel.util.Settable
Settable.Visibility
-
-
Field Summary
-
Fields inherited from class ptolemy.data.expr.Variable
_currentExpression, _needsEvaluation, _parserScope, _parseTreeValid, _suppressVariableSubstitution, _valueListeners
-
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
-
Fields inherited from interface ptolemy.kernel.util.Settable
EXPERT, FULL, NONE, NOT_EDITABLE
-
-
Constructor Summary
Constructors Constructor Description TableauParameter(NamedObj container, java.lang.String name)
Construct a parameter with the given name contained by the specified entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInitializable(Initializable initializable)
Not implemented.java.lang.Object
clone(Workspace workspace)
Clone the variable.java.lang.String
getExpression()
Return an empty string because a tableau cannot be specified with an expression.void
initialize()
Initialize the tableau with null and close any existing tableau.void
preinitialize()
Do nothing.void
removeInitializable(Initializable initializable)
Not implemented.void
setContainer(NamedObj container)
Specify the container, and add this variable to the list of attributes in the container.void
setExpression(java.lang.String expression)
Do nothing because a tableau cannot be specified with an exception.void
wrapup()
Do nothing.-
Methods inherited from class ptolemy.data.expr.Parameter
addChoice, exportMoML, getChoices, removeAllChoices, removeChoice
-
Methods inherited from class ptolemy.data.expr.Variable
_description, _evaluate, _getCurrentExpression, _notifyValueListeners, _parseIfNecessary, _propagate, _propagateToValueListeners, _propagateValue, _setToken, _setTokenAndNotify, addValueListener, attributeChanged, getDeclaredType, getFreeIdentifiers, getParserScope, getScope, getScope, getToken, getType, getTypeTerm, getValueAsString, getVariable, getVisibility, invalidate, isKnown, isLazy, isStringMode, isSuppressVariableSubstitution, isTypeAcceptable, removeValueListener, reset, setLazy, setName, setParseTreeEvaluator, setStringMode, setSuppressVariableSubstitution, setToken, setToken, setTypeAtLeast, setTypeAtLeast, setTypeAtMost, setTypeEquals, setTypeSameAs, setUnknown, setValueListenerAsWeakDependency, setVisibility, stringRepresentation, toString, typeConstraintList, typeConstraints, validate, valueChanged
-
Methods inherited from class ptolemy.kernel.util.AbstractSettableAttribute
getDefaultExpression
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, 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, uniqueName, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getFullName, getName, getName
-
Methods inherited from interface ptolemy.kernel.util.Settable
getDisplayName
-
-
-
-
Constructor Detail
-
TableauParameter
public TableauParameter(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct a parameter with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This parameter will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. The object is not added to the list of objects in the workspace unless the container is null. Increment the version of the workspace.- Parameters:
container
- The container.name
- The name of the parameter.- Throws:
IllegalActionException
- If the parameter is not of an acceptable class for the container.NameDuplicationException
- If the name coincides with a parameter already in the container.
-
-
Method Detail
-
addInitializable
public void addInitializable(Initializable initializable)
Not implemented. Do nothing.- Specified by:
addInitializable
in interfaceInitializable
- Parameters:
initializable
- The initializable.- See Also:
Initializable.removeInitializable(Initializable)
-
clone
public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
Clone the variable. This creates a new variable containing the same token (if the value was set with setToken()) or the same (unevaluated) expression, if the expression was set with setExpression(). The list of variables added to the scope is not cloned; i.e., the clone has an empty scope. The clone has the same static type constraints (those given by setTypeEquals() and setTypeAtMost()), but none of the dynamic type constraints (those relative to other variables).
-
getExpression
public java.lang.String getExpression()
Return an empty string because a tableau cannot be specified with an expression.- Specified by:
getExpression
in interfaceSettable
- Overrides:
getExpression
in classVariable
- Returns:
- An empty string.
- See Also:
setExpression(String)
-
initialize
public void initialize() throws IllegalActionException
Initialize the tableau with null and close any existing tableau.- Specified by:
initialize
in interfaceInitializable
- Throws:
IllegalActionException
- If the existing tableau cannot be retrieved.
-
preinitialize
public void preinitialize() throws IllegalActionException
Do nothing.- Specified by:
preinitialize
in interfaceInitializable
- Throws:
IllegalActionException
- Not thrown in this class.
-
removeInitializable
public void removeInitializable(Initializable initializable)
Not implemented. Do nothing.- Specified by:
removeInitializable
in interfaceInitializable
- Parameters:
initializable
- The initializable.- See Also:
Initializable.addInitializable(Initializable)
-
setContainer
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
Specify the container, and add this variable to the list of attributes in the container. If this variable already has a container, remove this variable from the attribute list of the current container first. Otherwise, remove it from the directory of the workspace, if it is there. If the specified container is null, remove this variable from the list of attributes of the current container. If the specified container already contains an attribute with the same name, then throw an exception and do not make any changes. Similarly, if the container is not in the same workspace as this variable, throw an exception. If this variable is already contained by the specified container, do nothing.If this method results in a change of container (which it usually does), then remove this variable from the scope of any scope dependent of this variable.
This method is write-synchronized on the workspace and increments its version number.
- Overrides:
setContainer
in classVariable
- Parameters:
container
- The proposed container of this variable.- Throws:
IllegalActionException
- If the container will not accept a variable as its attribute, or this variable and the container are not in the same workspace, or the proposed container would result in recursive containment.NameDuplicationException
- If the container already has an attribute with the name of this variable.- See Also:
Attribute.getContainer()
-
setExpression
public void setExpression(java.lang.String expression)
Do nothing because a tableau cannot be specified with an exception.- Specified by:
setExpression
in interfaceSettable
- Overrides:
setExpression
in classVariable
- Parameters:
expression
- The expression.- See Also:
getExpression()
-
wrapup
public void wrapup() throws IllegalActionException
Do nothing.- Specified by:
wrapup
in interfaceInitializable
- Throws:
IllegalActionException
- Not thrown in this class.
-
-