|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectEmptyIcon
final 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.
| Field Summary | |
|---|---|
(package private) static EmptyIcon |
SIZE_16
Convenience object for small icons, whose size matches the size of small icons in Sun's graphics repository. |
(package private) static EmptyIcon |
SIZE_24
Convenience object for large icons, whose size matches the size of large icons in Sun's graphics repository. |
| Constructor Summary | |
|---|---|
EmptyIcon(int aSize)
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(Component c,
Graphics g,
int x,
int y)
This implementation is empty, and paints nothing. |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final EmptyIcon SIZE_16
static final EmptyIcon SIZE_24
| Constructor Detail |
|---|
EmptyIcon(int aSize)
aSize - 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 Iconpublic int getIconHeight()
getIconHeight in interface Icon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
paintIcon in interface Icon
|
StocksMonitor 1.5.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||