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

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

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

Data provider reading the value from the model of a spinner.

See Also:
DataProvider, JSpinner

Constructor Summary
JSpinnerModelValueProvider(JSpinner spinner)
          Constructor specifying the spinner to get the value from.
By default, the spinner value will be cast to DPO.
JSpinnerModelValueProvider(JSpinner spinner, com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
          Constructor specifying the spinner to get the value from, and the transformer to convert the spinner value to DPO.
 
Method Summary
 JSpinner 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

JSpinnerModelValueProvider

public JSpinnerModelValueProvider(JSpinner spinner)
Constructor specifying the spinner to get the value from.
By default, the spinner value will be cast to DPO.

Parameters:
spinner - Spinner to get the value from.

JSpinnerModelValueProvider

public JSpinnerModelValueProvider(JSpinner spinner,
                                  com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the spinner to get the value from, and the transformer to convert the spinner value to DPO.

Parameters:
spinner - Spinner to get the value from.
transformer - Transformer to convert the spinner value.
Method Detail

getComponent

public JSpinner 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.