|
||||||||||
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.ListOption<T>
T
- The type of objects to store in the list.public class ListOption<T>
An option for a list of something.
Field Summary |
---|
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 | |
---|---|
ListOption(ListOptionSelector<T> selector,
java.lang.String id,
OptionGroup optionGroup,
T... defaultValues)
Creates a new ListOption . |
|
ListOption(ListOptionSelector<T> selector,
java.lang.String id,
T... defaultValues)
Creates a new ListOption . |
|
ListOption(ListOptionSelector<T> selector,
javax.xml.stream.XMLStreamReader in)
Creates a new ListOption . |
Method Summary | |
---|---|
ListOptionSelector<T> |
getListOptionSelector()
Gets the delegate responsible for getting a list of objects that can be selected by this option. |
java.util.List<T> |
getValue()
Gets the current value of this Option . |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
void |
setValue(java.util.List<T> value)
Sets the current value of this Option . |
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 |
Constructor Detail |
---|
public ListOption(ListOptionSelector<T> selector, javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
ListOption
.
in
- The XMLStreamReader
containing the data.
javax.xml.stream.XMLStreamException
public ListOption(ListOptionSelector<T> selector, java.lang.String id, T... defaultValues)
ListOption
.
id
- The identifier for this option. This is used when the object should be
found in an OptionGroup
.defaultValues
- The default values of this option.public ListOption(ListOptionSelector<T> selector, java.lang.String id, OptionGroup optionGroup, T... defaultValues)
ListOption
.
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.defaultValues
- The default values of this option.Method Detail |
---|
public ListOptionSelector<T> getListOptionSelector()
ListOptionSelector
for this
option.public java.util.List<T> getValue()
Option
.
public void setValue(java.util.List<T> value)
Option
.
value
- The value.public static java.lang.String getXMLElementTagName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |