Package org.nuiton.jaxx.validator.swing
Interface SwingListValidatorDataLocator<O>
-
public interface SwingListValidatorDataLocator<O>Object that can locate for a givenSwingListValidatorMessage, the cell of this data in a table editor.- Since:
- 2.5.3
- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanacceptType(Class<?> beanType)Tests if the given type can be managed by this locator.OlocateBean(TableModel tableModel, int rowIndex)Locate the bean given his row index in the table.intlocateBeanRowIndex(TableModel tableModel, O bean)Locate the index of the row of the given bean.org.apache.commons.lang3.tuple.Pair<Integer,Integer>locateDataCell(TableModel tableModel, O bean, String fieldName)Locate the cell of the given data.
-
-
-
Method Detail
-
acceptType
boolean acceptType(Class<?> beanType)
Tests if the given type can be managed by this locator. Useful if there is more than one locator used for a same list validation table model.- Parameters:
beanType- the type of bean to test- Returns:
trueif this locator can manage this bean type.
-
locateDataCell
org.apache.commons.lang3.tuple.Pair<Integer,Integer> locateDataCell(TableModel tableModel, O bean, String fieldName)
Locate the cell of the given data.- Parameters:
tableModel- the table model where data are editedbean- the bean to locatefieldName- the field to locate- Returns:
- the cell where to find data
-
locateBeanRowIndex
int locateBeanRowIndex(TableModel tableModel, O bean)
Locate the index of the row of the given bean.- Parameters:
tableModel- the table model where data are editedbean- the bean to find- Returns:
- the row index of the given bean in the table.
-
locateBean
O locateBean(TableModel tableModel, int rowIndex)
Locate the bean given his row index in the table.- Parameters:
tableModel- the table model where data are editedrowIndex- the row index of the bean to find in the editor- Returns:
- the bean corresponding to the given row index in the editor
-
-