|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hoplugins.commons.ui.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
Field Summary |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Constructor Summary | |
CompositeIcon(javax.swing.Icon icon1,
javax.swing.Icon icon2)
Create a CompositeIcon from the specified Icons, using the default relative position (icon1 above icon2) and orientations (centered horizontally and vertically) |
|
CompositeIcon(javax.swing.Icon icon1,
javax.swing.Icon icon2,
int position)
Create a CompositeIcon from the specified Icons, using the specified relative position and default orientations (centered horizontally and vertically) |
|
CompositeIcon(javax.swing.Icon icon1,
javax.swing.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()
Returns the icon's height. |
int |
getIconWidth()
Returns the icon's width. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Draw the icon at the specified location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompositeIcon(javax.swing.Icon icon1, javax.swing.Icon icon2)
icon1
- icon2
- public CompositeIcon(javax.swing.Icon icon1, javax.swing.Icon icon2, int position)
icon1
- icon2
- position
- public CompositeIcon(javax.swing.Icon icon1, javax.swing.Icon icon2, int position, int horizontalOrientation, int verticalOrientation)
icon1
- icon2
- position
- horizontalOrientation
- verticalOrientation
- Method Detail |
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon
c
- g
- x
- y
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |