|
|||||||||
| 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.OptionGroup
public class OptionGroup
Used for grouping objects of Options.
| Field Summary | |
|---|---|
private static java.util.logging.Logger |
logger
|
private java.util.ArrayList<Option> |
options
|
| Fields inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
isDefined, NO_ID, previewEnabled |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
OptionGroup()
Creates a new OptionGroup. |
|
OptionGroup(java.lang.String id)
Creates a new OptionGroup. |
|
OptionGroup(javax.xml.stream.XMLStreamReader in)
Creates a new OptionGroup. |
|
| Method Summary | |
|---|---|
void |
add(Option option)
Adds the given Option. |
java.lang.String |
getName()
Returns the name of this Option. |
java.lang.String |
getShortDescription()
Gives a short description of this Option. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
java.util.Iterator<Option> |
iterator()
Returns an Iterator for the Options. |
protected void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
void |
removeAll()
Removes all of the Options from this OptionGroup. |
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 |
|---|
getGroup, isPreviewEnabled, setGroup, setPreviewEnabled, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 |
|---|
private static java.util.logging.Logger logger
private java.util.ArrayList<Option> options
| Constructor Detail |
|---|
public OptionGroup()
OptionGroup.
public OptionGroup(java.lang.String id)
OptionGroup.
id - The identifier for this option. This is used when the object should be
found in an OptionGroup.
public OptionGroup(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
OptionGroup.
in - The XMLStreamReader containing the data.
javax.xml.stream.XMLStreamException| Method Detail |
|---|
public void add(Option option)
Option.
option - The Option that should be
added to this OptionGroup.public void removeAll()
Options from this OptionGroup.
public java.util.Iterator<Option> iterator()
Iterator for the Options.
Iterator.
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
toXMLImpl in class FreeColObjectout - 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 FreeColObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public static java.lang.String getXMLElementTagName()
public java.lang.String getName()
Option.
getName in interface OptiongetName in class AbstractOptionpublic java.lang.String getShortDescription()
Option. Can for
instance be used as a tooltip text.
getShortDescription in interface OptiongetShortDescription in class AbstractOptionOption.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||