ptolemy.vergil.icon
Class BoxedValueIcon

java.lang.Object
  extended byptolemy.kernel.util.NamedObj
      extended byptolemy.kernel.util.Attribute
          extended byptolemy.vergil.icon.EditorIcon
              extended byptolemy.vergil.icon.DynamicEditorIcon
                  extended byptolemy.vergil.icon.XMLIcon
                      extended byptolemy.vergil.icon.AttributeValueIcon
                          extended byptolemy.vergil.icon.BoxedValueIcon
All Implemented Interfaces:
Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable, ValueListener

public class BoxedValueIcon
extends AttributeValueIcon

An icon that displays the value of an attribute of the container in a box that resizes according to the width of the attribute value. The attribute is assumed to be an instance of Settable, and its name is given by the parameter attributeName.

Since:
Ptolemy II 2.0
Version:
$Id: BoxedValueIcon.java,v 1.14 2004/04/13 03:50:42 cxh Exp $
Author:
Edward A. Lee
See Also:
Serialized Form
Accepted Rating:
Red (johnr)
Proposed Rating:
Yellow (eal)

Nested Class Summary
 
Nested classes inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
 
Fields inherited from class ptolemy.vergil.icon.AttributeValueIcon
_labelFont, attributeName, displayWidth
 
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
BoxedValueIcon(NamedObj container, java.lang.String name)
          Create a new icon with the given name in the given container.
 
Method Summary
 Figure createBackgroundFigure()
          Create a new background figure.
 
Methods inherited from class ptolemy.vergil.icon.AttributeValueIcon
_displayString, createFigure
 
Methods inherited from class ptolemy.vergil.icon.XMLIcon
_description, _recreateFigure, clone, createIcon, paintedList, toString, valueChanged
 
Methods inherited from class ptolemy.vergil.icon.DynamicEditorIcon
_addLiveFigure, _liveFigureIterator, _trimLiveFigures
 
Methods inherited from class ptolemy.vergil.icon.EditorIcon
_createDefaultBackgroundFigure, exportMoML, getContainerOrContainerToBe, setContainerToBe
 
Methods inherited from class ptolemy.kernel.util.Attribute
_getContainedObject, _propagateExistence, getContainer, setContainer, setName
 
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
 

Constructor Detail

BoxedValueIcon

public BoxedValueIcon(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.
Method Detail

createBackgroundFigure

public Figure createBackgroundFigure()
Create a new background figure. This overrides the base class to draw a box around the value display, where the width of the box depends on the value.

Overrides:
createBackgroundFigure in class XMLIcon
Returns:
A new figure.