|
|||||||||
| 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
public class ChoiceItem
Can be used as a single choice for the choice dialog.
| Field Summary | |
|---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
LICENSE
|
static java.lang.String |
REVISION
|
| Constructor Summary | |
|---|---|
ChoiceItem(java.lang.String text,
int choice)
Creates a new ChoiceItem with the
object beeing a new Integer(choice). |
|
ChoiceItem(java.lang.String text,
java.lang.Object object)
Creates a new ChoiceItem with the
given object. |
|
| Method Summary | |
|---|---|
int |
getChoice()
Gets the choice as an int. |
java.lang.Object |
getObject()
Gets the Object contained by this choice. |
java.lang.String |
toString()
Gets a textual presentation of this object. |
| 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 ChoiceItem(java.lang.String text,
int choice)
ChoiceItem with the
object beeing a new Integer(choice).
text - The text that should be used to represent
this choice.choice - An int identifying this choice.
public ChoiceItem(java.lang.String text,
java.lang.Object object)
ChoiceItem with the
given object.
text - The text that should be used to represent
this choice.object - The Object contained by this
choice.| Method Detail |
|---|
public java.lang.Object getObject()
Object contained by this choice.
Object.public int getChoice()
int.
java.lang.ClassCastException - if the object is
not an Integer.public java.lang.String toString()
toString in class java.lang.Objecttext set in the constructor.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||