Package jaxx.runtime.validator.swing
Interface SwingListValidatorDataLocator<O>
public interface SwingListValidatorDataLocator<O>
Object that can locate for a given
SwingListValidatorMessage,
the cell of this data in a table editor.- Since:
- 2.5.3
- Author:
- Tony Chemit - chemit@codelutin.com
-
Method Summary
Modifier and Type Method Description booleanacceptType(java.lang.Class<?> beanType)Tests if the given type can be managed by this locator.OlocateBean(javax.swing.table.TableModel tableModel, int rowIndex)Locate the bean given his row index in the table.intlocateBeanRowIndex(javax.swing.table.TableModel tableModel, O bean)Locate the index of the row of the given bean.org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.Integer>locateDataCell(javax.swing.table.TableModel tableModel, O bean, java.lang.String fieldName)Locate the cell of the given data.
-
Method Details
-
acceptType
boolean acceptType(java.lang.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<java.lang.Integer,java.lang.Integer> locateDataCell(javax.swing.table.TableModel tableModel, O bean, java.lang.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
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
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
-