public class CompositeIcon extends Object implements Icon
The GNU General Public License for details.
Modifier and Type | Field and Description |
---|---|
private int |
horizontalOrientation |
private Icon |
icon1 |
private Icon |
icon2 |
private int |
position |
private int |
verticalOrientation |
Constructor and Description |
---|
CompositeIcon(Icon icon1,
Icon icon2)
Create a CompositeIcon from the specified Icons, using the default
relative position (icon1 above icon2) and orientations (centered
horizontally and vertically).
|
CompositeIcon(Icon icon1,
Icon icon2,
int position)
Create a CompositeIcon from the specified Icons, using the specified
relative position and default orientations (centered horizontally and
vertically).
|
CompositeIcon(Icon icon1,
Icon icon2,
int position,
int horizontalOrientation,
int verticalOrientation)
Create a CompositeIcon from the specified Icons, using the specified
relative position and orientations.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
private void |
paintIcon(Component c,
Graphics g,
Icon icon,
int x,
int y,
int width,
int height,
int hOrientation,
int vOrientation)
Paints one icon in the specified rectangle with the given orientations.
|
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
private Icon icon1
private Icon icon2
private int position
private int horizontalOrientation
private int verticalOrientation
public CompositeIcon(Icon icon1, Icon icon2)
icon1
- Iconicon2
- Iconpublic CompositeIcon(Icon icon1, Icon icon2, int position)
icon1
- Iconicon2
- Iconposition
- intpublic CompositeIcon(Icon icon1, Icon icon2, int position, int horizontalOrientation, int verticalOrientation)
icon1
- Iconicon2
- Iconposition
- inthorizontalOrientation
- intverticalOrientation
- intpublic int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
private void paintIcon(Component c, Graphics g, Icon icon, int x, int y, int width, int height, int hOrientation, int vOrientation)
c
- Componentg
- Graphicsicon
- Iconx
- inty
- intwidth
- intheight
- inthOrientation
- intvOrientation
- int