Class ServerDisplay
java.lang.Object
|
+--ServerDisplay
- public class ServerDisplay
- extends java.lang.Object
A GUI for the election server manager.
This is what the election official interacts with. When it has
to do some work, the GUI calls a Server
method. As part of its
processing, the server then calls some mixture of the appropriate
"put...
" routines to display the results of the
operation. The particular display implementation does the work it
needs to maintain state between calls by the server itself. A typical
interaction might be:
// user asks to close an election
// display sets itself up to show the list of candidates
server.closeElection(election, display);
{
// ...
display.putTitle("Results for election");
// ...
display.putWinner(...);
// etc
}
// display cleans up state from displaying the election results
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
putTitle
public void putTitle(java.lang.String title)
putWinner
public void putWinner(java.lang.String name,
int votes)
putCandidate
public void putCandidate(java.lang.String name,
int votes)
putElection
public void putElection(java.lang.String name)
error
public void error(java.lang.String text)
notify
public void notify(java.lang.String text)
openElection
public void openElection(java.lang.String election)
closeElection
public void closeElection(java.lang.String election)
viewElection
public void viewElection(java.lang.String election)
run
public void run()
start
public void start()