|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gswing.components.viewer.ResultsInterface
public class ResultsInterface
Purpose: The applet's interface to all the results. This class deals with the opening and reading of the serialised data files. If the applet is run from a web page it reads the files from a URL, if it is run from an appletviewer they are read from a file.
| Constructor Summary | |
|---|---|
ResultsInterface(boolean isApplet,
String rootDir)
Constructor. |
|
ResultsInterface(boolean isApplet,
URL baseURL)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
containsResult(char type)
Do any results for this constituency type exist? |
ListModel |
getConstituencyList(String region)
Get the list of constituencies for this region. |
ListModel |
getConstituencyList(String parent,
char type)
Get the list of constituencies for this parent. |
ListModel |
getCouncilList(String region)
Get the list of councils for this region. |
String |
getGSwingVersion()
Get the version of the software that was stored in the serialised file. |
Result |
getLatestResult(char type,
String constituency)
Get the most recent result for this constituency. |
Result |
getNextResult(Result oldResult)
Get the result after this one. |
Result |
getOverallResult(Date date,
int selection)
Get overall results for this election for this date. |
Result |
getPreviousResult(Result oldResult)
Get the previous result to this one. |
String |
getRegion(String ward)
Get the region of this council ward. |
String |
getRegion(String constituency,
char type)
Get the region of this constituency. |
ListModel |
getRegionList()
Get the list of regions in the results. |
Result[] |
getResults(char type,
String constituency)
Get all results for this constituency. |
Result[] |
getResults(Result result)
Get all results in relation to this result. |
String |
getState()
Get the name of the state. |
ListModel |
getWardList(String council)
Get the list of wards for this council. |
boolean |
init()
Initialise the results interface. |
void |
readFromFile(char type,
String constituency)
Read results from serialised file. |
void |
setGSwingVersion(String swingVersion)
Get the version of the software that was stored in the serialised file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResultsInterface(boolean isApplet,
String rootDir)
isApplet - Has this interface been created by and applet?rootDir - The root directory of the applet / application.
public ResultsInterface(boolean isApplet,
URL baseURL)
isApplet - Has this interface been created by and applet?baseURL - The base URL of the applet / application.| Method Detail |
|---|
public boolean init()
public ListModel getConstituencyList(String region)
region - The region to do the search on.
public ListModel getConstituencyList(String parent,
char type)
getConstituencyList in interface IConstituencyBrowsingparent - The parent constituency name.type - The parent constituency type.
public ListModel getRegionList()
getRegionList in interface IConstituencyBrowsingpublic ListModel getCouncilList(String region)
region - The region to do the search on.
public ListModel getWardList(String council)
council - The council to do the search on.
public Result getLatestResult(char type,
String constituency)
constituency - The constituency to search for.
public Result getOverallResult(Date date,
int selection)
date - The date of the election.selection - Whether the user selection is previous or next.
public Result getPreviousResult(Result oldResult)
oldResult - The result from which to start search.
public Result getNextResult(Result oldResult)
oldResult - The result from which to start search.
public Result[] getResults(char type,
String constituency)
constituency - The constituency name.
public Result[] getResults(Result result)
result - The result to be base the request on.
public void readFromFile(char type,
String constituency)
type - The type of result.constituency - The name of the constituency.
public String getRegion(String constituency,
char type)
constituency - The constituency name.type - The constituency type.
public String getRegion(String ward)
ward - The ward constituency name.
public String getGSwingVersion()
public void setGSwingVersion(String swingVersion)
swingVersion - The gSwingVersion to set.public boolean containsResult(char type)
type - The constituency type.
public String getState()
getState in interface IConstituencyBrowsing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||