|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tools.forms.FormField org.w3c.tools.forms.OptionField
public class OptionField
Field Summary |
---|
Fields inherited from class org.w3c.tools.forms.FormField |
---|
manager, name, title |
Constructor Summary | |
---|---|
OptionField(FormManager manager,
java.lang.String name,
java.lang.String title,
java.lang.String[] options,
int value)
Create an option field. |
Method Summary | |
---|---|
boolean |
acceptChange(int idx)
Do we accept to change to the given (valid) index ? |
java.awt.Component |
getEditor()
Get an editor to edit this option's value. |
int |
getIntValue()
Get the selected option as its index in our array of options. |
java.lang.String |
getStringValue()
Get the selected option as a String. |
java.lang.Object |
getValue()
Get this field's value in its native type. |
void |
setValue(int idx,
boolean notify,
boolean update)
Set this option's value. |
void |
setValue(java.lang.Object value,
boolean notify,
boolean update)
Set this option's value. |
void |
setValue(java.lang.String value,
boolean notify,
boolean update)
Set this option's value. |
Methods inherited from class org.w3c.tools.forms.FormField |
---|
getName, getTitle, gotFocus, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OptionField(FormManager manager, java.lang.String name, java.lang.String title, java.lang.String[] options, int value) throws IllegalFieldValueException
IllegalFieldValueException
- if the value isn't acceptedMethod Detail |
---|
public boolean acceptChange(int idx)
public java.lang.Object getValue()
getValue
in class FormField
public int getIntValue()
public java.lang.String getStringValue()
public void setValue(java.lang.Object value, boolean notify, boolean update) throws IllegalFieldValueException
setValue
in class FormField
value
- The new value.update
- Should we update the editor view.notify
- Should we notify the manager for this change ?
IllegalFieldValueException
- if the value isn't acceptedpublic void setValue(int idx, boolean notify, boolean update) throws IllegalFieldValueException
idx
- The index of the option to set.update
- Should we update our editor's view.
IllegalFieldValueException
- if the value isn't acceptedpublic void setValue(java.lang.String value, boolean notify, boolean update) throws IllegalFieldValueException
IllegalFieldValueException
- if the value isn't acceptedpublic java.awt.Component getEditor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |