Package pi.resources.font
Enum Class FontStyle
- All Implemented Interfaces:
Serializable,Comparable<FontStyle>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDer fette Schriftstil.Die Kombination aus fetten und kursiven Schriftstil.Der kursive Schriftstil.Der normale Schriftstil. -
Method Summary
Modifier and TypeMethodDescriptionintgetStyle()Gibt den aktuellen Schriftstil als Ganzzahl zurück.static FontStylegetStyle(int style) Gibt den zu einem numerischen Stilwert passenden AufzählungstypFontStylezurück.static FontStyleReturns the enum constant of this class with the specified name.static FontStyle[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLAIN
Der normale Schriftstil. -
BOLD
Der fette Schriftstil. -
ITALIC
Der kursive Schriftstil. -
BOLD_ITALIC
Die Kombination aus fetten und kursiven Schriftstil.
-
-
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
-
getStyle
public int getStyle()Gibt den aktuellen Schriftstil als Ganzzahl zurück.Die Zuordnung ist wie folgt:
0:PLAIN(normal)1:BOLD(fett)2:ITALIC(kursiv)3:BOLD_ITALIC(fett und kursiv)
- Returns:
- Eine Ganzzahl, die den Schriftstil repräsentiert.
-
getStyle
Gibt den zu einem numerischen Stilwert passenden AufzählungstypFontStylezurück.Die Zuordnung ist wie folgt:
0:PLAIN(normal)1:BOLD(fett)2:ITALIC(kursiv)3:BOLD_ITALIC(fett und kursiv)
- 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
-