com.esri.adf.web.data.tasks.validator
Class NumberSpinner

java.lang.Object
  extended by com.esri.adf.web.data.tasks.validator.GenericValidator
      extended by com.esri.adf.web.data.tasks.validator.NumberValidator
          extended by 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

Field Summary
 
Fields inherited from class com.esri.adf.web.data.tasks.validator.GenericValidator
ADFDOJOTYPE
 
Constructor Summary
NumberSpinner(Class<?> numberType)
           
 
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 com.esri.adf.web.data.tasks.validator.NumberValidator
getRangeMessage, setDecimalDigits, setMaxNumber, setMinNumber, setRangeMessage
 
Methods inherited from class com.esri.adf.web.data.tasks.validator.GenericValidator
addValidationRule, getInvalidMessage, getPromptMessage, getValidationRules, isRequired, removeValidationRule, setInvalidMessage, setPromptMessage, setRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberSpinner

public NumberSpinner(Class<?> numberType)
Method Detail

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.