Record Class DialogModel.Button

java.lang.Object
java.lang.Record
com.ultikits.ultitools.ui.dialog.DialogModel.Button
Record Components:
label - button label
tooltip - optional hover text
role - semantic action
Enclosing class:
DialogModel

@Internal public static record DialogModel.Button(net.kyori.adventure.text.Component label, @Nullable net.kyori.adventure.text.Component tooltip, ButtonRole role) extends Record
One rendered action.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.kyori.adventure.text.Component
    The field for the label record component.
    private final ButtonRole
    The field for the role record component.
    private final @Nullable net.kyori.adventure.text.Component
    The field for the tooltip record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Button(net.kyori.adventure.text.Component label, @Nullable net.kyori.adventure.text.Component tooltip, ButtonRole role)
    Creates an instance of a Button 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.
    net.kyori.adventure.text.Component
    Returns the value of the label record component.
    Returns the value of the role record component.
    @Nullable net.kyori.adventure.text.Component
    Returns the value of the tooltip record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • label

      private final net.kyori.adventure.text.Component label
      The field for the label record component.
    • tooltip

      @Nullable private final @Nullable net.kyori.adventure.text.Component tooltip
      The field for the tooltip record component.
    • role

      private final ButtonRole role
      The field for the role record component.
  • Constructor Details

    • Button

      public Button(net.kyori.adventure.text.Component label, @Nullable @Nullable net.kyori.adventure.text.Component tooltip, ButtonRole role)
      Creates an instance of a Button record class.
      Parameters:
      label - the value for the label record component
      tooltip - the value for the tooltip record component
      role - the value for the role 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 Objects::equals(Object,Object).
      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.
    • label

      public net.kyori.adventure.text.Component label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • tooltip

      @Nullable public @Nullable net.kyori.adventure.text.Component tooltip()
      Returns the value of the tooltip record component.
      Returns:
      the value of the tooltip record component
    • role

      public ButtonRole role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component