public class Font
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Font.Typeface
An immutable representation of a type face.
|
| Modifier and Type | Field and Description |
|---|---|
static Font.Typeface |
ARIAL |
static int |
BOLD
A style value indicating bold.
|
static Font.Typeface |
COURIER |
static Font.Typeface |
COURIER_NEW |
static Font.Typeface |
HELVETICA |
static int |
ITALIC
A style value indicating bold.
|
static int |
LINE_THROUGH
A style value indicating line-through.
|
static Font.Typeface |
MONOSPACE |
static int |
OVERLINE
A style value indicating overline.
|
static int |
PLAIN
A style value indicating no text attributes.
|
static Font.Typeface |
SANS_SERIF |
static Font.Typeface |
SERIF |
static Font.Typeface |
TIMES |
static Font.Typeface |
TIMES_NEW_ROMAN |
static Font.Typeface |
TIMES_ROMAN |
static int |
UNDERLINE
A style value indicating underline.
|
static Font.Typeface |
VERDANA |
| Constructor and Description |
|---|
Font(Font.Typeface typeface,
int style,
Extent size)
Creates a new
Font with the specified Typeface,
size, and style. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
Extent |
getSize()
Returns the size of the font.
|
Font.Typeface |
getTypeface()
Returns the typeface of the font.
|
boolean |
isBold()
Determines whether the font is bold.
|
boolean |
isItalic()
Determines whether the font is italicized.
|
boolean |
isLineThrough()
Determines whether the font has line-through enabled.
|
boolean |
isOverline()
Determines whether the font has an overline.
|
boolean |
isPlain()
Determines whether the font is plain (i.e., the font has no style
attributes set).
|
boolean |
isUnderline()
Determines whether the font is underlined.
|
java.lang.String |
toString()
Renders a debug representation of the object.
|
public static final Font.Typeface SANS_SERIF
public static final Font.Typeface SERIF
public static final Font.Typeface MONOSPACE
public static final Font.Typeface HELVETICA
public static final Font.Typeface ARIAL
public static final Font.Typeface VERDANA
public static final Font.Typeface TIMES
public static final Font.Typeface TIMES_ROMAN
public static final Font.Typeface TIMES_NEW_ROMAN
public static final Font.Typeface COURIER
public static final Font.Typeface COURIER_NEW
public static final int PLAIN
public static final int BOLD
public static final int ITALIC
public static final int UNDERLINE
public static final int OVERLINE
public static final int LINE_THROUGH
public Font(Font.Typeface typeface, int style, Extent size)
Font with the specified Typeface,
size, and style.typeface - a Typeface describing the typeface of the font.style - the style of the font, one or more of the following values:
BOLD | UNDERLINE.size - the size of the font as a Extentpublic boolean equals(java.lang.Object o)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public Extent getSize()
public Font.Typeface getTypeface()
public boolean isBold()
public boolean isItalic()
public boolean isLineThrough()
public boolean isPlain()
public boolean isOverline()
public boolean isUnderline()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()