All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.Font

java.lang.Object
   |
   +----java.awt.Font

public class Font
extends Object
implements Serializable
A class that produces font objects.


Variable Index

 o BOLD
The bold style constant.
 o ITALIC
The italicized style constant.
 o name
The logical name of this font.
 o PLAIN
The plain style constant.
 o size
The point size of this font.
 o style
The style of the font.

Constructor Index

 o Font(String, int, int)
Creates a new font with the specified name, style and point size.

Method Index

 o decode(String)
Gets the specified font using the name passed in.
 o equals(Object)
Compares this object to the specifed object.
 o getFamily()
Gets the platform specific family name of the font.
 o getFont(String)
Gets a font from the system properties list.
 o getFont(String, Font)
Gets the specified font from the system properties list.
 o getName()
Gets the logical name of the font.
 o getPeer()
Gets the peer of the font.
 o getSize()
Gets the point size of the font.
 o getStyle()
Gets the style of the font.
 o hashCode()
Returns a hashcode for this font.
 o isBold()
Returns true if the font is bold.
 o isItalic()
Returns true if the font is italic.
 o isPlain()
Returns true if the font is plain.
 o toString()
Converts this object to a String representation.

Variables

 o PLAIN
Properties Public Constant 
   PLAIN=int 
The plain style constant. This can be combined with the other style constants for mixed styles.

 o BOLD
Properties Public Constant 
   BOLD=int 
The bold style constant. This can be combined with the other style constants for mixed styles.

 o ITALIC
Properties Public Constant 
   ITALIC=int 
The italicized style constant. This can be combined with the other style constants for mixed styles.

 o name
Properties Inheritable 
    name=String 
The logical name of this font.

 o style
Properties Inheritable 
   style=int 
The style of the font. This is the sum of the constants PLAIN, BOLD, or ITALIC.

 o size
Properties Inheritable 
   size=int 
The point size of this font.

Constructors

 o Font
    method Font(name=String, -
                style=int, -
                size=int) public 
Creates a new font with the specified name, style and point size.

Parameters:
name - the font name
style - the constant style used
size - the point size of the font
See Also:
getFontList

Methods

 o getPeer
    method getPeer() returns FontPeer public     
Gets the peer of the font.

 o getFamily
    method getFamily() returns String public     
Gets the platform specific family name of the font. Use getName to get the logical name of the font.

See Also:
getName
 o getName
    method getName() returns String public     
Gets the logical name of the font.

See Also:
getFamily
 o getStyle
    method getStyle() returns int public     
Gets the style of the font.

See Also:
isPlain, isBold, isItalic
 o getSize
    method getSize() returns int public     
Gets the point size of the font.

 o isPlain
    method isPlain() returns boolean public     
Returns true if the font is plain.

See Also:
getStyle
 o isBold
    method isBold() returns boolean public     
Returns true if the font is bold.

See Also:
getStyle
 o isItalic
    method isItalic() returns boolean public     
Returns true if the font is italic.

See Also:
getStyle
 o getFont
    method getFont(nm=String) returns Font public  static   
Gets a font from the system properties list.

Parameters:
nm - the property name
 o decode
    method decode(str=String) returns Font public  static   
Gets the specified font using the name passed in.

Parameters:
str - the name
 o getFont
    method getFont(nm=String, -
                   font=Font) returns Font public  static   
Gets the specified font from the system properties list.

Parameters:
nm - the property name
font - a default font to return if property 'nm' is not defined
 o hashCode
    method hashCode() returns int public     
Returns a hashcode for this font.

Overrides:
hashCode in class Object
 o equals
    method equals(obj=Object) returns boolean public     
Compares this object to the specifed object.

Parameters:
obj - the object to compare with
Returns:
true if the objects are the same; false otherwise.
Overrides:
equals in class Object
 o toString
    method toString() returns String public     
Converts this object to a String representation.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index