|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsky.engine.field.BaseField
sky.engine.field.IntField
sky.engine.field.SelectionField
| Field Summary | |
protected boolean |
_isFirstInvalid
True, if the first value from the specified list of values can also be selected. |
protected boolean |
_multiple
True, if multiple values can be selected. |
protected java.util.ArrayList |
_options
Actual list of values from which a subset of values can be selected. |
protected int |
_size
Number of possible values. |
| Fields inherited from class sky.engine.field.BaseField |
_aliases, _default, _defaulted, _maxlen, _minlen, _name, _required, _values, _vislen, STRINGS |
| Constructor Summary | |
SelectionField(java.lang.String name,
boolean required)
Constructor |
|
SelectionField(java.lang.String name,
boolean required,
java.lang.String dflt,
boolean isFirstInvalid,
int size,
boolean multiple)
Constructor |
|
| Method Summary | |
void |
addValue(java.lang.String value)
Add a selected value to this field. |
java.lang.String |
checkValue(java.lang.String value)
Check if input string is a valid value. |
void |
destory()
Destroy this field. |
protected boolean |
hasValue(java.lang.String value)
Determine if the input string contains a valid value for this field. |
void |
populateOptions()
Override this method to fill the list of possible values. |
java.lang.String |
toHTML()
Generate HTML code for a GUI component of this field. |
| Methods inherited from class sky.engine.field.IntField |
getIntData |
| Methods inherited from class sky.engine.field.BaseField |
addAlias, clear, getAliases, getData, getDataSize, getHTMLData, getName, getRequired, getSQLData, getStringData, hasAliases, removeAliases, removeValues, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface sky.engine.field.Field |
addAlias, clear, getAliases, getDataSize, getHTMLData, getName, getRequired, getSQLData, getStringData, hasAliases, removeAliases, removeValues, toString |
| Field Detail |
protected int _size
protected java.util.ArrayList _options
protected boolean _multiple
protected boolean _isFirstInvalid
| Constructor Detail |
public SelectionField(java.lang.String name,
boolean required)
throws ErrorMessage
name - field namerequired - true if field value is required; else, false.
ErrorMessage - if there is a problem in constructing this object.
public SelectionField(java.lang.String name,
boolean required,
java.lang.String dflt,
boolean isFirstInvalid,
int size,
boolean multiple)
throws ErrorMessage
name - field namerequired - true if field value(s) are required; else, false.dflt - default value if a value is not specified by the user.isFirstInvalid - Is the first item from the list of possible values a valid value.size - Maximum number of possible values.multiple - true if multiple values can be selected; otherwise, false.
ErrorMessage - if there is a problem in constructing this object.| Method Detail |
public void populateOptions()
throws ErrorMessage
ErrorMessage - if there is any problem.protected boolean hasValue(java.lang.String value)
hasValue in class BaseField
public java.lang.String checkValue(java.lang.String value)
throws ErrorMessage
checkValue in interface FieldcheckValue in class IntFieldErrorMessage - if the input string is not a valid value.
public void addValue(java.lang.String value)
throws ErrorMessage
addValue in interface FieldaddValue in class IntFieldvalue - input string that represents an integer value.
ErrorMessage - if there is any problem in adding input string as value.public java.lang.String toHTML()
toHTML in interface FieldtoHTML in class BaseFieldpublic void destory()
destory in interface Fielddestory in class BaseField
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||