|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.vergil.icon.EditorIcon
ptolemy.vergil.icon.DynamicEditorIcon
ptolemy.vergil.icon.TextIcon
public class TextIcon
An icon that displays specified text.
| Red (johnr) |
| Yellow (eal) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
|---|
NamedObj.ContainedObjectsIterator |
| Field Summary | |
|---|---|
private int |
_anchor
|
private java.lang.String |
_DEFAULT_TEXT
|
private java.awt.Font |
_font
|
private java.lang.String |
_iconText
|
private java.lang.String |
_text
|
private java.awt.Color |
_textColor
|
| 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 | |
|---|---|
TextIcon(NamedObj container,
java.lang.String name)
Create a new icon with the given name in the given container. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace. |
Figure |
createBackgroundFigure()
Create a new default background figure, which is the text set by setText, if it has been called, or default text if not. |
javax.swing.Icon |
createIcon()
Create a new Swing icon. |
void |
setAnchor(int anchor)
Specify origin of the text. |
void |
setFont(java.awt.Font font)
Specify the font to use. |
void |
setIconText(java.lang.String text)
Specify the text to display in the icon. |
void |
setText(java.lang.String text)
Specify text to display. |
void |
setTextColor(java.awt.Color textColor)
Specify the text color to use. |
| Methods inherited from class ptolemy.vergil.icon.DynamicEditorIcon |
|---|
_addLiveFigure, _liveFigureIterator, _trimLiveFigures |
| Methods inherited from class ptolemy.vergil.icon.EditorIcon |
|---|
_createDefaultBackgroundFigure, _isPropertySet, _recreateFigure, createFigure, 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 java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String _DEFAULT_TEXT
private int _anchor
private java.awt.Font _font
private java.lang.String _iconText
private java.lang.String _text
private java.awt.Color _textColor
| Constructor Detail |
|---|
public TextIcon(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.| Method Detail |
|---|
public java.lang.Object clone(Workspace workspace)
throws java.lang.CloneNotSupportedException
clone in class DynamicEditorIconworkspace - 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 EditorIconpublic javax.swing.Icon createIcon()
createIcon in class EditorIconsetIconText(String)public void setAnchor(int anchor)
SwingConstants.
anchor - The anchor of the text.public void setFont(java.awt.Font font)
font - The font to use.public void setIconText(java.lang.String text)
text - The text to display in the icon.public void setText(java.lang.String text)
text - The text to display.public void setTextColor(java.awt.Color textColor)
textColor - The fill color to use.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||