Serializable
, Comparable<FontStyle>
public enum FontStyle extends Enum<FontStyle>
Enum Constant | Description |
---|---|
BOLD |
|
BOLD_ITALIC |
|
ITALIC |
|
PLAIN |
Modifier and Type | Method | Description |
---|---|---|
static FontStyle |
fromFontStyleCode(int aStyleCode) |
Retrieves the enumeration element representing the given font style code
(ignoring the case) or null if none was found.
|
static FontStyle |
fromFontStyleName(String aStyleName) |
Retrieves the enumeration element representing the given font name
(ignoring the case) or null if none was found.
|
int |
getFontStyleCode() |
Returns the font style code of the given enumeration element.
|
String |
getFontStyleName() |
Returns the font style name of the given enumeration element.
|
String |
toString() |
|
static FontStyle |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static FontStyle[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FontStyle PLAIN
public static final FontStyle BOLD
public static final FontStyle ITALIC
public static final FontStyle BOLD_ITALIC
public static FontStyle[] values()
for (FontStyle c : FontStyle.values()) System.out.println(c);
public static FontStyle valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getFontStyleCode()
public String getFontStyleName()
public static FontStyle fromFontStyleName(String aStyleName)
aStyleName
- The font name for which to get the enumeration element.public static FontStyle fromFontStyleCode(int aStyleCode)
aStyleCode
- The font style code for which to get the enumeration
element.Copyright © 2018. All rights reserved.