ptolemy.vergil.icon
Class CopyCatIcon
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.vergil.icon.EditorIcon
ptolemy.vergil.icon.DynamicEditorIcon
ptolemy.vergil.icon.XMLIcon
ptolemy.vergil.icon.CopyCatIcon
- All Implemented Interfaces:
- Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable, ValueListener
- public class CopyCatIcon
- extends XMLIcon
This is an icon that copies the icon of the last entity contained by
the same container, if there is one, and behaves like the base class
if not.
- Since:
- Ptolemy II 4.0
- Version:
- $Id: CopyCatIcon.java,v 1.11 2004/04/13 03:50:46 cxh Exp $
- Author:
- Edward A. Lee
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
|
Constructor Summary |
CopyCatIcon(NamedObj container,
java.lang.String name)
Create a new icon with the given name in the given container. |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, uniqueName, validateSettables, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CopyCatIcon
public CopyCatIcon(NamedObj container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Create a new icon with the given name in the given container.
- Parameters:
container - The container.name - The name of the attribute.
- Throws:
IllegalActionException - If the attribute is not of an
acceptable class for the container.
NameDuplicationException - If the name coincides with
an attribute already in the container.
clone
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
- Clone the object into the specified workspace. The new object is
not added to the directory of that workspace (you must do this
yourself if you want it there).
The result is an object with no container.
- Overrides:
clone in class XMLIcon
- Parameters:
workspace - The workspace for the cloned object.
- Returns:
- The new Attribute.
- Throws:
java.lang.CloneNotSupportedException - Not thrown in this base class
createBackgroundFigure
public Figure createBackgroundFigure()
- Create a new background figure. This method looks for entities
contained by the same container, and if there are any, copies
the icon of the last such entity. If there are none, then it
behaves like the base class.
- Overrides:
createBackgroundFigure in class XMLIcon
- Returns:
- A new figure.