Interface GridCell<T>

All Superinterfaces:
Cell<T>

public interface GridCell<T> extends Cell<T>
Specialization of Cell specifically used by VirtualGrid and subclasses.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    updateCoordinates(int row, int column)
    Allows implementations to store the cell index as a pair of coordinates [row, column].
    default void
    updateIndex(int index)
    Automatically called by the virtualized control.

    Methods inherited from interface io.github.palexdev.virtualizedfx.cell.Cell

    afterLayout, beforeLayout, dispose, getNode, updateItem
  • Method Details

    • updateIndex

      default void updateIndex(int index)
      Automatically called by the virtualized control.

      Cells are dumb, they have no logic, no state. This method allow cells implementations to keep track of a cell's index.

      Default implementation is empty.

      For GridCells the given index is the linear index of the item, to use the coordinates cells should rely on updateCoordinates(int, int).
      Specified by:
      updateIndex in interface Cell<T>
      See Also:
    • updateCoordinates

      default void updateCoordinates(int row, int column)
      Allows implementations to store the cell index as a pair of coordinates [row, column]. This method already provides the two coordinates.