PAJES 3.0.21

org.pajes.html
Class InputDecimal

java.lang.Object
  extended by org.pajes.html.Tag
      extended by org.pajes.html.Input
          extended by org.pajes.html.InputField
              extended by org.pajes.html.InputString
                  extended by org.pajes.html.InputDecimal
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HTML, InputMandatoryValidation, InputValidation

public class InputDecimal
extends InputString

This class creates an input field in a form that accepts an decimal value from the user. The default number of decimal places expected is 2.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.pajes.html.Input
TYPE_ATTRIBUTE
 
Fields inherited from class org.pajes.html.Tag
ON_CLICK_ATTRIBUTE, TAG_CLOSE, TAG_LEFT, TAG_RIGHT
 
Constructor Summary
InputDecimal(Form form, java.lang.String name)
          Creates a named input field.
InputDecimal(Form form, java.lang.String name, double value)
          Creates a named input field with a default value.
InputDecimal(Form form, java.lang.String name, double value, int size)
          Creates a named input field of the specified size.
InputDecimal(Form form, java.lang.String name, double value, int size, int maxLength)
          Creates a named input field of the specified size and maximum input length.
InputDecimal(Form form, java.lang.String name, double value, int size, int maxLength, boolean isRequired)
          Creates a named input field of the specified size and maximum input length.
InputDecimal(Form form, java.lang.String name, double value, int size, int maxLength, boolean isRequired, int decimals)
          Creates a named input field of the specified size and maximum input length.
InputDecimal(Form form, java.lang.String name, double value, int size, int maxLength, boolean isRequired, int decimals, double minValue)
          Creates a named input field of the specified size and maximum input length.
InputDecimal(Form form, java.lang.String name, double value, int size, int maxLength, boolean isRequired, int decimals, double minValue, double maxValue)
          Creates a named input field of the specified size and maximum input length.
InputDecimal(InputField source)
          Creates a named input field.
 
Method Summary
 InputDecimal setDecimalPlaces(int decimals)
          Sets the number of required decimal places.
 InputDecimal setMaximumValue(double maximumValue)
          Sets the maximum allowable value for this input element.
 InputDecimal setMinimumValue(double minimumValue)
          Sets the minimum allowable value for this input element.
 Input setValue(java.lang.String value)
          Sets the value attribute of this INPUT tag, and pads the decimal places to the number indicated with zeros.
 
Methods inherited from class org.pajes.html.InputField
getClientValidation, getMaxLength, getSize, isMandatory, setMandatory, setMandatory, setMandatory, setMaxLength, setMaxLength, setSize, setSize
 
Methods inherited from class org.pajes.html.Input
addClientValidation, addContent, clone, getClientValidation, getDOMReference, getFieldNameForErrorMessage, getForm, getInstance, getLabel, getName, getOnBlurHandler, getOnChangeHandler, getOnFocusHandler, getOnSelectHandler, getReadOnlyStyleSheetClass, getTabIndex, getType, getValue, isChangeFlagEnabled, isDisabled, isReadOnly, isRequiringValidation, logNoFormWarning, removeClientValidation, removeClientValidation, removeClientValidation, removeMandatoryClientValidation, setChanged, setChangedFlag, setContent, setDisabled, setFieldNameInErrorMessage, setFieldNameInErrorMessage, setForm, setId, setLabel, setName, setOnBlurHandler, setOnBlurValidation, setOnChangeHandler, setOnClickHandler, setOnFocusHandler, setOnSelectHandler, setReadOnly, setReadOnlyStyleSheetClass, setTabIndex, setTabIndex, setTabIndex, write
 
