Record Class SelectionFacet

java.lang.Object
java.lang.Record
limn.accessibility.SelectionFacet
Record Components:
multiSelectable - whether more than one descendant may be selected at once
required - whether at least one descendant is always selected

public record SelectionFacet(boolean multiSelectable, boolean required) extends Record
A node that holds a selection among its descendants: a list, a menu column, a tab strip, a combo box's popup.

Which descendants are selected is not stored here. It is on the descendants themselves, in their SelectionItemFacet, so one fact has one home. What is here is the container's own shape and nothing else.

Where the keyboard cursor is inside a container is not a fact of the container either. It is the tree's: AccessibleTree.activeDescendant() is the first node published Accessible.State.ACTIVE below the focused node, whichever containers lie between, and one event names the focused node when it moves. Until 2026-09-14 this record carried an activeDescendant resolved per container, so a combo's layer and its list, or a menu surface and each of its columns, announced one arrow key two or three times over, and a container nobody was in announced a cursor nobody had.

  • Constructor Summary

    Constructors
    Constructor
    Description
    SelectionFacet(boolean multiSelectable, boolean required)
    Creates an instance of a SelectionFacet 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.
    boolean
    Returns the value of the multiSelectable record component.
    boolean
    Returns the value of the required 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

    • SelectionFacet

      public SelectionFacet(boolean multiSelectable, boolean required)
      Creates an instance of a SelectionFacet record class.
      Parameters:
      multiSelectable - the value for the multiSelectable record component
      required - the value for the required 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.
    • multiSelectable

      public boolean multiSelectable()
      Returns the value of the multiSelectable record component.
      Returns:
      the value of the multiSelectable record component
    • required

      public boolean required()
      Returns the value of the required record component.
      Returns:
      the value of the required record component