Package ptolemy.kernel.util
Class TransientSingletonConfigurableAttribute
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.kernel.util.ConfigurableAttribute
-
- ptolemy.kernel.util.TransientSingletonConfigurableAttribute
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Configurable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
,Settable
,Singleton
@Deprecated public class TransientSingletonConfigurableAttribute extends ConfigurableAttribute implements Singleton
Deprecated.Use SingletonConfigurableAttribute instead with setPersistent(false).This class is a nonpersistent configurable singleton attribute. By "nonpersistent" we mean that it does not export MoML. A major application of this class is to define a default icon description. An icon description is XML code in the SVG (scalable vector graphics) schema, set in a configure element in MoML.- Since:
- Ptolemy II 1.0
- Version:
- $Id$
- Author:
- Steve Neuendorffer and Edward A. Lee
- Pt.AcceptedRating:
- Green (bilung)
- Pt.ProposedRating:
- Green (eal)
-
-
Nested Class Summary
-
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.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 TransientSingletonConfigurableAttribute()
Deprecated.Construct a new attribute with no container and an empty string as its name.TransientSingletonConfigurableAttribute(NamedObj container, java.lang.String name)
Deprecated.Construct an attribute with the given container and name.TransientSingletonConfigurableAttribute(Workspace workspace)
Deprecated.Construct a new attribute with no container and an empty string as a name.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
setContainer(NamedObj container)
Deprecated.Remove any previous attribute in the container that has the same name as this attribute, and then call the base class method to set the container.-
Methods inherited from class ptolemy.kernel.util.ConfigurableAttribute
_exportMoMLContents, _propagateValue, addValueListener, clone, configure, getBase, getConfigureSource, getConfigureText, getDefaultExpression, getExpression, getValueAsString, getVisibility, removeValueListener, setExpression, setVisibility, validate, value
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _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
-
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, setName
-
Methods inherited from interface ptolemy.kernel.util.Settable
getDisplayName
-
-
-
-
Constructor Detail
-
TransientSingletonConfigurableAttribute
public TransientSingletonConfigurableAttribute()
Deprecated.Construct a new attribute with no container and an empty string as its name. Add the attribute to the workspace directory. Increment the version number of the workspace.
-
TransientSingletonConfigurableAttribute
public TransientSingletonConfigurableAttribute(Workspace workspace)
Deprecated.Construct a new attribute with no container and an empty string as a name. You can then change the name with setName(). If the workspace argument is null, then use the default workspace. Add the attribute to the workspace directory. Increment the version number of the workspace.- Parameters:
workspace
- The workspace that will list the attribute.
-
TransientSingletonConfigurableAttribute
public TransientSingletonConfigurableAttribute(NamedObj container, java.lang.String name) throws NameDuplicationException, IllegalActionException
Deprecated.Construct an attribute with the given container and name. If an attribute already exists with the same name as the one specified here, and of class SingletonConfigurableAttribute, then that attribute is removed before this one is inserted in the container.- Parameters:
container
- The container.name
- The name of this attribute.- Throws:
IllegalActionException
- If the attribute cannot be contained by the proposed container.NameDuplicationException
- If the container already has an attribute with this name, and the class of that container is not SingletonConfigurableAttribute.
-
-
Method Detail
-
setContainer
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
Deprecated.Remove any previous attribute in the container that has the same name as this attribute, and then call the base class method to set the container. If the container is not in the same workspace as this attribute, throw an exception. If this attribute is already contained by the NamedObj, do nothing. If the attribute already has a container, remove this attribute from its attribute list first. Otherwise, remove it from the directory of the workspace, if it is there. If the argument is null, then remove this attribute from its container. It is not added to the workspace directory, so this could result in this object being garbage collected.Note that since an Attribute is a NamedObj, it can itself have attributes. However, recursive containment is not allowed, where an attribute is an attribute of itself, or indirectly of any attribute it contains.
This method is write-synchronized on the workspace and increments its version number.
- Overrides:
setContainer
in classAttribute
- Parameters:
container
- The container to attach this attribute to.- Throws:
IllegalActionException
- If this attribute is not of the expected class for the container, or it has no name, or the attribute and 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 attribute that is of class SingletonConfigurableAttribute.- See Also:
Attribute.getContainer()
-
-