|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.alogient.cameleon.extension.wicket.ui.component.SelectChoice<T>
T - class of keypublic abstract class SelectChoice<T extends Serializable>
Based class for representing a select list choice. Represents a user-defined type T and its display value.
Can be sorted via Collections.sort if T implements Comparable.
| Constructor Summary | |
|---|---|
SelectChoice(T key,
String display)
|
|
| Method Summary | |
|---|---|
int |
compareTo(SelectChoice<T> o)
Implementation of Comparable. |
String |
getDisplay()
|
T |
getKey()
|
String |
getKeyAsString()
|
void |
setDisplay(String display)
Set the display value |
void |
setKey(T key)
Set the key value |
String |
toString()
Return String version of key so returns a sensible value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SelectChoice(T key,
String display)
| Method Detail |
|---|
public String getDisplay()
public void setDisplay(String display)
display - value to setpublic T getKey()
public void setKey(T key)
key - value to setpublic String getKeyAsString()
public String toString()
PageParameters.
toString in class ObjectgetKeyAsString()public int compareTo(SelectChoice<T> o)
compareTo in interface Comparable<SelectChoice<T extends Serializable>>o - the item to compare
UnsupportedOperationException - if the underlying key class does not implement Comparable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||