Interface Attributes


public interface Attributes
Attribute name constants
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Trigger for BUTTON_ACTION.
    static final String
    If item tooltips use advanced tooltips.
    static final String
    Button action, executed when a ButtonElement button element is clicked.
    static final String
    Class list attribute.
    static final String
    Name of the linked java class in a JavaObjectElement
    static final String
    Defer attribute for delaying script execution until the DOM has finished loading
    static final String
    Enabled/disabled state attribute, used by <button> elements.
    static final String
    Attribute for defining the height in pixels of a canvas element.
    static final String
    ID attribute.
    static final String
    Item tooltip hide state attribute, used by <item> elements to determine whether the item tooltip should be hidden or not.
    static final String
    Option name attribute, used during parsing by the <option> element.
    static final String
    Used to specify the placeholder on an InputElement
    static final String
    Attribute for defining an Input element's input prompt
    static final String
    Attribute for defining the role of an element.
    static final String
    Source attribute, used by <script>, <style> and <item> elements.
    static final String
    Inline style attribute.
    static final String
    Type attribute.
    static final String
    Key attribute, used during parsing by the <option> element.
    static final String
    Attribute for defining the width in pixels of a canvas element.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static boolean
    boolAttribute(@Nullable String value, boolean fallback)
     
    floatAttribute(String value, float min, float max)
    Parses a float attribute value.
    static int
    intAttribute(String value, int min, int max, int fb)
    Parses an attribute's string value into an integer.
  • Field Details

  • Method Details

    • floatAttribute

      static Result<Float,String> floatAttribute(String value, float min, float max)
      Parses a float attribute value.

      If the specified value cannot be parsed into a float, an erroneous result with the error "Invalid number" is returned.

      If the number is parsed successfully, then it is clamped according to the min and max parameters.

      Parameters:
      value - Value to parse from
      min - Minimum value
      max - Maximum value
      Returns:
      Parsed float result
    • intAttribute

      static int intAttribute(String value, int min, int max, int fb)
      Parses an attribute's string value into an integer.
      Parameters:
      value - Attribute value
      min - Minimum parsed value
      max - Maximum parsed value
      fb - Fallback value if attribute value is empty or null
      Returns:
      Clamped parsed value, or fallback
    • boolAttribute

      static boolean boolAttribute(@Nullable @Nullable String value, boolean fallback)