|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--TransitMap
This class creates and updates a display of bus locations.
Constructor Summary | |
TransitMap(java.lang.String img,
double latA,
double lonA,
double latB,
double lonB)
Create a new TransitMap using the given image. |
Method Summary | |
void |
keyPressed(uwcse.graphics.GWindowEvent e)
Process notification of KeyPressed events |
void |
keyReleased(uwcse.graphics.GWindowEvent e)
Process notification of KeyReleased events |
void |
mouseDragged(uwcse.graphics.GWindowEvent e)
Process notification of MouseDragged events |
void |
mousePressed(uwcse.graphics.GWindowEvent e)
Process notification of MousePressed events |
void |
mouseReleased(uwcse.graphics.GWindowEvent e)
Process notification of MouseReleased events |
int |
pixelX(double lon)
Convert a longitude value to an X-pixel address |
int |
pixelY(double lat)
Convert a latitude value to a Y-pixel address |
void |
processBusEvent(hw7.TransitBusEvent evt)
Given a new bus event, check to see if we already have a symbol for it. |
void |
timerExpired(uwcse.graphics.GWindowEvent e)
Process notification of TimerExpired events |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TransitMap(java.lang.String img, double latA, double lonA, double latB, double lonB)
img
- the name of the image file.latA
- latitude of top left corner in degrees (-South, +North)lonA
- longitude of top left corner in degrees (-West, +East)latB
- latitude of bottom right corner in degrees (-South, +North)lonB
- longitude of bottom right corner in degrees (-West, +East)Method Detail |
public void processBusEvent(hw7.TransitBusEvent evt)
public int pixelX(double lon)
lon
- the longitude to convert
public int pixelY(double lat)
lat
- the latitude to convert
public void mouseReleased(uwcse.graphics.GWindowEvent e)
mouseReleased
in interface uwcse.graphics.GWindowEventHandler
e
- the event objectpublic void mousePressed(uwcse.graphics.GWindowEvent e)
mousePressed
in interface uwcse.graphics.GWindowEventHandler
e
- the event objectpublic void mouseDragged(uwcse.graphics.GWindowEvent e)
mouseDragged
in interface uwcse.graphics.GWindowEventHandler
e
- the event objectpublic void timerExpired(uwcse.graphics.GWindowEvent e)
timerExpired
in interface uwcse.graphics.GWindowEventHandler
e
- the event objectpublic void keyPressed(uwcse.graphics.GWindowEvent e)
keyPressed
in interface uwcse.graphics.GWindowEventHandler
e
- the event objectpublic void keyReleased(uwcse.graphics.GWindowEvent e)
keyReleased
in interface uwcse.graphics.GWindowEventHandler
e
- the event object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |