|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.object.value.AbstractNakedValue
org.nakedobjects.object.value.Option
Value object representing one of a number of choices. The options are specified as strings.
NOTE: this class currently does not support about listeners.
| Constructor Summary | |
Option(java.lang.String[] options)
|
|
Option(java.lang.String[] options,
int selected)
|
|
| Method Summary | |
void |
clear()
Clears the value so that it is empty, i.e. |
void |
copyObject(Naked object)
Copies the specified object's contained data to this instance. |
java.lang.String |
getObjectHelpText()
Returns a textual desctiption of the object - its contents and possible uses. |
java.lang.String |
getOption(int index)
|
java.lang.String |
getOptionAt(int index)
|
java.lang.String[] |
getOptions()
|
java.lang.String |
getSelection()
|
int |
getSelectionIndex()
|
boolean |
hasOption(java.lang.String expectedTitle)
|
boolean |
isEmpty()
Returns true if the object contains no data, eg when new |
boolean |
isSameAs(Naked object)
Compares the selected options if the specified object is a Option object else returns false. |
int |
noOptions()
|
void |
parse(java.lang.String text)
Takes a user entry string which is parsed to set up the object. |
void |
reset()
Reset this option so it has the first option selected. |
void |
restoreString(java.lang.String data)
Takes a storage string and uses it reinstate this value object to its previous state/ |
java.lang.String |
saveString()
Returns a basic string representation of this value for storage purposes. |
void |
setSelection(java.lang.String selection)
|
void |
setSelectionIndex(int selection)
|
java.lang.String |
stringValue()
|
Title |
title()
Returns a Title object describing the object. |
void |
update(NakedValue object)
|
| Methods inherited from class org.nakedobjects.object.value.AbstractNakedValue |
about, addNakedValueListener, checkCanOperate, contextualTitle, deepCopy, dumpObject, fireValueChanged, fireValueChanged, getClassName, getFullClassName, getLogger, isNull, isValid, nakedValueListeners, removeNakedValueListener, setAbout, setNull, setValidity, summary, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Option(java.lang.String[] options)
public Option(java.lang.String[] options,
int selected)
| Method Detail |
public void clear()
NakedValueisEmpty returns true.
public void copyObject(Naked object)
public java.lang.String getObjectHelpText()
Naked
getObjectHelpText in interface NakedgetObjectHelpText in class AbstractNakedValuepublic java.lang.String getOption(int index)
public java.lang.String getOptionAt(int index)
public java.lang.String[] getOptions()
public java.lang.String getSelection()
public int getSelectionIndex()
public boolean isEmpty()
Naked
public boolean isSameAs(Naked object)
Option object else returns false.
object - the object to compare
Naked.isSameAs(Naked)public int noOptions()
public void parse(java.lang.String text)
throws ValueParseException
NakedValue
ValueParseExceptionNakedValue.restoreString(String)public void reset()
NakedValue.reset()public void setSelection(java.lang.String selection)
public void setSelectionIndex(int selection)
public java.lang.String stringValue()
public Title title()
Naked
public void update(NakedValue object)
public boolean hasOption(java.lang.String expectedTitle)
public void restoreString(java.lang.String data)
NakedValue
data - NakedValue.parse(String)public java.lang.String saveString()
NakedValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||