ptolemy.vergil.icon
Class ValueIcon
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.ValueIcon
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable, ValueListener
public class ValueIcon
- extends XMLIcon
An icon that displays a bullet, the name, and, if the container is
an instance of settable, its value.
- Since:
- Ptolemy II 2.0
- Version:
- $Id: ValueIcon.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Edward A. Lee, Steve Neuendorffer
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Field Summary |
private static java.awt.Font |
_labelFont
|
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
ValueIcon(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.Attribute |
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, 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, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_labelFont
private static java.awt.Font _labelFont
ValueIcon
public ValueIcon(NamedObj container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
- Create a new icon with the given name in the given container.
The container is required to implement Settable, or an exception
will be thrown.
- Parameters:
container
- The container for this attribute.name
- The name of this attribute.
- Throws:
IllegalActionException
- If thrown by the parent
class or while setting an attribute.
NameDuplicationException
- If the name coincides with
an attribute already in the container.
createBackgroundFigure
public Figure createBackgroundFigure()
- Create a background figure based on this icon, which is a text
element with the name of the container, a colon, and its value.
- Overrides:
createBackgroundFigure
in class XMLIcon
- Returns:
- A figure for this icon.
createFigure
public Figure createFigure()
- Create a new Diva figure that visually represents this icon.
The figure will be an instance of LabelFigure that renders the
container name and value, separated by a colon.
- Overrides:
createFigure
in class EditorIcon
- Returns:
- A new CompositeFigure consisting of the label.
_createDefaultBackgroundFigure
protected Figure _createDefaultBackgroundFigure()
- Create a new default background figure, which is a bullet.
- Overrides:
_createDefaultBackgroundFigure
in class EditorIcon
- Returns:
- A figure representing a bullet.