com.google.code.validationframework.swing.rule
Class JSpinnerFormatterRule

java.lang.Object
  extended by com.google.code.validationframework.base.rule.string.AbstractStringBooleanRule
      extended by com.google.code.validationframework.swing.rule.JSpinnerFormatterRule
All Implemented Interfaces:
com.google.code.validationframework.api.rule.Rule<String,Boolean>

public class JSpinnerFormatterRule
extends com.google.code.validationframework.base.rule.string.AbstractStringBooleanRule

Convenience rule that will check if the formatter of the editor component of a spinner can successfully parse the input text.


Field Summary
 
Fields inherited from class com.google.code.validationframework.base.rule.string.AbstractStringBooleanRule
trimDataBeforeValidation
 
Constructor Summary
JSpinnerFormatterRule(JSpinner spinner)
          Constructor specifying the spinner whose formatter is to be checked.
 
Method Summary
 JSpinner getComponent()
          Gets the spinner whose formatter is to be checked.
 Boolean validate(String data)
           
 
Methods inherited from class com.google.code.validationframework.base.rule.string.AbstractStringBooleanRule
getTrimDataBeforeValidation, setTrimDataBeforeValidation, trimIfNeeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpinnerFormatterRule

public JSpinnerFormatterRule(JSpinner spinner)
Constructor specifying the spinner whose formatter is to be checked.

Parameters:
spinner - Spinner whose formatter is to be checked.
Method Detail

getComponent

public JSpinner getComponent()
Gets the spinner whose formatter is to be checked.

Returns:
Spinner whose formatter is to be checked.

validate

public Boolean validate(String data)
See Also:
Rule.validate(Object)


Copyright © 2013. All Rights Reserved.