|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.Font
Font is the character font used when drawing text on a surface.
Fonts have a name, such as "Helvetica", a style and a point size (usually around 10). It's important to note that many devices have an extremely limited number of fonts. For example, most PalmPilot devices have only two fonts: plain and bold. If the font specified can't be found during drawing, the closest matching font will be used.
| Field Summary | |
static int |
BOLD
A bold font style. |
static int |
ITALIC
An italic font style. |
static int |
OUTLINE
An outlined font style. |
static int |
PLAIN
A plain font style. |
static int |
STRIKETHROUGH
A strikethrough font style. |
static int |
SUBSCRIPT
A subscript font style. |
static int |
SUPERSCRIPT
A superscript font style. |
static int |
UNDERLINE
An underlined font style. |
| Constructor Summary | |
Font(String name,
int style,
int size)
Creates a font of the given name, style and size. |
|
| Method Summary | |
Font |
changeNameAndSize(String newName,
int newSize)
Change the name and/or size of a Font. |
Font |
changeStyle(int newStyle)
Return a new Font with the same name and size, but a different style. |
boolean |
equals(Object other)
Returns if this object is considered equal to the other object. |
String |
getName()
Returns the name of the font. |
int |
getSize()
Returns the size of the font. |
int |
getStyle()
Returns the style of the font. |
static String[] |
listFonts(ISurface surface)
List the names of all the available fonts for a particular ISurface. |
String |
toString()
Return a String representation of this object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode |
| 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 OUTLINE
public static final int STRIKETHROUGH
public static final int SUPERSCRIPT
public static final int SUBSCRIPT
| Constructor Detail |
public Font(String name,
int style,
int size)
PLAIN,
BOLD,
Graphics| Method Detail |
public String getName()
public int getSize()
public int getStyle()
PLAIN,
BOLDpublic Font changeStyle(int newStyle)
newStyle - The new style for the Font.
public Font changeNameAndSize(String newName,
int newSize)
newName - The newName for the Font. If it is null the old name is used.newSize - The newSize for the Font. If it is <= 0, the old size is used.
public static String[] listFonts(ISurface surface)
public String toString()
Object
toString in class Objectpublic boolean equals(Object other)
Object
equals in class Objectother - Another object to compare to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||