Interface GridSubject


public interface GridSubject
A widget of the GRID shape as GridContract drives it: a table or a calendar, whose container carries a TableFacet, whose header cells sit at row −1 and whose data cells carry their place. The rows are the rows contract's; this subject says what the columns are, which of them sort, and where the cursor is.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds the widget in a fresh root and returns the root.
    The header cells' names, in column order.
    int @Nullable []
    The cell the widget's cursor is on, as {row, column} in the published grid's coordinates, or null while it is on no cell.
    boolean
    isSortable(int column)
    Whether a press on the column's header sorts the rows by it.
    sortOf(int column)
    The direction the rows are sorted in by the column now, or NONE.
    The widget itself, which holds the keyboard when focused.
  • Method Details

    • build

      Widget<?> build()
      Builds the widget in a fresh root and returns the root.
    • widget

      Widget<?> widget()
      The widget itself, which holds the keyboard when focused.
    • columnNames

      List<String> columnNames()
      The header cells' names, in column order.
    • isSortable

      boolean isSortable(int column)
      Whether a press on the column's header sorts the rows by it.
    • sortOf

      CellFacet.Sort sortOf(int column)
      The direction the rows are sorted in by the column now, or NONE.
    • cursor

      int @Nullable [] cursor()
      The cell the widget's cursor is on, as {row, column} in the published grid's coordinates, or null while it is on no cell.