Public Member Functions | |
ModelIcon (int iWidth, int iHeight, int iShape) | |
Creates an icon. | |
ModelIcon (int iWidth, int iHeight, int iShape, Color oColor) | |
Creates an icon. | |
int | getIconHeight () |
Gets the height of the icon, in pixels. | |
int | getIconWidth () |
Gets the width of the icon, in pixels. | |
void | paintIcon (Component c, Graphics g, int x, int y) |
Create the icon. | |
Static Public Attributes | |
static final int | RECTANGLE = 1 |
Icon is a rectangle. | |
static final int | UP_TRIANGLE = 2 |
Icon is a triangle pointing up. | |
static final int | DOWN_TRIANGLE = 3 |
Icon is a triangle pointing down. | |
static final int | LEFT_TRIANGLE = 4 |
Icon is a triangle pointing left. | |
static final int | RIGHT_TRIANGLE = 5 |
Icon is a triangle pointing right. | |
static final int | PAUSE = 6 |
Icon is a pause symbol - two rectangles next to each other. | |
static final int | STEP_FORWARD = 7 |
Icon is a step forward symbol - two triangles next to each other pointing forward. | |
static final int | STEP_BACKWARD = 8 |
Icon is a step back symbol - two triangles next to each other pointing backwards. |
Feel free to throw some more in here as needed. I originally created this class because Java doesn't seem to let me set button colors anymore, so now I slap on a colored icon instead.
Copyright: Copyright (c) Charles D. Canham 2003
Company: Institute of Ecosystem Studies
javawrapper::ModelIcon::ModelIcon | ( | int | iWidth, | |
int | iHeight, | |||
int | iShape | |||
) | [inline] |
Creates an icon.
iWidth | int Width of the icon, in pixels. | |
iHeight | int Height of the icon, in pixels. | |
iShape | int Desired icon shape - RECTANGLE, TRIANGLE, etc. If the value is not recognized a rectangle is drawn. |
javawrapper::ModelIcon::ModelIcon | ( | int | iWidth, | |
int | iHeight, | |||
int | iShape, | |||
Color | oColor | |||
) | [inline] |
Creates an icon.
iWidth | int Width of the icon, in pixels. | |
iHeight | int Height of the icon, in pixels. | |
iShape | int Desired icon shape - RECTANGLE, TRIANGLE, etc. If the value is not recognized a rectangle is drawn. | |
oColor | Color of icon. |
int javawrapper::ModelIcon::getIconHeight | ( | ) | [inline] |
Gets the height of the icon, in pixels.
int javawrapper::ModelIcon::getIconWidth | ( | ) | [inline] |
Gets the width of the icon, in pixels.
void javawrapper::ModelIcon::paintIcon | ( | Component | c, | |
Graphics | g, | |||
int | x, | |||
int | y | |||
) | [inline] |
Create the icon.
c | Component Component. | |
g | Graphics Graphics. | |
x | int X coordinte to paint at. | |
y | int Y coordinate to paint at. |