ptolemy.vergil.gt
Class TransformationAttributeIcon

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.util.Attribute
          extended by ptolemy.vergil.icon.EditorIcon
              extended by ptolemy.vergil.gt.TransformationAttributeIcon
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

public class TransformationAttributeIcon
extends EditorIcon

Since:
Ptolemy II 8.0
Version:
$Id: TransformationAttributeIcon.java 57044 2010-01-27 22:41:05Z cxh $
Author:
Thomas Huining Feng
See Also:
Serialized Form
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Nested Class Summary
 
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
private static java.awt.Color _BACKGROUND_COLOR
           
private static java.awt.Font _LABEL_FONT
           
 
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, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Constructor Summary
TransformationAttributeIcon(NamedObj container, java.lang.String name)
           
 
Method Summary
 Figure createBackgroundFigure()
          Create a new background figure.
 Figure createFigure()
          Create a new Diva figure that visually represents this icon.
 
Methods inherited from class ptolemy.vergil.icon.EditorIcon
_createDefaultBackgroundFigure, _isPropertySet, _recreateFigure, clone, createIcon, getContainerOrContainerToBe, setContainerToBe
 
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, _description, _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, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_BACKGROUND_COLOR

private static final java.awt.Color _BACKGROUND_COLOR

_LABEL_FONT

private static final java.awt.Font _LABEL_FONT
Constructor Detail

TransformationAttributeIcon

public TransformationAttributeIcon(NamedObj container,
                                   java.lang.String name)
                            throws NameDuplicationException,
                                   IllegalActionException
Parameters:
container -
name -
Throws:
NameDuplicationException
IllegalActionException
Method Detail

createBackgroundFigure

public Figure createBackgroundFigure()
Description copied from class: EditorIcon
Create a new background figure. This figure is a composition of the figures of any contained visible attributes. If there are no such visible attributes, then this figure is a simple white box. If you override this method, keep in mind that this method is expected to manufacture a new figure each time, since figures are inexpensive and contain their own location and transformations. This method should never return null.

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

createFigure

public Figure createFigure()
Description copied from class: EditorIcon
Create a new Diva figure that visually represents this icon. The figure will be an instance of CompositeFigure with the figure returned by createBackgroundFigure() as its background. This method adds a LabelFigure to the CompositeFigure that contains the name of the container of this icon, unless the container has a parameter called "_hideName" with value true. If the container has an attribute called "_centerName" with value true, then the name is rendered in the center of the background figure, rather than above it. This method should never return null, even if the icon has not been properly initialized.

Overrides:
createFigure in class EditorIcon
Returns:
A new CompositeFigure consisting of the background figure and a label.