Enum Class FontStyle

java.lang.Object
java.lang.Enum<FontStyle>
pi.resources.font.FontStyle
All Implemented Interfaces:
Serializable, Comparable<FontStyle>, Constable

public enum FontStyle extends Enum<FontStyle>
Repräsentiert die verfügbaren Schriftstile bzw. Schriftschnitte.

Verfügbare Werte:

  • PLAIN — normaler Text (0)
  • BOLD — fetter Text (1)
  • ITALIC — kursiver Text (2)
  • BOLD_ITALIC — fett und kursiv kombiniert (3)

Dieser Aufzählungstyp dient dazu, die Schriftstile eindeutig zu benennen und den zugehörigen numerischen Wert über getStyle() bereitzustellen.

Author:
Josef Friedrich
  • Enum Constant Details

    • PLAIN

      public static final FontStyle PLAIN
      Der normale Schriftstil.
    • BOLD

      public static final FontStyle BOLD
      Der fette Schriftstil.
    • ITALIC

      public static final FontStyle ITALIC
      Der kursive Schriftstil.
    • BOLD_ITALIC

      public static final FontStyle BOLD_ITALIC
      Die Kombination aus fetten und kursiven Schriftstil.
  • Method Details

    • values

      public static FontStyle[] 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 FontStyle 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
    • getStyle

      public int getStyle()
      Gibt den aktuellen Schriftstil als Ganzzahl zurück.

      Die Zuordnung ist wie folgt:

      Returns:
      Eine Ganzzahl, die den Schriftstil repräsentiert.
    • getStyle

      public static FontStyle getStyle(int style)
      Gibt den zu einem numerischen Stilwert passenden Aufzählungstyp FontStyle zurück.

      Die Zuordnung ist wie folgt:

      Parameters:
      style - Der numerische Wert des Schriftstils (erwartet 0–3).
      Returns:
      Das entsprechende Wert des Aufzählungstyps FontStyle.
      Throws:
      RuntimeException - Wenn der übergebene Wert nicht einer der erwarteten Werte (0–3) ist.
      Since:
      0.39.0