|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.validation.extras.CompoundIcon
public final class CompoundIcon
An Icon
implementation that paints two icons
as compound or overlaid icon using a specified alignment.
Note: This class is not yet part of the binary Validation library; it comes with the Validation distributions as an extra. The API is work in progress and may change without notice; this class may even be completely removed from future distributions. If you want to use this class, you may consider copying it into your code base.
ImageIcon
Nested Class Summary | |
---|---|
static class |
CompoundIcon.Anchor
Describes how to position the foreground icon to the background icon. |
Constructor Summary | |
---|---|
CompoundIcon(Icon backgroundIcon,
Icon foregroundIcon)
Constructs a compound icon for the given foreground and background icons, using a default anchor. |
|
CompoundIcon(Icon backgroundIcon,
Icon foregroundIcon,
CompoundIcon.Anchor anchor)
Constructs a compound icon for the given foreground and background icons, using the specified anchor. |
Method Summary | |
---|---|
int |
getIconHeight()
Returns this icon's height, which is the maximum of the heights of the background and foreground icons. |
int |
getIconWidth()
Returns this icon's width, which is the maximum of the widths of the background and foreground icons. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
Draws this icon at the specified location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompoundIcon(Icon backgroundIcon, Icon foregroundIcon)
backgroundIcon
- the icon in the centered backgroundforegroundIcon
- the icon that overlays the background iconpublic CompoundIcon(Icon backgroundIcon, Icon foregroundIcon, CompoundIcon.Anchor anchor)
backgroundIcon
- the icon in the centered backgroundforegroundIcon
- the icon that overlays the background iconanchor
- the position of the foreground icon relative
to the background iconMethod Detail |
---|
public int getIconWidth()
getIconWidth
in interface Icon
public int getIconHeight()
getIconHeight
in interface Icon
public void paintIcon(Component c, Graphics g, int x, int y)
paintIcon
in interface Icon
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |