|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.gaia.swing.EmptyIcon
public class EmptyIcon
Represents a square icon having no graphical content.
Intended for use with Action and JMenuItem. Alignment of text is poor when the same menu mixes menu items without an icon with menu items having an icon. In such cases, items without an icon can use an EmptyIcon to take up the proper amount of space, and allow for alignment of all text in the menu.
Constructor Summary | |
---|---|
EmptyIcon(int size)
EmptyIcon objects are always square, having identical height and width. |
Method Summary | |
---|---|
int |
getIconHeight()
Return the icon size (width is same as height). |
int |
getIconWidth()
Return the icon size (width is same as height). |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
This implementation is empty, and paints nothing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmptyIcon(int size)
size
- length of any side of the icon in pixels, must be in the range
1..100 (inclusive).Method Detail |
---|
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |