|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--voji.utils.VChoice
This class facilates implementing a choice for the user. There are methods for mapping between names, values and indices.
Field Summary | |
protected java.lang.Object[][] |
data
An Array of (name,value) pairs containing the data |
protected int |
defIndex
The default index. |
Constructor Summary | |
VChoice()
Creates a new VChoice instance without data |
|
VChoice(java.lang.Object[] initValues)
Creates a new VChoice instance with initial data |
Method Summary | |
java.lang.Object[] |
elements()
Returns an Array for Lists and ComboBoxes |
java.lang.Object |
i2v(int index)
Returns the value of an index |
int |
v2i(java.lang.Object value)
Returns the index of a value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object[][] data
protected int defIndex
null
value.
Constructor Detail |
public VChoice(java.lang.Object[] initValues)
initValues
- an array of name-value-name-value-...public VChoice()
Method Detail |
public int v2i(java.lang.Object value)
value
- the value that has to be looked for
public java.lang.Object i2v(int index)
index
- the index where to look at
public java.lang.Object[] elements()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |