|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.option.AbstractOption
net.sf.freecol.common.option.BooleanOption
public class BooleanOption
Represents an option that can be either true or false.
| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
LICENSE
|
static java.lang.String |
REVISION
|
| Fields inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
NO_ID |
| Constructor Summary | |
|---|---|
BooleanOption(java.lang.String id,
java.lang.String name,
java.lang.String shortDescription,
boolean defaultValue)
Creates a new BooleanOption. |
|
| Method Summary | |
|---|---|
boolean |
getValue()
Gets the current value of this BooleanOption. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
protected void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
void |
setValue(boolean value)
Sets the current value of this BooleanOption. |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
| Methods inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
addPropertyChangeListener, firePropertyChange, getId, getName, getShortDescription, readFromXML, readFromXMLElement, removePropertyChangeListener, toString, toXML, toXMLElement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String LICENSE
public static final java.lang.String REVISION
| Constructor Detail |
|---|
public BooleanOption(java.lang.String id,
java.lang.String name,
java.lang.String shortDescription,
boolean defaultValue)
BooleanOption.
id - The identifier for this option. This is used when the object should be
found in an OptionGroup.name - The name of the Option. This text is used for identifying
the option for a user. Example: The text related to a checkbox.shortDescription - Should give a short description of the BooleanOption.
This might be used as a tooltip text.defaultValue - The default value of this option.| Method Detail |
|---|
public boolean getValue()
BooleanOption.
public void setValue(boolean value)
BooleanOption.
value - The value.
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
toXMLImpl in class AbstractOptionout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXMLImpl in class AbstractOptionin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||