|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.display.ColorIcon
public class ColorIcon
This Icon fills itself with the color specified in its constructor.
| Constructor Summary | |
|---|---|
ColorIcon(java.awt.Color color,
int width,
int height)
Constructs a ColorIcon. |
|
| Method Summary | |
|---|---|
int |
getIconHeight()
Gets the icon height. |
int |
getIconWidth()
Gets the icon width. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics _g,
int x,
int y)
Paints the icon. |
void |
setColor(java.awt.Color color)
Sets the color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorIcon(java.awt.Color color,
int width,
int height)
color - color of the iconwidth - width of the iconheight - height of the icon| Method Detail |
|---|
public void setColor(java.awt.Color color)
color - the desired colorpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic 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.Iconc - the component on which it is painted_g - the graphics contextx - the x coordinate of the icony - the y coordinate of the icon
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||