|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.uif.util.CompoundIcon
public final class CompoundIcon
An Icon
implementation that paints two icons
as compound or overlaid icon using a specified alignment.
ImageIcon
Field Summary | |
---|---|
static int |
CENTER
Put the foreground icon at the top of its display area, centered horizontally. |
static int |
EAST
Put the foreground icon on the right side of its display area, centered vertically. |
static int |
NORTH
Put the foreground icon at the top of its display area, centered horizontally. |
static int |
NORTHEAST
Put the foreground icon at the top-right corner of its display area. |
static int |
NORTHWEST
Put the foreground icon at the top-left corner of its display area. |
static int |
SOUTH
Put the foreground icon at the bottom of its display area, centered horizontally. |
static int |
SOUTHEAST
Put the foreground icon at the bottom-right corner of its display area. |
static int |
SOUTHWEST
Put the foreground icon at the bottom-left corner of its display area. |
static int |
WEST
Put the foreground icon on the left side of its display area, centered vertically. |
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,
int 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 |
Field Detail |
---|
public static final int CENTER
public static final int NORTH
public static final int NORTHEAST
public static final int EAST
public static final int SOUTHEAST
public static final int SOUTH
public static final int SOUTHWEST
public static final int WEST
public static final int NORTHWEST
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, int 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 |