RiverRat - An MIT iCampus project | http://web.mit.edu/riverrat/ |
Inheritance diagram for riverrat.RiverRatDemo:
Public Member Functions | |
RiverRatDemo () | |
Default constructor. | |
void | actionPerformed (ActionEvent e) |
This implements the ActionListener class, and allows Menus to send actions to the application. | |
void | mouseEntered (MouseEvent e) |
Unused part of the MouseListener interface. | |
void | mouseExited (MouseEvent e) |
void | mouseClicked (MouseEvent e) |
void | mousePressed (MouseEvent e) |
Part of the MouseListener interface. | |
void | mouseReleased (MouseEvent e) |
Part of the MouseListener interface. | |
void | mouseMoved (MouseEvent e) |
Part of the MouseMotionListener interface. | |
void | mouseDragged (MouseEvent e) |
Part of the MouseMotionListener interface. | |
void | drawArrows (Graphics g) |
This is a test method (unused) to draw a series of triangle boat icons at different headings, with 45 degree increments. | |
void | drawTriangle (Graphics g, int x, int y, float radians) |
Draws a triangular boat icon at position (x,y), with heading radians, from 0 to 2Pi, on the Graphics object g. | |
void | drawBoatIcon (Graphics g, int x, int y, float radians) |
Draws a boat-shaped boat icon at position (x,y), with heading radians, from 0 to 2Pi, on the Graphics object g. | |
void | drawHelpMessage (Graphics g) |
Draws a help message to show keyboard commands. | |
void | drawCursorLatLon (Graphics g) |
Draws a string with the cursor location in latitude and longitude. | |
void | drawLatLonGrid (Graphics g) |
Draws a grid of vertical and horizontal lines. | |
void | drawMark (Graphics g, int markid) |
Draws a certain mark from the race. | |
void | drawBoat (Graphics g, int boatid) |
Draws a certain boat from the race. | |
void | paint (Graphics g) |
This is where the magic happens. | |
void | keyTyped (KeyEvent e) |
Implements part of the KeyListener interface. | |
void | keyReleased (KeyEvent e) |
void | keyPressed (KeyEvent e) |
Static Public Member Functions | |
void | main (String args[]) |
This makes a new RiverRatDemo object, then goes into a loop sending a repaint() event every half-second. | |
Package Attributes | |
Map | themap |
Race | therace |
Color | dotcolor |
int | boatid |
int | markid |
int | width = 1000 |
int | height = 375 |
int | mouse_x |
int | mouse_y |
boolean | isButtonPressed = false |
boolean | drawPointerLocation = false |
boolean | drawRaceStatus = true |
boolean | drawBoatStatus = true |
boolean | drawGrid = false |
boolean | drawHelp = false |
Static Package Attributes | |
final int | TRACK_DOT_RADIUS = 10 |
final int | DOT_RADIUS = 10 |
final int | MARK_RADIUS = 15 |
final int | MAX_DIMENSION = 500 |
final float | NW_LAT = 42.3645f |
final float | SE_LAT = 42.3505f |
final float | NW_LON = -71.095f |
final float | SE_LON = -71.075f |
final int | GRID_DIVISIONS = 10 |
final boolean | DEBUG = false |
final boolean | ENABLE_TRACKS = true |
final boolean | DRAW_BOAT_ICON = true |
final Color | BG_COLOR = Color.white |
final Color | GRID_COLOR = Color.gray |
String | host = "localhost" |
int | port = 8080 |
Definition at line 87 of file RiverRatDemo.java.
|
Default constructor. Sets up new Race, initializes Map with defined coordinates, sets size to defined width and height, sets background color, and initializes application. Definition at line 131 of file RiverRatDemo.java. |
|
This implements the ActionListener class, and allows Menus to send actions to the application.
Definition at line 159 of file RiverRatDemo.java. |
|
This is a test method (unused) to draw a series of triangle boat icons at different headings, with 45 degree increments.
Definition at line 253 of file RiverRatDemo.java. |
|
Draws a certain boat from the race.
Definition at line 417 of file RiverRatDemo.java. References riverrat.Fix.fixToString(), riverrat.Fix.getLat(), and riverrat.Fix.getLon(). |
|
Draws a boat-shaped boat icon at position (x,y), with heading radians, from 0 to 2Pi, on the Graphics object g. x is measured from the left side of the window, y is measured from the top of the window. A heading of 0 draws an icon pointing north. Doesn't really work at the moment.
Definition at line 306 of file RiverRatDemo.java. |
|
Draws a string with the cursor location in latitude and longitude.
Definition at line 356 of file RiverRatDemo.java. |
|
Draws a help message to show keyboard commands.
Definition at line 337 of file RiverRatDemo.java. |
|
Draws a grid of vertical and horizontal lines.
Definition at line 365 of file RiverRatDemo.java. |
|
Draws a certain mark from the race.
Definition at line 387 of file RiverRatDemo.java. |
|
Draws a triangular boat icon at position (x,y), with heading radians, from 0 to 2Pi, on the Graphics object g. x is measured from the left side of the window, y is measured from the top of the window. A heading of 0 draws an icon pointing north.
Definition at line 277 of file RiverRatDemo.java. |
|
Implements part of the KeyListener interface.
Listens for certain keys and triggers these behaviors. Definition at line 513 of file RiverRatDemo.java. |
|
This makes a new RiverRatDemo object, then goes into a loop sending a repaint() event every half-second.
Definition at line 545 of file RiverRatDemo.java. |
|
Part of the MouseMotionListener interface. Updates internal variables describing the position of the mouse. This is used to display the pointer location on the screen. Definition at line 239 of file RiverRatDemo.java. |
|
Unused part of the MouseListener interface.
Definition at line 196 of file RiverRatDemo.java. |
|
Part of the MouseMotionListener interface. Updates internal variables describing the position of the mouse. This is used to display the pointer location on the screen. Definition at line 226 of file RiverRatDemo.java. |
|
Part of the MouseListener interface. Simply changes an internal state variable describing the mouse status. Definition at line 204 of file RiverRatDemo.java. |
|
Part of the MouseListener interface. Simply changes an internal state variable describing the mouse status. Definition at line 214 of file RiverRatDemo.java. |
|
This is where the magic happens. This paint() gets called to draw the appropriate stuff. This paint() then calls other methods, like drawBoat().
Definition at line 478 of file RiverRatDemo.java. |