public class ShapeIcon extends DynamicEditorIcon
Red (johnr) |
Yellow (eal) |
NamedObj.ContainedObjectsIterator
_figures
_containerToBe, _iconCache
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
ShapeIcon(NamedObj container,
java.lang.String name)
Create a new icon with the given name in the given container.
|
ShapeIcon(NamedObj container,
java.lang.String name,
java.awt.Shape defaultShape)
Create a new icon with the given name in the given container
with the given default shape.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
Figure |
createBackgroundFigure()
Create a new default background figure, which is the shape set
by setShape, if it has been called, or a small box if not.
|
boolean |
isCentered()
Return whether the figure should be centered on its origin.
|
void |
setCentered(boolean centered)
Specify whether the figure should be centered or not.
|
void |
setDashArray(float[] dashArray)
Specify the dash array to use for rendering lines.
|
void |
setFillColor(java.awt.Color fillColor)
Specify the fill color to use.
|
void |
setLineColor(java.awt.Color lineColor)
Specify the line color to use.
|
void |
setLineWidth(float lineWidth)
Specify the line width to use.
|
void |
setShape(java.awt.Shape path)
Specify a path to display.
|
_addLiveFigure, _liveFigureIterator, _trimLiveFigures
_createDefaultBackgroundFigure, _isPropertySet, _recreateFigure, createFigure, createIcon, getContainerOrContainerToBe, setContainerToBe
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
_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, attributeChanged, 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
public ShapeIcon(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the attribute.IllegalActionException
- If the attribute is not of an
acceptable class for the container.NameDuplicationException
- If the name coincides with
an attribute already in the container.public ShapeIcon(NamedObj container, java.lang.String name, java.awt.Shape defaultShape) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of the attribute.defaultShape
- The default shape, which is ignored by this
constructor.IllegalActionException
- If the attribute is not of an
acceptable class for the container.NameDuplicationException
- If the name coincides with
an attribute already in the container.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class DynamicEditorIcon
workspace
- The workspace for the cloned object.java.lang.CloneNotSupportedException
- Not thrown in this base classNamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public Figure createBackgroundFigure()
createBackgroundFigure
in class EditorIcon
public boolean isCentered()
public void setCentered(boolean centered)
centered
- False to make the figure's origin at the
upper left.public void setDashArray(float[] dashArray)
dashArray
- The dash array.public void setFillColor(java.awt.Color fillColor)
fillColor
- The fill color to use.public void setLineColor(java.awt.Color lineColor)
lineColor
- The line color to use.public void setLineWidth(float lineWidth)
lineWidth
- The line width to use.public void setShape(java.awt.Shape path)
path
- The path to display.