SORTIE Java Interface
1
|
Creates different icons needed by the model. More...
Public Member Functions | |
ModelIcon (int iWidth, int iHeight, int iShape) | |
Creates an icon. More... | |
ModelIcon (int iWidth, int iHeight, int iShape, Color oColor) | |
Creates an icon. More... | |
int | getIconHeight () |
Gets the height of the icon, in pixels. More... | |
int | getIconWidth () |
Gets the width of the icon, in pixels. More... | |
void | paintIcon (Component c, Graphics g, int x, int y) |
Create the icon. More... | |
Static Public Attributes | |
static final int | RECTANGLE = 1 |
Icon is a rectangle. More... | |
static final int | UP_TRIANGLE = 2 |
Icon is a triangle pointing up. More... | |
static final int | DOWN_TRIANGLE = 3 |
Icon is a triangle pointing down. More... | |
static final int | LEFT_TRIANGLE = 4 |
Icon is a triangle pointing left. More... | |
static final int | RIGHT_TRIANGLE = 5 |
Icon is a triangle pointing right. More... | |
static final int | PAUSE = 6 |
Icon is a pause symbol - two rectangles next to each other. More... | |
static final int | STEP_FORWARD = 7 |
Icon is a step forward symbol - two triangles next to each other pointing forward. More... | |
static final int | STEP_BACKWARD = 8 |
Icon is a step back symbol - two triangles next to each other pointing backwards. More... | |
Private Member Functions | |
void | paintRectangle (Graphics g, int x, int y) |
Paints a rectangle. More... | |
void | paintUpTriangle (Graphics g, int x, int y) |
Creates a triangle with the point up. More... | |
void | paintDownTriangle (Graphics g, int x, int y) |
Creates a triangle with the point down. More... | |
void | paintLeftTriangle (Graphics g, int x, int y) |
Creates a triangle with the point to the left. More... | |
void | paintRightTriangle (Graphics g, int x, int y) |
Creates a triangle with the point to the right. More... | |
void | paintPause (Graphics g, int x, int y) |
Create a "pause" icon with two rectangles. More... | |
void | paintStepForward (Graphics g, int x, int y) |
Creates a "step forward" icon with two triangles pointing right. More... | |
void | paintStepBackward (Graphics g, int x, int y) |
Creates a "step backward" icon with two triangles pointing left. More... | |
Private Attributes | |
Color | m_oColor |
Icon's color. More... | |
int | m_iWidth |
Icon's width, in pixels. More... | |
int | m_iHeight |
Icon's height, in pixels. More... | |
int | m_iShape |
Icon's shape. More... | |
Creates different icons needed by the model.
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: Cary Institute of Ecosystem Studies
sortie.gui.components.ModelIcon.ModelIcon | ( | int | iWidth, |
int | iHeight, | ||
int | iShape | ||
) |
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. |
sortie.gui.components.ModelIcon.ModelIcon | ( | int | iWidth, |
int | iHeight, | ||
int | iShape, | ||
Color | oColor | ||
) |
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 sortie.gui.components.ModelIcon.getIconHeight | ( | ) |
Gets the height of the icon, in pixels.
int sortie.gui.components.ModelIcon.getIconWidth | ( | ) |
Gets the width of the icon, in pixels.
|
private |
Creates a triangle with the point down.
g | Graphics Graphics object. |
x | int X coordinate of the upper left corner of the triangle. |
y | int Y coordinate of the upper left corner of the triangle. |
void sortie.gui.components.ModelIcon.paintIcon | ( | Component | c, |
Graphics | g, | ||
int | x, | ||
int | y | ||
) |
Create the icon.
c | Component Component. |
g | Graphics Graphics. |
x | int X coordinte to paint at. |
y | int Y coordinate to paint at. |
|
private |
Creates a triangle with the point to the left.
g | Graphics Graphics object. |
x | int X coordinate of the triangle. |
y | int Y coordinate of the triangle. |
|
private |
Create a "pause" icon with two rectangles.
g | Graphics Graphics object. |
x | int X coordinate of pause icon. |
y | int Y coordinate of pause icon. |
|
private |
Paints a rectangle.
g | Graphics Graphics object for painting. |
x | int X coordinate to start painting at. |
y | int Y coordinate to start painting at. |
|
private |
Creates a triangle with the point to the right.
g | Graphics Graphics object. |
x | int X coordinate of the triangle. |
y | int Y coordinate of the triangle. |
|
private |
Creates a "step backward" icon with two triangles pointing left.
g | Graphics Graphics object. |
x | int X coordinate of icon. |
y | int Y coordinate of icon. |
|
private |
Creates a "step forward" icon with two triangles pointing right.
g | Graphics Graphics object. |
x | int X coordinate of the icon. |
y | int Y coordinate of the icon. |
|
private |
Creates a triangle with the point up.
g | Graphics Graphics object. |
x | int X coordinate of the left corner of the triangle. |
y | int Y coordinate of the top corner of the triangle. |
|
static |
Icon is a triangle pointing down.
|
static |
Icon is a triangle pointing left.
|
private |
Icon's height, in pixels.
|
private |
Icon's shape.
|
private |
Icon's width, in pixels.
|
private |
Icon's color.
Defaults to black.
|
static |
Icon is a pause symbol - two rectangles next to each other.
|
static |
Icon is a rectangle.
|
static |
Icon is a triangle pointing right.
|
static |
Icon is a step back symbol - two triangles next to each other pointing backwards.
|
static |
Icon is a step forward symbol - two triangles next to each other pointing forward.
|
static |
Icon is a triangle pointing up.