com.smartgwt.client.widgets.form.validator
Class FloatPrecisionValidator

java.lang.Object
  extended by com.smartgwt.client.core.JsObject
      extended by com.smartgwt.client.core.DataClass
          extended by com.smartgwt.client.widgets.form.validator.Validator
              extended by com.smartgwt.client.widgets.form.validator.FloatPrecisionValidator

public class FloatPrecisionValidator
extends Validator

Tests whether the value for this field is a floating point number with the appropriate number of decimal places - specified in validator.precision If the value is of higher precision, if validator.roundToPrecision is specified, the value will be rounded to the specified number of decimal places and validation will pass, otherwise validation will fail.


Field Summary
 
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
 
Fields inherited from class com.smartgwt.client.core.JsObject
jsObj
 
Constructor Summary
FloatPrecisionValidator()
           
 
Method Summary
 int getPrecision()
          Return the precision.
 int getRoundToPrecision()
          Return the roundToPrecision.
 void setPrecision(int precision)
          Set the precision.
 void setRoundToPrecision(int roundToPrecision)
          Set the roundToPrecision.
 
Methods inherited from class com.smartgwt.client.widgets.form.validator.Validator
addValidatorDefinition, create, getClientOnly, getDependentFields, getOrCreateRef, getStopIfFalse, getStopOnError, getType, getTypeAsString, getValidateOnChange, setClientOnly, setDependentFields, setErrorMessage, setStopIfFalse, setStopOnError, setType, setType, setValidateOnChange
 
Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
 
Methods inherited from class com.smartgwt.client.core.JsObject
equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatPrecisionValidator

public FloatPrecisionValidator()
Method Detail

setPrecision

public void setPrecision(int precision)
Set the precision.

Parameters:
precision - the precision

getPrecision

public int getPrecision()
Return the precision.

Returns:
the precision

setRoundToPrecision

public void setRoundToPrecision(int roundToPrecision)
Set the roundToPrecision.

Parameters:
roundToPrecision - the roundToPrecision

getRoundToPrecision

public int getRoundToPrecision()
Return the roundToPrecision.

Returns:
the roundToPrecision