public class XMLIcon extends DynamicEditorIcon implements ValueListener
The XML schema used in the "_iconDescription" and "_smallIconDescription" attributes is SVG (scalable vector graphics), although currently Diva only supports a small subset of SVG.
| Red (johnr) |
| Yellow (neuendor) |
NamedObj.ContainedObjectsIterator_figures_containerToBe, _iconCache_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS| Constructor and Description |
|---|
XMLIcon(NamedObj container,
java.lang.String name)
Create a new icon with the given name in the given container.
|
XMLIcon(Workspace workspace,
java.lang.String name)
Construct an icon in the specified workspace and name.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
_description(int detail,
int indent,
int bracket)
Return a description of the object.
|
protected void |
_recreateFigure()
Recreate the figure.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
Figure |
createBackgroundFigure()
Create a background figure based on this icon.
|
javax.swing.Icon |
createIcon()
Create a new Swing icon.
|
static XMLIcon |
getXMLIcon(NamedObj container,
java.lang.String name)
Instantiate an XMLIcon in a NamedObj.
|
static XMLIcon |
getXMLIcon(Workspace workspace,
java.lang.String name)
Instantiate an XMLIcon in a Workspace.
|
PaintedList |
paintedList()
Return the painted list contained by this icon.
|
java.lang.String |
toString()
Return a string representing this Icon.
|
void |
valueChanged(Settable settable)
React to the fact that the value of an attribute named
"_iconDescription" contained by the same container has changed
value by redrawing the figure.
|
_addLiveFigure, _liveFigureIterator, _trimLiveFigures_createDefaultBackgroundFigure, _isPropertySet, createFigure, getContainerOrContainerToBe, setContainerToBe_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _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, uniqueName, validateSettables, workspacepublic XMLIcon(Workspace workspace, java.lang.String name) throws IllegalActionException
workspace - The workspace that will list the attribute.name - The name of this attribute.IllegalActionException - If the specified name contains
a period.Increment the version number of the workspace.public XMLIcon(NamedObj container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container - The container for this attribute.name - The name of this attribute.IllegalActionException - If thrown by the parent
class or while setting an attribute.NameDuplicationException - If the name coincides with
an attribute already in the container.public static XMLIcon getXMLIcon(NamedObj container, java.lang.String name) throws NameDuplicationException, IllegalActionException
This method looks for the _alternateXMLIcon attribute in the configuration. If it is found, it returns an XMLIcon of the class found there, if not, it returns an instance of this class.
container - The container for this attribute.name - The name of this attribute.NameDuplicationException - If an object with
that name already exists in the container.IllegalActionException - If the specified name contains
a period.public static XMLIcon getXMLIcon(Workspace workspace, java.lang.String name) throws NameDuplicationException, IllegalActionException
This method looks for the _alternateXMLIcon attribute in the configuration. If it is found, it returns an XMLIcon of the class found there, if not, it returns an instance of this class.
workspace - The workspace that will list the attribute.name - The name of this attribute.NameDuplicationException - If an object with
that name already exists in the container.IllegalActionException - If the specified name contains
a period.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone in class DynamicEditorIconworkspace - The workspace for the cloned object.java.lang.CloneNotSupportedException - Not thrown in this base classNamedObj.exportMoML(Writer, int, String),
NamedObj.setDeferringChangeRequests(boolean)public Figure createBackgroundFigure()
createBackgroundFigure in class EditorIconpublic javax.swing.Icon createIcon()
createIcon in class EditorIconpublic PaintedList paintedList()
public java.lang.String toString()
public void valueChanged(Settable settable)
valueChanged in interface ValueListenersettable - The object that has changed value.protected java.lang.String _description(int detail,
int indent,
int bracket)
throws IllegalActionException
_description in class NamedObjdetail - The level of detail.indent - The amount of indenting.bracket - The number of surrounding brackets (0, 1, or 2).IllegalActionExceptionprotected void _recreateFigure()
_recreateFigure in class EditorIcon