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

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

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

Convenience rule that will check if the formatter of a formatted textfield can successfully parse the input text.


Field Summary
 
Fields inherited from class com.google.code.validationframework.base.rule.string.AbstractStringBooleanRule
trimDataBeforeValidation
 
Constructor Summary
JFormattedTextFieldFormatterRule(JFormattedTextField formattedTextField)
          Constructor specifying the formatted textfield whose formatter is to be checked.
 
Method Summary
 JFormattedTextField getComponent()
          Gets the formatted textfield 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

JFormattedTextFieldFormatterRule

public JFormattedTextFieldFormatterRule(JFormattedTextField formattedTextField)
Constructor specifying the formatted textfield whose formatter is to be checked.

Parameters:
formattedTextField - Formatted textfield whose formatter is to be checked.
Method Detail

getComponent

public JFormattedTextField getComponent()
Gets the formatted textfield whose formatter is to be checked.

Returns:
Formatted textfield whose formatter is to be checked.

validate

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


Copyright © 2013. All Rights Reserved.