public class DecoratorAttributes extends Attribute
NamedObj.getDecoratorAttribute(Decorator,String)
or
NamedObj.getDecoratorAttributes(Decorator)
.NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected Decorator |
_decorator
The decorator.
|
StringAttribute |
decoratorName
The name of the decorator relative to the top-level of
the model, to be stored in a MoML file
to re-establish the connection with a decorator after saving
and re-parsing the file.
|
_attributes, _changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
DecoratorAttributes(NamedObj container,
Decorator decorator)
Construct a DecoratorAttributes instance to contain the
decorator parameter for the specified container provided
by the specified decorator.
|
DecoratorAttributes(NamedObj container,
java.lang.String name)
Construct a DecoratorAttributes instance with the given name
and container.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
Override the base class to establish a link to the decorator
if the argument is decoratorName.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
void |
exportMoML(java.io.Writer output,
int depth,
java.lang.String name)
Override the base class to first set the decoratorName attribute
to the current name of the associated decorator, and then export
using the superclass.
|
Decorator |
getDecorator()
Return the decorator that is responsible for this DecoratorAttributes instance.
|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
_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, 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, toString, uniqueName, validateSettables, workspace
public StringAttribute decoratorName
protected Decorator _decorator
public DecoratorAttributes(NamedObj container, Decorator decorator) throws IllegalActionException, NameDuplicationException
container
- The target for the decorator.decorator
- The decorator.IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.NameDuplicationException
- If the name coincides with
an attribute already in the container. This should not occur.public DecoratorAttributes(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
decoratorName
parameter.container
- The container of this object.name
- The name of this attribute.IllegalActionException
- If the attribute is not of an
acceptable class for the container, or if the name contains a period.NameDuplicationException
- If the name coincides with
an attribute already in the container.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.IllegalActionException
- If the change is not acceptable
to this container (not thrown in this base class).public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class Attribute
workspace
- The workspace for the cloned object.java.lang.CloneNotSupportedException
- Not thrown in this base classNamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void exportMoML(java.io.Writer output, int depth, java.lang.String name) throws java.io.IOException
exportMoML
in interface MoMLExportable
exportMoML
in class NamedObj
output
- The output stream to write to.depth
- The depth in the hierarchy, to determine indenting.name
- The name of we use when exporting the description.java.io.IOException
- If an I/O error occurs.NamedObj.exportMoML(Writer, int)
public Decorator getDecorator() throws IllegalActionException
IllegalActionException
- If the decorator cannot be determined
(e.g., a parameter cannot be evaluated).