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

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

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

Data provider retrieving the selected value of a list.

See Also:
DataProvider, JList, JList.getSelectedValue(), JListSelectedIndexProvider, JListSelectedIndicesProvider, JListSelectedValuesProvider

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

JListSelectedValueProvider

public JListSelectedValueProvider(JList list)
Constructor specifying the list to get the selected value from.
By default, the list value will be cast to DPO.

Parameters:
list - List to get the selected value from.

JListSelectedValueProvider

public JListSelectedValueProvider(JList list,
                                  com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the list to get the selected value from, and the transformer to convert the list value to DPO.

Parameters:
list - List to get the selected value from.
transformer - Transformer to convert the list value.
Method Detail

getComponent

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