|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption
net.sf.freecol.common.option.LanguageOption
public class LanguageOption
Option for selecting a language. The possible choices are determined using the available language files in "data/strings".
Nested Class Summary | |
---|---|
class |
LanguageOption.Language
|
Field Summary | |
---|---|
static java.lang.String |
AUTO
|
Fields inherited from class net.sf.freecol.common.option.AbstractOption |
---|
NO_ID |
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
LanguageOption(java.lang.String id)
Creates a new LanguageOption . |
|
LanguageOption(java.lang.String id,
OptionGroup optionGroup)
|
|
LanguageOption(javax.xml.stream.XMLStreamReader in)
Creates a new IntegerOption . |
Method Summary | |
---|---|
static java.util.Locale |
getLocale(java.lang.String languageID)
Returns the Locale decided by the given name. |
LanguageOption.Language[] |
getOptions()
Returns a list of the available languages. |
LanguageOption.Language |
getValue()
Get the Value value. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
void |
setValue(LanguageOption.Language newValue)
Set the Value value. |
Methods inherited from class net.sf.freecol.common.option.AbstractOption |
---|
getGroup, getName, getShortDescription, isPreviewEnabled, setGroup, setPreviewEnabled, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.freecol.common.option.Option |
---|
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toXML, toXMLElement |
Field Detail |
---|
public static final java.lang.String AUTO
Constructor Detail |
---|
public LanguageOption(javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
IntegerOption
.
in
- The XMLStreamReader
containing the data.
javax.xml.stream.XMLStreamException
public LanguageOption(java.lang.String id)
LanguageOption
.
id
- The identifier for this option. This is used when the object should be
found in an OptionGroup
.public LanguageOption(java.lang.String id, OptionGroup optionGroup)
Method Detail |
---|
public final LanguageOption.Language getValue()
Value
value.
String
valuepublic final void setValue(LanguageOption.Language newValue)
Value
value.
newValue
- The new Value value.public LanguageOption.Language[] getOptions()
public static java.util.Locale getLocale(java.lang.String languageID)
Locale
decided by the given name.
languageID
- A String using the same format as
#getStringValue()
.
public static java.lang.String getXMLElementTagName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |