Module no.ntnu.principes
Enum Class StyledText.TextType
- All Implemented Interfaces:
Serializable,Comparable<StyledText.TextType>,Constable
- Enclosing class:
StyledText
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic StyledText.TextTypeReturns the enum constant of this class with the specified name.static StyledText.TextType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PAGE_TITLE
-
SECTION_HEADER
-
SUBHEADER
-
BODY
-
HELPER
-
BUTTON
-
FORM_LABEL
-
ERROR_MESSAGE
-
NOTIFICATION
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-