Public Member Functions | |
| TextIcon (String _text, Component c) | |
Creates a new icon with text _text. | |
| TextIcon (String _text, Component c, Color col) | |
Creates a new icon with text _text. | |
| void | setColor (Color col) |
| Sets the icon's color. | |
| Color | getColor () |
| Returns the icon's color. | |
| void | setText (String _text) |
| Sets the icon's label (text). | |
| String | getText () |
| Returns the icon's label. | |
| void | setFontRenderContext (FontRenderContext frc) |
| Sets the icon's font render context. | |
| void | setFontRenderContext (Component c) |
Sets the icon's font render context to be that of component c. | |
| FontRenderContext | getFontRenderContext () |
| Return's the icon's font render context. | |
| void | paintIcon (Component c, Graphics g, int x, int y) |
| Renders the icon. | |
| int | getIconWidth () |
| Returns the icon's width. | |
| int | getIconHeight () |
| Returns the icon's height. | |
Package Attributes | |
| String | text = null |
| boolean | border = true |
| Font | font = null |
| FontRenderContext | fontRenderContext = null |
| Color | color = Color.black |
| boolean | initialized = false |
| int | width = -1 |
| int | height = -1 |
Private Member Functions | |
| void | checkChange () |
| Checks whether changes in the icon's parameter may still be made. | |
| void | init () |
| Initialises the icon. | |
Definition at line 8 of file TextIcon.java.
|
||||||||||||
|
Creates a new icon with text
The font render context is taken from component
Definition at line 25 of file TextIcon.java. References setFontRenderContext(), and setText(). |
|
||||||||||||||||
|
Creates a new icon with text
The font render context is taken from component
Definition at line 38 of file TextIcon.java. References setColor(), setFontRenderContext(), and setText(). |
|
|
Checks whether changes in the icon's parameter may still be made. Any changes which may affect the icon's size are not allowed after first displaying the icon.
Definition at line 91 of file TextIcon.java. References initialized. Referenced by setFontRenderContext(), and setText(). |
|
|
Returns the icon's color.
Definition at line 51 of file TextIcon.java. References color. |
|
|
Return's the icon's font render context.
Definition at line 82 of file TextIcon.java. References fontRenderContext. |
|
|
Returns the icon's height. After this, no changes in the icon's parameters affecting the size of the icon may be made any more.
Definition at line 144 of file TextIcon.java. |
|
|
Returns the icon's width. After this, no changes in the icon's parameters affecting the size of the icon may be made any more.
Definition at line 135 of file TextIcon.java. |
|
|
Returns the icon's label.
Definition at line 63 of file TextIcon.java. References text. |
|
|
Initialises the icon. After this, no changes in the icon's parameters affecting the size of the icon may be made any more. Definition at line 100 of file TextIcon.java. References font, fontRenderContext, height, initialized, text, and width. Referenced by getIconHeight(), getIconWidth(), and paintIcon(). |
|
||||||||||||||||||||
|
Renders the icon. After this, no changes in the icon's parameters affecting the size of the icon may be made any more. Definition at line 117 of file TextIcon.java. References border, color, font, height, init(), paintIcon(), text, and width. Referenced by paintIcon(). |
|
|
Sets the icon's color.
Definition at line 47 of file TextIcon.java. References color, and setColor(). Referenced by setColor(), and TextIcon(). |
|
|
Sets the icon's font render context to be that of component You may not change the font render context after displaying the icon.
Definition at line 77 of file TextIcon.java. |
|
|
Sets the icon's font render context. You may not change the font render context after displaying the icon.
Definition at line 69 of file TextIcon.java. References checkChange(), fontRenderContext, and setFontRenderContext(). Referenced by setFontRenderContext(), and TextIcon(). |
|
|
Sets the icon's label (text). You may not change the label after displaying the icon.
Definition at line 57 of file TextIcon.java. References checkChange(), setText(), and text. Referenced by setText(), and TextIcon(). |
|
|
Definition at line 10 of file TextIcon.java. Referenced by paintIcon(). |
|
|
Definition at line 13 of file TextIcon.java. Referenced by getColor(), paintIcon(), and setColor(). |
|
|
Definition at line 11 of file TextIcon.java. Referenced by init(), and paintIcon(). |
|
|
Definition at line 12 of file TextIcon.java. Referenced by getFontRenderContext(), init(), and setFontRenderContext(). |
|
|
Definition at line 17 of file TextIcon.java. Referenced by getIconHeight(), init(), and paintIcon(). |
|
|
Definition at line 15 of file TextIcon.java. Referenced by checkChange(), and init(). |
|
|
Definition at line 9 of file TextIcon.java. Referenced by getText(), init(), paintIcon(), and setText(). |
|
|
Definition at line 16 of file TextIcon.java. Referenced by getIconWidth(), init(), and paintIcon(). |
1.3.7