Record Class CellFacet

java.lang.Object
java.lang.Record
limn.accessibility.CellFacet
Record Components:
row - the cell's row as shown, from zero; -1 for a header cell, -2 for a footer cell
column - the cell's column as shown, from zero
sort - which way this column's rows are running, on a header cell; CellFacet.Sort.NONE everywhere else and on a header whose column is not the one sorted by

public record CellFacet(int row, int column, CellFacet.Sort sort) extends Record
One cell of a table: where it sits in the grid, and — on a header cell — which way the rows it sorts are running.

The row is the view position — the row a user counting down the table sees — and the column is the shown column's index, so a sorted table and a table with a hidden column both report what is on screen. A cell outside the data rows carries a negative row: -1 in the header row, -2 in the footer row, the summary a table pins under its rows. Spans are always one; the toolkit's table has no merged cells.

A cell's column header is found by structure and not carried here: it is the child at this cell's column index of the table node's header group, which is the table's first Accessible.Role.GROUP child. Carrying its identifier would make a facet a bridge reads on its own thread depend on a resolution that happens after the walk, which is what relations are for and cells are too many to be.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Which way a sorted column's rows run.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CellFacet(int row, int column)
    A cell that is not a sorted header: every data cell, every footer cell, and a header whose column is not the one the table is sorted by.
    CellFacet(int row, int column, CellFacet.Sort sort)
    Creates an instance of a CellFacet record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the column record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    row()
    Returns the value of the row record component.
    Returns the value of the sort record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CellFacet

      public CellFacet(int row, int column, CellFacet.Sort sort)
      Creates an instance of a CellFacet record class.
      Parameters:
      row - the value for the row record component
      column - the value for the column record component
      sort - the value for the sort record component
    • CellFacet

      public CellFacet(int row, int column)
      A cell that is not a sorted header: every data cell, every footer cell, and a header whose column is not the one the table is sorted by.
      Parameters:
      row - the cell's row as shown, from zero; -1 for a header cell, -2 for a footer cell
      column - the cell's column as shown, from zero
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • row

      public int row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • column

      public int column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • sort

      public CellFacet.Sort sort()
      Returns the value of the sort record component.
      Returns:
      the value of the sort record component