Record Class WindowFacet

java.lang.Object
java.lang.Record
limn.accessibility.WindowFacet
Record Components:
modal - whether this window blocks input to the windows it owns
canMaximize - whether the desktop offers a maximize action
canMinimize - whether it offers a minimize action
state - whether the window is currently normal, minimized or maximized

public record WindowFacet(boolean modal, boolean canMaximize, boolean canMinimize, WindowFacet.State state) extends Record
A node that is a real top-level window.

Only a node that is a window carries this. A dialog rendered inside another window's scene is not one: it cannot be closed, maximized or minimized by the desktop, and publishing this facet on it would advertise four operations it does not have. Such a dialog carries Accessible.State.MODAL and its platform's own is-a-dialog property instead.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    How a window is currently presented.
  • Constructor Summary

    Constructors
    Constructor
    Description
    WindowFacet(boolean modal, boolean canMaximize, boolean canMinimize, WindowFacet.State state)
    Creates an instance of a WindowFacet record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the canMaximize record component.
    boolean
    Returns the value of the canMinimize record component.
    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 modal record component.
    Returns the value of the state 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

    • WindowFacet

      public WindowFacet(boolean modal, boolean canMaximize, boolean canMinimize, WindowFacet.State state)
      Creates an instance of a WindowFacet record class.
      Parameters:
      modal - the value for the modal record component
      canMaximize - the value for the canMaximize record component
      canMinimize - the value for the canMinimize record component
      state - the value for the state 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. 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.
    • modal

      public boolean modal()
      Returns the value of the modal record component.
      Returns:
      the value of the modal record component
    • canMaximize

      public boolean canMaximize()
      Returns the value of the canMaximize record component.
      Returns:
      the value of the canMaximize record component
    • canMinimize

      public boolean canMinimize()
      Returns the value of the canMinimize record component.
      Returns:
      the value of the canMinimize record component
    • state

      public WindowFacet.State state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component