Package ca.cgjennings.ui
Class LabelIcon
- java.lang.Object
-
- ca.cgjennings.ui.LabelIcon
-
- All Implemented Interfaces:
javax.swing.Icon
public class LabelIcon extends java.lang.Object implements javax.swing.Icon
An icon that draws text.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getBackground()
java.awt.Color
getForeground()
javax.swing.Icon
getIcon()
int
getIconHeight()
int
getIconWidth()
java.lang.String
getText(java.lang.String text)
boolean
isEnabled()
boolean
isOpaque()
void
pack()
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
void
setBackground(java.awt.Color bg)
void
setEnabled(boolean enabled)
void
setForeground(java.awt.Color fg)
void
setIcon(javax.swing.Icon i)
void
setIconHeight(int height)
void
setIconWidth(int width)
void
setOpaque(boolean opaque)
void
setText(java.lang.String text)
-
-
-
Method Detail
-
setText
public void setText(java.lang.String text)
-
getText
public java.lang.String getText(java.lang.String text)
-
setForeground
public void setForeground(java.awt.Color fg)
-
getForeground
public java.awt.Color getForeground()
-
setBackground
public void setBackground(java.awt.Color bg)
-
getBackground
public java.awt.Color getBackground()
-
setOpaque
public void setOpaque(boolean opaque)
-
isOpaque
public boolean isOpaque()
-
setEnabled
public void setEnabled(boolean enabled)
-
isEnabled
public boolean isEnabled()
-
setIcon
public void setIcon(javax.swing.Icon i)
-
getIcon
public javax.swing.Icon getIcon()
-
setIconWidth
public void setIconWidth(int width)
-
setIconHeight
public void setIconHeight(int height)
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
-
pack
public void pack()
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfacejavax.swing.Icon
-
-