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

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

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

Provider of the selected value of the current combobox editor component from a given table.
Note that if the table is not in editing, no value can be provided.

See Also:
DataProvider, JTable, JTable.getCellEditor()

Constructor Summary
JTableComboBoxEditorSelectedValueProvider(JTable table)
          Constructor specifying the table holding the editor component to get the text from.
JTableComboBoxEditorSelectedValueProvider(JTable table, com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
          Constructor specifying the table holding the editor component to get the text from and the transformer used to convert the selected object from the combobox to the expected type.
 
Method Summary
 JTable 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

JTableComboBoxEditorSelectedValueProvider

public JTableComboBoxEditorSelectedValueProvider(JTable table)
Constructor specifying the table holding the editor component to get the text from.

Parameters:
table - Editable table.

JTableComboBoxEditorSelectedValueProvider

public JTableComboBoxEditorSelectedValueProvider(JTable table,
                                                 com.google.code.validationframework.base.transform.Transformer<Object,DPO> transformer)
Constructor specifying the table holding the editor component to get the text from and the transformer used to convert the selected object from the combobox to the expected type.

Parameters:
table - Editable table.
transformer - Transformer used to convert the selected object from the combobox editor component to the expected type.
Method Detail

getComponent

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