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
    boolean acceptType​(java.lang.Class<?> beanType)
    Tests if the given type can be managed by this locator.
    O locateBean​(javax.swing.table.TableModel tableModel, int rowIndex)
    Locate the bean given his row index in the table.
    int locateBeanRowIndex​(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:
      true if 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 edited
      bean - the bean to locate
      fieldName - the field to locate
      Returns:
      the cell where to find data
    • locateBeanRowIndex

      int locateBeanRowIndex​(javax.swing.table.TableModel tableModel, O bean)
      Locate the index of the row of the given bean.
      Parameters:
      tableModel - the table model where data are edited
      bean - the bean to find
      Returns:
      the row index of the given bean in the table.
    • locateBean

      O locateBean​(javax.swing.table.TableModel tableModel, int rowIndex)
      Locate the bean given his row index in the table.
      Parameters:
      tableModel - the table model where data are edited
      rowIndex - the row index of the bean to find in the editor
      Returns:
      the bean corresponding to the given row index in the editor