java.lang.Object
org.bdgp.apps.dagedit.gui.TextIcon
- All Implemented Interfaces:
- javax.swing.Icon
- public class TextIcon
- extends java.lang.Object
- implements javax.swing.Icon
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tempComponent
private static javax.swing.JComponent tempComponent
text
private java.lang.String text
font
private java.awt.Font font
metrics
private java.awt.FontMetrics metrics
foreground
private java.awt.Color foreground
background
private java.awt.Color background
iconWidth
private int iconWidth
iconHeight
private int iconHeight
TextIcon
public TextIcon(java.lang.String text)
setForeground
public void setForeground(java.awt.Color foreground)
setBackground
public void setBackground(java.awt.Color background)
setFont
public void setFont(java.awt.Font font)
setFont
private void setFont(java.awt.Font font,
boolean recalculateBounds)
setText
public void setText(java.lang.String text)
setText
private void setText(java.lang.String text,
boolean recalculateBounds)
recalculateBounds
protected void recalculateBounds()
getIconWidth
public int getIconWidth()
- Description copied from interface:
javax.swing.Icon
- Returns the width of the icon.
- Specified by:
getIconWidth in interface javax.swing.Icon
getIconHeight
public int getIconHeight()
- Description copied from interface:
javax.swing.Icon
- Returns the height of the icon.
- Specified by:
getIconHeight in interface javax.swing.Icon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Description copied from interface:
javax.swing.Icon
- Draws the icon at the location (x, y) on the specified graphics device.
- Specified by:
paintIcon in interface javax.swing.Icon