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 - dev@tchemit.fr
    • 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:
        true if 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 edited
        bean - the bean to locate
        fieldName - 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 edited
        bean - 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 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