Interface ITableContentProvider<HEADER,​HEADER_CELL,​ROW,​ROW_CELL>

  • All Known Implementing Classes:
    DefaultTableContentProvider

    public interface ITableContentProvider<HEADER,​HEADER_CELL,​ROW,​ROW_CELL>
    Interface for the UITable content provider.
    Author:
    Christopher Mindus
    • Method Detail

      • onInitialize

        void onInitialize​(UITable table)
        Called to initialize the content provider for the UITable instance.
      • onReinitialized

        void onReinitialized()
        This method is called when the table needs re-initialization due to e.g. a change of the VSTable or one of the columns.
      • dispose

        void dispose()
        Called when the content provider is no longer required by the table.
      • getHeader

        HEADER getHeader()
        Gets the header object.
        Returns:
        The header object, or null for no header.
      • getHeaderCells

        HEADER_CELL[] getHeaderCells​(HEADER header)
        Gets the header cells.
        Parameters:
        header - The header object, never null.
        Returns:
        The cell array.
      • getRows

        ROW[] getRows()
        Gets the row objects.
        Returns:
        The row object array.
      • getRowCells

        ROW_CELL[] getRowCells​(ROW row)
        Gets the cells for a row object.
        Parameters:
        row - The row object.
        Returns:
        The cells. Note: the array of cells may very well be shorter or longer than the actual number of columns in table.
      • isRowSelected

        boolean isRowSelected​(ROW row)
        Returns if the row is selected or not. This method is only called if the table has row selection enabled and has multiple selection.
        Returns:
        true if selected, false otherwise.
      • getFirstSelectedRow

        ROW getFirstSelectedRow()
        Returns the first selected row for single selection tables. This method is only called if the row selection is enabled and set to single selection.
        Returns:
        The selected row.
      • getRowStyle

        int getRowStyle​(ROW row,
                        int filteredRowIndex)
        Gets the row style.
        Parameters:
        row - The row index.
        filteredRowIndex - The filtered row index, not necessarily the same at the real row index.
        Returns:
        The row style index registered with the table, or zero for none.
      • onRowSelection

        void onRowSelection​(TableRow tableRow,
                            ROW row,
                            boolean on)
        Called when the row selection state is changed.
        Parameters:
        tableRow - The table row affected.
        row - The row whose selection state changed.
        on - The new selection state.
      • isRowCellSelected

        boolean isRowCellSelected​(ROW_CELL cell)
        Returns if the cell is selected or not. This method is called only when the table has cell selection enabled.
        Parameters:
        cell - The cell.
        Returns:
        true if cell is selected, false otherwise.
      • getRowCell

        TCell getRowCell​(ROW_CELL cell,
                         int columnIndex,
                         int rowIndex)
        Gets the row cell information.
        Parameters:
        cell - The cell object.
        columnIndex - The column index.
        rowIndex - The row index before filtering.
        Returns:
        The cell contents.
      • onCellUpdated

        void onCellUpdated​(ROW_CELL cell,
                           TCell value)
        Cell update event.
        Parameters:
        cell - The cell object.
        value - The new value.