Enum Class StyledText.TextType

java.lang.Object
java.lang.Enum<StyledText.TextType>
no.ntnu.principes.components.primary.StyledText.TextType
All Implemented Interfaces:
Serializable, Comparable<StyledText.TextType>, Constable
Enclosing class:
StyledText

public static enum StyledText.TextType extends Enum<StyledText.TextType>
Defines categories of styled text elements for a UI component.

Each value in the enumeration corresponds to a distinct visual role and default styling in the application's design system. These roles include titles, headers, buttons, notifications, and other UI text components. The StyledText.TextType is used to determine the default CSS style class applied to a text element.

Available Types:

  • PAGE_TITLE: Large, prominent text for page titles.
  • SECTION_HEADER: Medium-sized text for section headers.
  • SUBHEADER: Smaller text for subheadings.
  • BODY: Standard size for general body text.
  • HELPER: Minimal, subtle text for hints or contextual help.
  • BUTTON: Text styled for use on buttons.
  • FORM_LABEL: Text for labeling form inputs.
  • ERROR_MESSAGE: Text with distinct styling for displaying error messages.
  • NOTIFICATION: Styled text used for system notifications.
  • Enum Constant Details

  • Method Details

    • values

      public static StyledText.TextType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StyledText.TextType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null