|
||||||||||
| 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(javax.swing.Icon backgroundIcon,
javax.swing.Icon foregroundIcon)
Constructs a compound icon for the given foreground and background icons, using a default anchor. |
|
CompoundIcon(javax.swing.Icon backgroundIcon,
javax.swing.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(java.awt.Component c,
java.awt.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(javax.swing.Icon backgroundIcon,
javax.swing.Icon foregroundIcon)
backgroundIcon - the icon in the centered backgroundforegroundIcon - the icon that overlays the background icon
public CompoundIcon(javax.swing.Icon backgroundIcon,
javax.swing.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 icon| Method Detail |
|---|
public int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||