|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.client.gui.panel.ChoiceItem<T>
public class ChoiceItem<T>
Can be used as a single choice for the
choice dialog
.
Constructor Summary | |
---|---|
ChoiceItem(java.lang.String text,
T object)
Creates a new ChoiceItem with the
given object. |
|
ChoiceItem(java.lang.String text,
T object,
boolean enable)
Creates a new ChoiceItem with the
given object. |
|
ChoiceItem(T object)
Creates a new ChoiceItem with the
given object. |
Method Summary | |
---|---|
int |
getChoice()
Gets the choice as an int . |
T |
getObject()
Gets the Object contained by this choice. |
boolean |
isEnabled()
Checks if the option should be enabled or not |
java.lang.String |
toString()
Gets a textual presentation of this object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChoiceItem(java.lang.String text, T object, boolean enable)
ChoiceItem
with the
given object.
text
- The text that should be used to represent
this choice.object
- The Object
contained by this
choice.enable
- Sets if the option should be enabled or notpublic ChoiceItem(java.lang.String text, T object)
ChoiceItem
with the
given object.
text
- The text that should be used to represent
this choice.object
- The Object
contained by this
choice.public ChoiceItem(T object)
ChoiceItem
with the
given object.
object
- The Object
contained by this
choice.Method Detail |
---|
public T getObject()
Object
contained by this choice.
Object
.public int getChoice()
int
.
java.lang.ClassCastException
- if the object
is
not an Integer
.public boolean isEnabled()
public java.lang.String toString()
toString
in class java.lang.Object
text
set in the constructor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |