Package ptolemy.vergil.ontologies
Class MultipleConceptIcon
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.vergil.icon.EditorIcon
-
- ptolemy.vergil.icon.NameIcon
-
- ptolemy.vergil.ontologies.ConceptIcon
-
- ptolemy.vergil.ontologies.MultipleConceptIcon
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,IconAttribute
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class MultipleConceptIcon extends ConceptIcon
An icon that displays multiple concepts, in a set of rounded boxes, with the uppermost box containing the name of the set of concepts. This is designed to be used within an instance ofFlatTokenRepresentativeConcept
.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Ben Lickly, Edward A. Lee, Elizabeth Latronico, Charles Shelton
- Pt.AcceptedRating:
- Red (blickly)
- Pt.ProposedRating:
- Red (blickly)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
translation
The amount of translation to apply to the background figure.-
Fields inherited from class ptolemy.vergil.icon.NameIcon
_labelFont, _roundingValue, _spacingValue, _xPadding, _yPadding, color, rounding, spacing
-
Fields inherited from class ptolemy.vergil.icon.EditorIcon
_containerToBe, _iconCache
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
-
Constructor Summary
Constructors Constructor Description MultipleConceptIcon(NamedObj container, java.lang.String name)
Create a new icon with the given name in the given container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected LabelFigure
_getLabel(CompositeFigure background, java.lang.String name)
Get the label to put on the specified background figure based on the specified name.Figure
createBackgroundFigure()
Create a new background figure.javax.swing.Icon
createIcon()
Create an icon.-
Methods inherited from class ptolemy.vergil.ontologies.ConceptIcon
_getFill, _getLineWidth
-
Methods inherited from class ptolemy.vergil.icon.NameIcon
_getBackgroundSize, attributeChanged, createFigure, setContainer
-
Methods inherited from class ptolemy.vergil.icon.EditorIcon
_createDefaultBackgroundFigure, _isPropertySet, _recreateFigure, clone, getContainerOrContainerToBe, setContainerToBe
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, 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, toString, uniqueName, validateSettables, workspace
-
-
-
-
Field Detail
-
translation
public Parameter translation
The amount of translation to apply to the background figure. This is a double that defaults to 10.0.
-
-
Constructor Detail
-
MultipleConceptIcon
public MultipleConceptIcon(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 specified container.name
- The specified name.- 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.
-
-
Method Detail
-
createBackgroundFigure
public Figure createBackgroundFigure()
Create a new background figure. This overrides the base class to draw a set of backgrounds.- Overrides:
createBackgroundFigure
in classNameIcon
- Returns:
- A new figure.
-
createIcon
public javax.swing.Icon createIcon()
Create an icon. This overrides the base class to draw a set of boxes to represent multiple concepts.- Overrides:
createIcon
in classNameIcon
- Returns:
- The icon.
-
_getLabel
protected LabelFigure _getLabel(CompositeFigure background, java.lang.String name)
Get the label to put on the specified background figure based on the specified name.
-
-