|
OpMath | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opmath.util.html.Countries
Provides an HTML SELECT structure containing all the world's country names.
The class is structured in such a way as to allow for different languages: when a new country selector is created, the language for the NAME components can be chosen.
NOTE 1: Country names and codes are taken from Berg, Clifford J., "Advanced Java Development for Enterprise Applications, 2nd Edition", Sun Microsystems Press, 2000.
NOTE 2: Currently, only English is supported. Java recognises four variants of English, known as CA, GB, IE, and US. All of these four codes are recognised. However, they currently all yield the same country names list.
Copyright: (c) 2002 The Open Math Company Limited
The Terms of Distribution of this software are stipulated in the javadoc Overview for this project.
HTMLEncoder| Field Summary | |
static int |
CA
Language selector. |
static int |
GB
Language selector. |
static int |
IE
Language selector. |
static int |
US
Language selector. |
| Constructor Summary | |
Countries()
|
|
| Method Summary | |
static String |
getName(int language,
String value)
Gets the NAMES element, for the given language, whose VALUE is equal to value. |
static Select |
select(String id,
int language)
Returns a new SELECT structure. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CA
Select select(String, int).
select(String, int),
Constant Field Valuespublic static final int GB
Select select(String, int).
select(String, int),
Constant Field Valuespublic static final int IE
Select select(String, int).
select(String, int),
Constant Field Valuespublic static final int US
Select select(String, int).
select(String, int),
Constant Field Values| Constructor Detail |
public Countries()
| Method Detail |
public static String getName(int language,
String value)
throws ComparableTableException
value.
If value is not known, then getName(int, String) returns
null.
language - the int specifying the language.value - the String specifying the VALUES element.
String carrying the NAMES element, or null.
com.opmath.util.html.ComparableTableException - An exception thrown if the value of
language is not known to this class.
ComparableTableException
public static Select select(String id,
int language)
throws ComparableTableException
id. The
language of the SELECT structure OPTION elements' NAMEs are determined by the argument
language.
id - the String for the id.language - the int specifying the language.
com.opmath.util.html.ComparableTableException - An exception thrown if the value of
language is not known to this class.
ComparableTableException
|
OpMath | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||