| Enum Constant and Description |
|---|
BOLD |
BOLD_ITALIC |
ITALIC |
PLAIN |
UNDERLINE |
UNDERLINE_BOLD |
UNDERLINE_BOLD_ITALIC |
UNDERLINE_ITALIC |
| Modifier and Type | Method and Description |
|---|---|
static FontStyle |
createStyle(boolean isBold,
boolean isItalic,
boolean isUnderline)
Create a new font with the given style(s).
|
boolean |
isBold()
Check if this is a bold font.
|
boolean |
isItalic()
Check if this is an italic font.
|
boolean |
isUnderline()
Check if this is an underlined font.
|
int |
toInt()
Create an int representation of this style, to be used for serialization.
|
static FontStyle |
valueOf(java.lang.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 final FontStyle UNDERLINE
public static final FontStyle UNDERLINE_BOLD
public static final FontStyle UNDERLINE_ITALIC
public static final FontStyle UNDERLINE_BOLD_ITALIC
public static FontStyle[] values()
for (FontStyle c : FontStyle.values()) System.out.println(c);
public static FontStyle valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean isBold()
public boolean isItalic()
public boolean isUnderline()
public static FontStyle createStyle(boolean isBold, boolean isItalic, boolean isUnderline)
isBold - Flag indicating a bold font.isItalic - Flag indicating an italic font.isUnderline - Flag indicating an underline font.FontStyle.public int toInt()