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 StringANY_COUNTRYprotected static Map<String,String>countriesprotected JComboBox<String>countryBoxprotected static String[]countryListprotected JComboBox<String>langBoxprotected static String[]languageListprotected static Map<String,String>languagesprotected JPanelpanelFields inherited from class VASSAL.configure.Configurer
changeSupport, frozen, hint, key, LIST_ENTRY_HIGHLIGHT_COLOR, 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 ComponentgetControls()GUI interface for setting the option in an editing windowprotected String[]getCountryList()protected String[]getLanguageList()LocalegetValueLocale()StringgetValueString()static StringlocaleToString(Locale l)protected voidsetCountry(String c)protected voidsetLanguage(String l)voidsetValue(String s)Set the Object value from a StringvoidsetValue(Locale l)static LocalestringToLocale(String s)protected voidupdateValue()Methods inherited from class VASSAL.configure.Configurer
addFocusListener, addPropertyChangeListener, fireUpdate, getHint, getKey, getName, getScreenSize, getValue, isFrozen, isHighlighted, removeFocusListener, removePropertyChangeListener, repack, repack, requestFocus, setFrozen, setHighlighted, setHint, setHintKey, setLabelVisibile, 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:
getValueStringin classConfigurer- Returns:
- a String representation of the Object value
-
getValueLocale
-
setValue
-
setValue
Description copied from class:ConfigurerSet the Object value from a String- Specified by:
setValuein classConfigurer
-
setLanguage
-
setCountry
-
getControls
Description copied from class:ConfigurerGUI interface for setting the option in an editing window- Specified by:
getControlsin classConfigurer
-
updateValue
protected void updateValue() -
getLanguageList
-
getCountryList
-
stringToLocale
-
localeToString
-