Package ptolemy.vergil.ptera
Class OctagonEventIcon
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.vergil.icon.EditorIcon
-
- ptolemy.vergil.icon.NameIcon
-
- ptolemy.vergil.ptera.OctagonEventIcon
-
- All Implemented Interfaces:
java.lang.Cloneable
,Changeable
,Debuggable
,DebugListener
,Derivable
,IconAttribute
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class OctagonEventIcon extends NameIcon
An octagonal icon for a Ptera event.- Since:
- Ptolemy II 8.0
- Version:
- $Id$
- Author:
- Thomas Huining Feng
- Pt.AcceptedRating:
- Red (tfeng)
- Pt.ProposedRating:
- Red (tfeng)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected double
_cornerWidth
The width of a corner of a polygon.-
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 OctagonEventIcon(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 java.awt.geom.Point2D
_getBackgroundSize()
Return the background size.protected java.awt.Paint
_getFill()
Return the paint to use to fill the icon.protected float
_getLineWidth()
Return the line width to use in rendering the box.Figure
createBackgroundFigure()
Create a background Figure.Figure
createFigure()
Create a Figure.javax.swing.Icon
createIcon()
Create an icon.-
Methods inherited from class ptolemy.vergil.icon.NameIcon
_getLabel, attributeChanged, 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
-
-
-
-
Constructor Detail
-
OctagonEventIcon
public OctagonEventIcon(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.
-
-
Method Detail
-
createBackgroundFigure
public Figure createBackgroundFigure()
Create a background Figure.- Overrides:
createBackgroundFigure
in classNameIcon
- Returns:
- The figure.
-
createFigure
public Figure createFigure()
Create a Figure.- Overrides:
createFigure
in classNameIcon
- Returns:
- The figure.
-
createIcon
public javax.swing.Icon createIcon()
Create an icon.- Overrides:
createIcon
in classNameIcon
- Returns:
- The icon.
-
_getBackgroundSize
protected java.awt.geom.Point2D _getBackgroundSize()
Description copied from class:NameIcon
Return the background size.- Overrides:
_getBackgroundSize
in classNameIcon
- Returns:
- the background size.
-
_getFill
protected java.awt.Paint _getFill()
Description copied from class:NameIcon
Return the paint to use to fill the icon. This base class returns the value of the color attribute.
-
_getLineWidth
protected float _getLineWidth()
Return the line width to use in rendering the box. This returns 1.0f, unless the container is an instance of State and its isInitialState parameter is set to true.- Overrides:
_getLineWidth
in classNameIcon
- Returns:
- The line width to use in rendering the box.
-
-