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

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

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

Data provider retrieving the selected value of a combobox.

See Also:
DataProvider, JComboBoxSelectedIndexProvider, JComboBox, JComboBox.getSelectedItem()

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

JComboBoxSelectedValueProvider

public JComboBoxSelectedValueProvider(JComboBox comboBox)
Constructor specifying the combobox to get the selected value from.
By default, the combobox value will be cast to DPO.

Parameters:
comboBox - Combobox to get the selected value from.

JComboBoxSelectedValueProvider

public JComboBoxSelectedValueProvider(JComboBox comboBox,
                                      com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the combobox to get the selected value from, and the transformer to convert the combobox value to DPO.

Parameters:
comboBox - Combobox to get the selected value from.
transformer - Transformer to convert the combobox value.
Method Detail

getComponent

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