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

java.lang.Object
  extended by com.google.code.validationframework.swing.dataprovider.JFormattedTextFieldLastValidValueProvider<DPO>
Type Parameters:
DPO - Type of data in the formatted textfield.
You may use Object.
All Implemented Interfaces:
com.google.code.validationframework.api.dataprovider.DataProvider<DPO>

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

Data provider retrieving the last valid value from a formatted textfield.

See Also:
DataProvider, JFormattedTextField, JFormattedTextField.getValue()

Constructor Summary
JFormattedTextFieldLastValidValueProvider(JFormattedTextField formattedTextField)
          Constructor specifying the formatted textfield to retrieve the last valid value from.
By default, the formatted textfield will be cast to DPO.
JFormattedTextFieldLastValidValueProvider(JFormattedTextField formattedTextField, com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
          Constructor specifying the formatted textfield to retrieve the last valid value from, and the transformer to convert the formatted textfield value to DPO.
 
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

JFormattedTextFieldLastValidValueProvider

public JFormattedTextFieldLastValidValueProvider(JFormattedTextField formattedTextField)
Constructor specifying the formatted textfield to retrieve the last valid value from.
By default, the formatted textfield will be cast to DPO.

Parameters:
formattedTextField - Formatted textfield to retrieve the last valid value from.

JFormattedTextFieldLastValidValueProvider

public JFormattedTextFieldLastValidValueProvider(JFormattedTextField formattedTextField,
                                                 com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the formatted textfield to retrieve the last valid value from, and the transformer to convert the formatted textfield value to DPO.

Parameters:
formattedTextField - Formatted textfield to retrieve the last valid value from.
transformer - Transformer to convert the formatted textfield value.
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.