Methods inherited from class org.pajes.html.Tag
addAttribute, addAttributes, addAttributes, clearAttribute, clearAttributes, destroy, getAttribute, getAttributes, getAttributeSet, getContainer, getContent, getDocument, getId, getOnClickHandler, getOnDBLClickHandler, getOnKeyDownHandler, getOnKeyPressHandler, getOnKeyUpHandler, getOnMouseDownHandler, getOnMouseOutHandler, getOnMouseOverHandler, getOnMouseUpHandler, getParent, getStyle, getStyleSheetClass, getTagName, getTitle, getWritePermission, hasAttribute, init, initAttributes, isChildOf, isChildOf, isWritable, isWritable, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContainer, setContent, setOnDBLClickHandler, setOnKeyDownHandler, setOnKeyPressHandler, setOnKeyUpHandler, setOnMouseDownHandler, setOnMouseOutHandler, setOnMouseOverHandler, setOnMouseUpHandler, setParent, setStyle, setStyleSheetClass, setTagName, setTitle, setWritable, setWriteAttributes, setWriteEndTag, setWritelnAfter, setWritelnAfterContent, setWritelnBefore, setWritelnBeforeContent, setWritePermission, toString, writeContent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pajes.html.InputValidation
getDOMReference, getName, isRequiringValidation, setOnBlurValidation
 

Constructor Detail

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name)
Creates a named input field.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value)
Creates a named input field with a default value.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign to the field.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value,
                    int size)
Creates a named input field of the specified size.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign.
size - the display size of the input field.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value,
                    int size,
                    int maxLength)
Creates a named input field of the specified size and maximum input length.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign.
size - the display size of the input field.
maxLength - the maximum number of characters to accept into the field.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value,
                    int size,
                    int maxLength,
                    boolean isRequired)
Creates a named input field of the specified size and maximum input length.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign.
size - the display size of the input field.
maxLength - the maximum number of characters to accept into the field.
isRequired - true if a value is required, or false if it may be left blank.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value,
                    int size,
                    int maxLength,
                    boolean isRequired,
                    int decimals)
Creates a named input field of the specified size and maximum input length.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign.
size - the display size of the input field.
maxLength - the maximum number of characters to accept into the field.
isRequired - true if a value is required, or false if it may be left blank.
decimals - the number of required decimal places.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value,
                    int size,
                    int maxLength,
                    boolean isRequired,
                    int decimals,
                    double minValue)
Creates a named input field of the specified size and maximum input length.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign.
size - the display size of the input field.
maxLength - the maximum number of characters to accept into the field.
isRequired - true if a value is required, or false if it may be left blank.
decimals - the number of required decimal places.
minValue - the minimum allowable value for this field.

InputDecimal

public InputDecimal(Form form,
                    java.lang.String name,
                    double value,
                    int size,
                    int maxLength,
                    boolean isRequired,
                    int decimals,
                    double minValue,
                    double maxValue)
Creates a named input field of the specified size and maximum input length.

Parameters:
form - the form on which this input field will appear. Note that the element must still be added to the form - this reference is used by the getDOMReference() method to determine the fully qualified element name.
name - the name to apply to the input object, so that it may be manipulated using client-side JavaScript.
value - the default value to assign.
size - the display size of the input field.
maxLength - the maximum number of characters to accept into the field.
isRequired - true if a value is required, or false if it may be left blank.
decimals - the number of required decimal places.
minValue - the minimum allowable value for this field.
maxValue - the maximum allowable value for this field.

InputDecimal

public InputDecimal(InputField source)
Creates a named input field.

Parameters:
source - the input field from which this input field will be created.
Method Detail

setDecimalPlaces

public InputDecimal setDecimalPlaces(int decimals)
Sets the number of required decimal places.

Parameters:
decimals - the number of required decimal places.
Returns:
the modified HTMLDecimal object.

setMaximumValue

public InputDecimal setMaximumValue(double maximumValue)
Sets the maximum allowable value for this input element.

Parameters:
maximumValue - the maximum allowable value for this input element.
Returns:
the modified HTMLDecimal object.

setMinimumValue

public InputDecimal setMinimumValue(double minimumValue)
Sets the minimum allowable value for this input element.

Parameters:
minimumValue - the minimum allowable value for this input element.
Returns:
the modified HTMLDecimal object.

setValue

public Input setValue(java.lang.String value)
Sets the value attribute of this INPUT tag, and pads the decimal places to the number indicated with zeros.

Overrides:
setValue in class Input
Parameters:
value - the value to assign.
Returns:
the modified Input object.

PAJES 3.0.21

Copyright © 1998-2007 Viridian Pty Limited. All Rights Reserved.