net.sf.freecol.common.option
Class PercentageOption
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption
net.sf.freecol.common.option.IntegerOption
net.sf.freecol.common.option.PercentageOption
- All Implemented Interfaces:
- Option
public class PercentageOption
- extends IntegerOption
Represents an option where the result is a value between 0 and 100.
Method Summary |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
Methods inherited from class net.sf.freecol.common.model.FreeColObject |
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXML, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PercentageOption
public PercentageOption(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
- Creates a new
RangeOption
.
- Parameters:
in
- The XMSStreamReader
to read the data from
- Throws:
javax.xml.stream.XMLStreamException
PercentageOption
public PercentageOption(java.lang.String id,
OptionGroup optionGroup,
int defaultOption)
- Creates a new
RangeOption
.
- Parameters:
id
- The identifier for this option. This is used when the object
should be found in an OptionGroup
.optionGroup
- The OptionGroup this Option belongs to.defaultOption
- The default value.
getXMLElementTagName
public static java.lang.String getXMLElementTagName()
- Gets the tag name of the root element representing this object.
- Returns:
- "percentageOption".