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

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

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

Data provider retrieving the selected values of a list.

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

Constructor Summary
JListSelectedValuesProvider(JList list)
          Constructor specifying the list to get the selected values from.
By default, the list values will be cast to DPO.
JListSelectedValuesProvider(JList list, com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
          Constructor specifying the list to get the selected values from, and the transformer to convert the list values to DPO.
 
Method Summary
 JList getComponent()
          Gets the component providing the data to be validated.
 Collection<DPO> getData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JListSelectedValuesProvider

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

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

JListSelectedValuesProvider

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

Parameters:
list - List to get the selected values from.
transformer - Transformer to convert the list values.
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 Collection<DPO> getData()
Specified by:
getData in interface com.google.code.validationframework.api.dataprovider.DataProvider<Collection<DPO>>
See Also:
DataProvider.getData()


Copyright © 2013. All Rights Reserved.