|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo.Font
public class Font
A representation of a text font. Once created, a font is immutable.
Field Summary | |
---|---|
static java.lang.String[] |
ARIAL
|
static int |
BOLD
A style value indicating bold. |
static java.lang.String[] |
HELVETICA
|
static int |
ITALIC
A style value indicating bold. |
static int |
LINE_THROUGH
A style value indicating line-through. |
static java.lang.String[] |
MONOSPACE
|
static int |
OVERLINE
A style value indicating overline. |
static int |
PLAIN
A style value indicating no text attributes. |
static java.lang.String[] |
SANS_SERIF
|
static java.lang.String[] |
SERIF
|
static java.lang.String[] |
TIMES
|
static java.lang.String[] |
TIMES_NEW_ROMAN
|
static java.lang.String[] |
TIMES_ROMAN
|
static int |
UNDERLINE
A style value indicating underline. |
static java.lang.String[] |
VERDANA
|
Constructor Summary | |
---|---|
Font(java.lang.String[] names,
int style,
Extent sizeExtent)
Creates a font with a primary and alternative typefaces, the given style attributes and size. |
|
Font(java.lang.String[] names,
int style,
int size)
Creates a font with a primary and alternative typefaces, the given style attributes and size. |
|
Font(java.lang.String name,
int style,
int size)
Creates a font with a single typeface, the given style attributes and size. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Returns true if this font is equivalent to the provided object. |
java.lang.String[] |
getNames()
Returns the names of acceptable typefaces of this font, in preferential order. |
int |
getSize()
Returns the size of the font, in points. |
Extent |
getSizeExtent()
Returns the size of the font. |
int |
hashCode()
Returns a hash code value for this font. |
boolean |
isBold()
Returns whether the font is bold. |
boolean |
isItalic()
Returns whether the font is italicized. |
boolean |
isLineThrough()
Returns whether the font has line-through enabled. |
boolean |
isOverline()
Returns whether the font has an overline. |
boolean |
isUnderline()
Returns whether the font is underlined. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 static final java.lang.String[] ARIAL
public static final java.lang.String[] HELVETICA
public static final java.lang.String[] MONOSPACE
public static final java.lang.String[] SANS_SERIF
public static final java.lang.String[] SERIF
public static final java.lang.String[] TIMES
public static final java.lang.String[] TIMES_NEW_ROMAN
public static final java.lang.String[] TIMES_ROMAN
public static final java.lang.String[] VERDANA
Constructor Detail |
---|
public Font(java.lang.String name, int style, int size)
name
- The font name. This font name must be available on the client
computer or the use of this font may not have any effect.style
- The style of the font, one or more of the following values:
BOLD | UNDERLINE
.size
- The point size of the font.public Font(java.lang.String[] names, int style, int size)
names
- An array of font names. The client will use the font with the
lowest index in the array that it supports to display text. It
is recommended that an application provide either
"Sans-Serif", "Serif", or "Monospace" as the last element of
this array, as these fonts will be supported by all clients.style
- The style of the font, one or more of the following values:
BOLD | UNDERLINE
.size
- The point size of the font.public Font(java.lang.String[] names, int style, Extent sizeExtent)
names
- An array of font names. The client will use the font with the
lowest index in the array that it supports to display text. It
is recommended that an application provide either
"Sans-Serif", "Serif", or "Monospace" as the last element of
this array, as these fonts will be supported by all clients.style
- The style of the font, one or more of the following values:
BOLD | UNDERLINE
.sizeExtent
- The size of the font as a Extent
.Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String[] getNames()
public int getSize()
public Extent getSizeExtent()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isBold()
public boolean isItalic()
public boolean isLineThrough()
public boolean isOverline()
public boolean isUnderline()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |