|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.vergil.icon.EditorIcon
ptolemy.vergil.icon.DynamicEditorIcon
ptolemy.vergil.icon.XMLIcon
An icon is a visual representation of an entity. Three such visual representations are supported here. A background figure is returned by the createBackgroundFigure() method. This figure is specified by an attribute named "_iconDescription" of the container, if there is one. If there is no such attribute, then a default icon is used. The createFigure() method returns this same background figure, but decorated with a label giving the name of the container, unless the container contains an attribute named "_hideName". The createIcon() method returns a Swing icon given by an attribute named "_smallIconDescription", if there is one. If there is no such attribute, then the icon is simply a small representation of the background figure.
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) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Field Summary |
| Fields inherited from class ptolemy.vergil.icon.EditorIcon |
_containerToBe, _iconCache |
| 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 | |
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. |
|
| Method Summary | |
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. |
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. |
| Methods inherited from class ptolemy.vergil.icon.DynamicEditorIcon |
_addLiveFigure, _liveFigureIterator, _trimLiveFigures |
| Methods inherited from class ptolemy.vergil.icon.EditorIcon |
_createDefaultBackgroundFigure, createFigure, exportMoML, getContainerOrContainerToBe, setContainerToBe |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, getContainer, setContainer, setName |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public XMLIcon(Workspace workspace,
java.lang.String name)
throws IllegalActionException
workspace - The workspace that will list the 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.| Method Detail |
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 classpublic Figure createBackgroundFigure()
createBackgroundFigure in class EditorIconpublic javax.swing.Icon createIcon()
createIcon in class EditorIconpublic PaintedList paintedList()
public java.lang.String toString()
toString in class NamedObjpublic 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)
_description in class NamedObjindent - The amount of indenting.bracket - The number of surrounding brackets (0, 1, or 2).detail - The level of detail.
protected void _recreateFigure()
_recreateFigure in class EditorIcon
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||