Package VASSAL.i18n
Class LocaleConfigurer
java.lang.Object
VASSAL.configure.Configurer
VASSAL.i18n.LocaleConfigurer
public class LocaleConfigurer extends Configurer
Configure a Locale Value using full, localized Language and Country names
- Author:
- Brent Easton
-
Field Summary
Fields Modifier and Type Field Description protected static String
ANY_COUNTRY
protected static Map<String,String>
countries
protected JComboBox
countryBox
protected static String[]
countryList
protected JComboBox
langBox
protected static String[]
languageList
protected static Map<String,String>
languages
protected Box
panel
Fields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, key, name, NAME_PROPERTY, noUpdate, value
-
Constructor Summary
Constructors Constructor Description LocaleConfigurer(String key, String name)
LocaleConfigurer(String key, String name, String val)
LocaleConfigurer(String key, String name, Locale locale)
-
Method Summary
Modifier and Type Method Description Component
getControls()
GUI interface for setting the option in an editing windowprotected String[]
getCountryList()
protected String[]
getLanguageList()
Locale
getValueLocale()
String
getValueString()
static String
localeToString(Locale l)
protected void
setCountry(String c)
protected void
setLanguage(String l)
void
setValue(String s)
Set the Object value from a Stringvoid
setValue(Locale l)
static Locale
stringToLocale(String s)
protected void
updateValue()
Methods inherited from class VASSAL.configure.Configurer
addPropertyChangeListener, fireUpdate, getKey, getName, getValue, isFrozen, removePropertyChangeListener, setFrozen, setName, setValue
-
Field Details
-
ANY_COUNTRY
- See Also:
- Constant Field Values
-
panel
-
languages
-
languageList
-
countries
-
countryList
-
langBox
-
countryBox
-
-
Constructor Details
-
LocaleConfigurer
-
LocaleConfigurer
-
LocaleConfigurer
-
-
Method Details
-
getValueString
- Specified by:
getValueString
in classConfigurer
- Returns:
- a String representation of the Object value
-
getValueLocale
-
setValue
-
setValue
Description copied from class:Configurer
Set the Object value from a String- Specified by:
setValue
in classConfigurer
-
setLanguage
-
setCountry
-
getControls
Description copied from class:Configurer
GUI interface for setting the option in an editing window- Specified by:
getControls
in classConfigurer
-
updateValue
protected void updateValue() -
getLanguageList
-
getCountryList
-
stringToLocale
-
localeToString
-