public class LabeledIcon
extends java.lang.Object
implements javax.swing.Icon
Constructor and Description |
---|
LabeledIcon(javax.swing.Icon icon,
java.lang.String text,
java.lang.String mnemonic) |
Modifier and Type | Method and Description |
---|---|
java.awt.Font |
getFont() |
int |
getIconHeight() |
int |
getIconTextGap() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
void |
setFont(java.awt.Font font) |
void |
setIconTextGap(int iconTextGap) |
public LabeledIcon(javax.swing.Icon icon, java.lang.String text, java.lang.String mnemonic)
icon
- not null
icon.text
- to be painted under the icon. This parameter can
be null
if text isn't specified. In that case LabeledIcon
mnemonic
- public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public void setIconTextGap(int iconTextGap)
public int getIconTextGap()
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon