|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bounce.QIcon
public class QIcon
Icon implementation that allows for overlaying a number of icons on top of the base icon. Important: Icons are overlayed in the order they are supplied. Note: This implementation is based on the CompositeIcon Version 1.00 Aug 15 2001, implementation by Eric Schultz: http://forum.java.sun.com/thread.jsp?forum=57&thread=157029
Field Summary | |
---|---|
static int |
CENTER
The overlay icon location CENTER |
static int |
EAST
The overlay icon location EAST |
static int |
NORTH
The overlay icon location NORTH |
static int |
NORTH_EAST
The overlay icon location NORTH_EAST |
static int |
NORTH_WEST
The overlay icon location NORTH_WEST |
static int |
SOUTH
The overlay icon location SOUTH |
static int |
SOUTH_EAST
The overlay icon location SOUTH_EAST |
static int |
SOUTH_WEST
The overlay icon location SOUTH_WEST |
static int |
WEST
The overlay icon location WEST |
Constructor Summary | |
---|---|
QIcon(Icon baseIcon)
Creates a QIcon for the base icon. |
|
QIcon(Icon baseIcon,
Icon overlay,
int position)
Creates a new composite icon from two existing icons and places the overlay in the specified position |
Method Summary | |
---|---|
void |
addOverlayIcon(Icon icon,
int pos)
Add an overlay icon, using the abstract position. |
void |
addOverlayIcon(Icon icon,
int xpos,
int ypos)
Add an overlay icon, using the position supplied. |
void |
addOverlayIcon(Icon icon,
Point position)
Add an overlay icon, using the position supplied. |
int |
getIconHeight()
Return the height of the icon. |
int |
getIconWidth()
Return the width of the icon. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
Paint the icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NORTH
public static final int NORTH_EAST
public static final int NORTH_WEST
public static final int WEST
public static final int EAST
public static final int CENTER
public static final int SOUTH
public static final int SOUTH_EAST
public static final int SOUTH_WEST
Constructor Detail |
---|
public QIcon(Icon baseIcon)
baseIcon
- the base icon.public QIcon(Icon baseIcon, Icon overlay, int position)
baseIcon
- the base iconoverlay
- the icon to draw on top of the baseposition
- the location of the overlay relative to the baseMethod Detail |
---|
public void addOverlayIcon(Icon icon, int pos)
icon
- the overlay icon.pos
- the abstract position of the icon.public void addOverlayIcon(Icon icon, int xpos, int ypos)
icon
- the overlay icon.xpos
- the X position of the icon.ypos
- the Y position of the icon.public void addOverlayIcon(Icon icon, Point position)
icon
- the overlay icon.position
- the position of the icon.public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
public void paintIcon(Component c, Graphics g, int x, int y)
paintIcon
in interface Icon
c
- the component to paint the icon on.g
- the graphics.x
- the x location.y
- the y location.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |