Record Class HierarchyFacet

java.lang.Object
java.lang.Record
limn.accessibility.HierarchyFacet
Record Components:
level - how deep the row is, from one at a root, or 0 when unknown
row - which row of the outline this is, from one at the top, or 0 when unknown
rowCount - how many rows the outline shows open, or 0 when unknown

public record HierarchyFacet(int level, int row, int rowCount) extends Record
Where a row stands in an outline: how deep it is, and which visible row it is.

Two sets of numbers answer two kinds of platform, and both are published because neither can be rebuilt from the other in a virtualized tree, where the rows above a realized one may not be in the snapshot at all. The level is what UI Automation's Level and AT-SPI2's level attribute carry and what a reader speaks as "level 3". The row is the flat index of this row among every row the outline shows open, counted down the outline, which is what AppKit's accessibilityIndex and accessibilityRows address; a loading line is not a row and is not counted. Where a row stands among its siblings — the "2 of 5" a reader speaks — is SelectionItemFacet's, not this facet's.

Levels and rows are one-based in the model, and a zero means the number is not known; a bridge publishes nothing for a zero and converts to its platform's base itself, since UIA's base and AppKit's are read off the platform, not assumed.

  • Constructor Summary

    Constructors
    Constructor
    Description
    HierarchyFacet(int level, int row, int rowCount)
    Creates an instance of a HierarchyFacet record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the level record component.
    int
    row()
    Returns the value of the row record component.
    int
    Returns the value of the rowCount 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

    • HierarchyFacet

      public HierarchyFacet(int level, int row, int rowCount)
      Creates an instance of a HierarchyFacet record class.
      Parameters:
      level - the value for the level record component
      row - the value for the row record component
      rowCount - the value for the rowCount record component
  • 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. All components in this record class 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.
    • level

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

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

      public int rowCount()
      Returns the value of the rowCount record component.
      Returns:
      the value of the rowCount record component