com.esri.adf.web.data.tasks.validator
Class NumberSpinner
java.lang.Object
com.esri.adf.web.data.tasks.validator.GenericValidator
com.esri.adf.web.data.tasks.validator.NumberValidator
com.esri.adf.web.data.tasks.validator.NumberSpinner
- All Implemented Interfaces:
- TaskParamValidator, Serializable
public class NumberSpinner
- extends NumberValidator
This class enforces the same validation rules as NumberValidator
. The parameter is rendered as a textbox that
allows users to scroll to a desired value using the Up/Down arrow keys, the Page Up/Page Down keys, and the Home/End
keys.
For Example,
TaskParamDescriptor paramDescriptor = ...;
NumberSpinner spinnerValidator = new NumberSpinner(Integer.class);
spinnerValidator.setMinNumber(10);
spinnerValidator.setMaxNumber(20);
spinnerValidator.setSmallDelta(1);
spinnerValidator.setLargeDelta(3);
paramDescriptor.setValidator(spinnerValidator);
- See Also:
- Serialized Form
Method Summary |
long |
getLargeDelta()
Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Page Up/Page Down keys. |
long |
getSmallDelta()
Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Up/Down arrow keys. |
void |
setLargeDelta(long largeDelta)
Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Page Up/Page Down keys. |
void |
setSmallDelta(long smallDelta)
Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Up/Down arrow keys. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumberSpinner
public NumberSpinner(Class<?> numberType)
getSmallDelta
public long getSmallDelta()
- Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Up/Down arrow keys.
- Returns:
- the amount.
setSmallDelta
public void setSmallDelta(long smallDelta)
- Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Up/Down arrow keys.
- Parameters:
smallDelta
- the amount.
getLargeDelta
public long getLargeDelta()
- Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Page Up/Page Down keys.
- Returns:
- the amount.
setLargeDelta
public void setLargeDelta(long largeDelta)
- Specifies the amount by which the value will be incremented/decremented when the user scrolls for a new value using
the Page Up/Page Down keys.
- Parameters:
largeDelta
- the amount.