Record Class TrayState

java.lang.Object
java.lang.Record
limn.backend.spi.TrayState
Record Components:
title - the icon's name, which a panel and a screen reader say; never empty
tooltip - the tooltip; empty for none
picture - the icon shown as it is, or null when the application set none
monochrome - the icon that takes the panel's colour, or null; a backend whose system colours one prefers it, and one that cannot know the panel's colour prefers picture
attention - whether the icon asks for attention; both pictures then already carry what shows it
activates - whether a click that means "this application" is the application's; when false every click opens the menu
rightToLeft - whether the menu is laid out right to left

public record TrayState(String title, String tooltip, @Nullable TrayPicture picture, @Nullable TrayPicture monochrome, boolean attention, boolean activates, boolean rightToLeft) extends Record
What a tray shows, whole: a backend is handed a new one whenever any part changes and shows the difference.
  • Constructor Details

    • TrayState

      public TrayState(String title, String tooltip, @Nullable TrayPicture picture, @Nullable TrayPicture monochrome, boolean attention, boolean activates, boolean rightToLeft)
      Checks the two texts.
  • 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.
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • tooltip

      public String tooltip()
      Returns the value of the tooltip record component.
      Returns:
      the value of the tooltip record component
    • picture

      public @Nullable TrayPicture picture()
      Returns the value of the picture record component.
      Returns:
      the value of the picture record component
    • monochrome

      public @Nullable TrayPicture monochrome()
      Returns the value of the monochrome record component.
      Returns:
      the value of the monochrome record component
    • attention

      public boolean attention()
      Returns the value of the attention record component.
      Returns:
      the value of the attention record component
    • activates

      public boolean activates()
      Returns the value of the activates record component.
      Returns:
      the value of the activates record component
    • rightToLeft

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