Enum Constant and Description |
---|
DEFAULT
The default pitch, which is implementation-dependent.
|
FIXED
A fixed pitch, which means that all the characters in the font occupy the same
width when output in a string.
|
VARIABLE
A variable pitch, which means that the characters in the font occupy widths
that are proportional to the actual widths of the glyphs when output in a string.
|
Modifier and Type | Method and Description |
---|---|
int |
getNativeId() |
static byte |
getNativeId(FontPitch pitch,
FontFamily family)
Combine pitch and family to native id
|
static FontPitch |
valueOf(int flag) |
static FontPitch |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static FontPitch |
valueOfPitchFamily(byte pitchAndFamily)
Get FontPitch from native id
|
static FontPitch[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FontPitch DEFAULT
public static final FontPitch FIXED
public static final FontPitch VARIABLE
public static FontPitch[] values()
for (FontPitch c : FontPitch.values()) System.out.println(c);
public static FontPitch 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 int getNativeId()
public static FontPitch valueOf(int flag)
public static byte getNativeId(FontPitch pitch, FontFamily family)
pitch
- The pitch-value, cannot be nullfamily
- The family-value, cannot be nullpublic static FontPitch valueOfPitchFamily(byte pitchAndFamily)
pitchAndFamily
- The combined byte value for pitch and familyCopyright 2018 The Apache Software Foundation or its licensors, as applicable.