| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.colle.forms.Text
net.sf.colle.forms.Number
FormElement implementation for numbers. Created: 10 Jul 2001
| Field Summary | |
| static String | ERROR_TOO_LARGE | 
| static String | ERROR_TOO_SMALL | 
| Fields inherited from class net.sf.colle.forms.Text | 
| ERROR_TOO_LONG, ERROR_TOO_SHORT | 
| Fields inherited from interface net.sf.colle.forms.FormElement | 
| ERROR_INVALID, ERROR_REQUIRED, UNKNOWN, VALID | 
| Constructor Summary | |
| Number(String psName,
       Object pxApplicationElement,
       FormElement pxParent,
       String psDefaultValue,
       boolean pbRequired,
       double pnMinValue,
       double pnMaxValue)Create a new number form element. | |
| Method Summary | |
| protected  String | getDerivedType()Allows derived classes to define the type placed to the out-going XML response document. | 
|  double | getDouble()Returns the value as a double | 
|  int | getInteger()Returns the value as a integer | 
|  void | setDouble(double pnValue)update the value with new double value. | 
|  void | setInteger(int pnValue)update the value with new integer value. | 
|  int | validate(boolean pbRecursive)validate the element. | 
| Methods inherited from class net.sf.colle.forms.Text | 
| getApplicationElement, getErrorCode, getName, getPath, getRequired, getText, map, service, setErrorCode, setText, setToDefault | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final String ERROR_TOO_SMALL
public static final String ERROR_TOO_LARGE
| Constructor Detail | 
public Number(String psName,
              Object pxApplicationElement,
              FormElement pxParent,
              String psDefaultValue,
              boolean pbRequired,
              double pnMinValue,
              double pnMaxValue)
psName - name of elementpsDefaultValue - initial default valuepbRequired - required elementpxParent - path to the parent in the xml tree| Method Detail | 
public int getInteger()
public void setInteger(int pnValue)
pnValue - new valuepublic double getDouble()
public void setDouble(double pnValue)
pnValue - new valuepublic int validate(boolean pbRecursive)
validate in interface FormElementvalidate in class TextpbRecursive - on true check child elements
protected String getDerivedType()
getDerivedType in class Text| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||