public class QIcon extends Object implements Icon
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 basepublic 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
Copyright © 2002-2013 Edwin Dankert. All Rights Reserved.