|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.swing.CompositeIcon
public class CompositeIcon
CompositeIcon is an Icon implementation which draws two icons with a specified relative position. LEFT, RIGHT, TOP, BOTTOM: specify how icon1 is drawn relative to icon2 CENTER: icon1 is drawn first, icon2 is drawn over it and with horizontal and vertical orientations within the alloted space It's useful with VTextIcon when you want an icon with your text: if icon1 is the graphic icon and icon2 is the VTextIcon, you get a similar effect to a JLabel with a graphic icon and text
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private int |
horizontalOrientation
|
private Icon |
icon1
|
private Icon |
icon2
|
private int |
position
|
private int |
verticalOrientation
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Icon icon1
private Icon icon2
private int position
private int horizontalOrientation
private int verticalOrientation
Constructor Detail |
---|
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
- intMethod Detail |
---|
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
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
|
Copyright ยจ 2003-2007 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |