com.google.code.validationframework.swing.dataprovider
Class JFormattedTextFieldValueProvider<DPO>

java.lang.Object
  extended by com.google.code.validationframework.swing.dataprovider.JFormattedTextFieldValueProvider<DPO>
All Implemented Interfaces:
com.google.code.validationframework.api.dataprovider.DataProvider<DPO>

public class JFormattedTextFieldValueProvider<DPO>
extends Object
implements com.google.code.validationframework.api.dataprovider.DataProvider<DPO>

Data provider reading the value from a formatted textfield.
Note that the value is not read from the model, but instead corresponds to the current text.

See Also:
DataProvider, JFormattedTextField, JTextComponent.getText()

Constructor Summary
JFormattedTextFieldValueProvider(JFormattedTextField formattedTextField)
          Constructor specifying the formatted textfield to get the value from.
JFormattedTextFieldValueProvider(JFormattedTextField formattedTextField, com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
          Constructor specifying the formatted textfield to get the value from and the transformer to convert it to the required type.
 
Method Summary
 JFormattedTextField getComponent()
          Gets the component providing the data to be validated.
 DPO getData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JFormattedTextFieldValueProvider

public JFormattedTextFieldValueProvider(JFormattedTextField formattedTextField)
Constructor specifying the formatted textfield to get the value from.

Parameters:
formattedTextField - Formatted textfield to get the value from.

JFormattedTextFieldValueProvider

public JFormattedTextFieldValueProvider(JFormattedTextField formattedTextField,
                                        com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the formatted textfield to get the value from and the transformer to convert it to the required type.

Parameters:
formattedTextField - Formatted textfield to get the value from.
transformer - Transformer used to convert the object parsed from the spinner to the expected type.
Method Detail

getComponent

public JFormattedTextField getComponent()
Gets the component providing the data to be validated.

Returns:
Component providing the data to be validated.

getData

public DPO getData()
Specified by:
getData in interface com.google.code.validationframework.api.dataprovider.DataProvider<DPO>
See Also:
DataProvider.getData()


Copyright © 2013. All Rights Reserved.