|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Font
A class that produces font objects.
Field Summary | |
static int |
BOLD
The bold style constant. |
static int |
ITALIC
The italicized style constant. |
protected String |
name
The logical name of this font. |
static int |
PLAIN
The plain style constant. |
protected int |
size
The point size of this font. |
protected int |
style
The style of the font. |
Constructor Summary | |
Font(String name,
int style,
int size)
Creates a new font with the specified name, style and point size. |
Method Summary | |
boolean |
equals(Object obj)
Compares this object to the specifed object. |
String |
getFamily()
Gets the platform specific family name of the font. |
static Font |
getFont(String nm)
Gets a font from the system properties list. |
static Font |
getFont(String nm,
Font font)
Gets the specified font from the system properties list. |
String |
getName()
Gets the logical name of the font. |
int |
getSize()
Gets the point size of the font. |
int |
getStyle()
Gets the style of the font. |
int |
hashCode()
Returns a hashcode for this font. |
boolean |
isBold()
Returns true if the font is bold. |
boolean |
isItalic()
Returns true if the font is italic. |
boolean |
isPlain()
Returns true if the font is plain. |
String |
toString()
Converts this object to a String representation. |
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
protected String name
protected int style
protected int size
Constructor Detail |
public Font(String name, int style, int size)
name
- the font namestyle
- the constant style usedsize
- the point size of the fontToolkit.getFontList()
Method Detail |
public String getFamily()
getName()
public String getName()
getFamily()
public int getStyle()
isPlain()
,
isBold()
,
isItalic()
public int getSize()
public boolean isPlain()
getStyle()
public boolean isBold()
getStyle()
public boolean isItalic()
getStyle()
public static Font getFont(String nm)
nm
- the property namepublic static Font getFont(String nm, Font font)
nm
- the property namefont
- a default font to return if property 'nm' is not definedpublic int hashCode()
hashCode
in class Object
Hashtable
public boolean equals(Object obj)
equals
in class Object
obj
- the object to compare with
Hashtable
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |