|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Specifies the services that a user interface provides to student code for the Flight assignment. The interface can be implemented with a visual user interface (see GUI.java) or with a text-based user interface.
| Field Summary | |
static java.awt.Color |
BLACK
When colors are needed, use these constants, or just make a java.awt.Color using the java.awt.Color class itself. |
static java.awt.Color |
BLUE
|
static java.awt.Color |
GRAY
|
static java.awt.Color |
GREEN
|
static java.awt.Color |
INVISIBLE
|
static java.awt.Color |
RED
|
| Method Summary | |
void |
buildingGraph()
Displays a status report for the user. |
void |
clearAirports()
Erases all airport vertices and flight edges displayed. |
void |
clearFlights()
Erases all flight edges displayed. |
void |
drawAirport(AirportSpecs a,
java.awt.Color c)
Draws or redraws an airport, with the specified color. |
void |
drawAllAirports(java.awt.Color c)
Colors all airports the same color |
void |
drawFlight(FlightSpecs f,
java.awt.Color c)
Draws or redraws a flight, with the specified color. |
void |
exit()
Call this just before your mainline exits. |
void |
initializingGraph()
Displays a status report for the user. |
void |
otherMessage(java.lang.String message)
You can use this to give your own status reports or your own prompts. |
void |
parsing()
Displays a status report for the user. |
void |
pause(long milliseconds)
Freeze the GUI for a bit. |
void |
processingQuery()
Displays a status report for the user. |
java.lang.String |
readAirport()
Once called, this method doesn't return until the user has selected an airport. |
java.lang.String |
readText()
Once called, this method doesn't return until the user has typed in some text and hit enter. |
void |
waitingForAirport()
Prompts the user to select an airport. |
void |
waitingForText()
Prompts the user to type something. |
void |
writeText(java.lang.String message)
Prints the specified text for the user. |
| Field Detail |
public static final java.awt.Color BLACK
public static final java.awt.Color BLUE
public static final java.awt.Color GREEN
public static final java.awt.Color RED
public static final java.awt.Color GRAY
public static final java.awt.Color INVISIBLE
| Method Detail |
public void drawAirport(AirportSpecs a,
java.awt.Color c)
a - This provides the x,y for the vertexc - Any old java.awt.Color you choose
public void drawFlight(FlightSpecs f,
java.awt.Color c)
f - This provides the codes for the endpoints of the edgec - Any old java.awt.Color you choosepublic void clearFlights()
public void clearAirports()
public void drawAllAirports(java.awt.Color c)
c - Color for all airportspublic void writeText(java.lang.String message)
message - Text to print outpublic java.lang.String readText()
public java.lang.String readAirport()
public void parsing()
public void buildingGraph()
public void initializingGraph()
public void processingQuery()
public void waitingForText()
public void waitingForAirport()
public void otherMessage(java.lang.String message)
message - Text to be displayed temporarilypublic void pause(long milliseconds)
milliseconds - how long to pause (so 250 freezes for a quarter second)public void exit()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||