The Font class represents a specific font to the system.
public class java.awt.Font extends java.lang.Object implements java.io.Serializable { // Constants public static final int BOLD; public static final int ITALIC; public static final int PLAIN; // Variables protected String name; protected int size; protected int style; // Constructors public Font (String name, int style, int size); // Class Methods public static Font decode (String str); public static Font getFont (String name) public static Font getFont (String name, Font defaultFont) // Instance Methods public boolean equals (Object object); public String getFamily(); public String getName(); public FontPeer getPeer(); public int getSize(); public int getStyle(); public int hashCode(); public boolean isBold(); public boolean isItalic(); public boolean isPlain(); public String toString(); }
Constant for specifying bold fonts.
Constant for specifying fonts.
Constant for specifying plain fonts.
The font's logical name.
The font size; allegedly in points, though probably not true typographer's points.
The font style, e.g., bold or italic or a combination thereof.
The name of the desired font.
One of the style flags (PLAIN, BOLD, or ITALIC) or a combination.
The size of the font to create.
Constructs a Font object with the given characteristics.
The string describing the font.
Font instance requested, or default if str is invalid.
Gets font specified by str.
The name of a system property specifying a font to fetch.
Font instance for name requested, or null if name is invalid.
Gets font specified by the system property name.
The name of a system property specifying a font to fetch.
Font to return if name not found in properties.
Font instance of name requested, or defaultFont if name is invalid
Gets font specified by the system property name.
The object to compare.
true if the objects are equivalent fonts (same name, style, and point size), false otherwise.
Object.equals(Object)
Compares two different Font instances for equivalence.
Retrieves the actual name of the font.
Retrieves the logical name of the font.
The font's peer.
Retrieves the size parameter from creation
Retrieves the style parameter from creation.
A hashcode to use when using the Font as a key in a Hashtable.
Object.hashCode()
Generates a hashcode for the Font.
true if Font style is bold, false otherwise.
true if Font style is italic, false otherwise.
true if Font style is neither bold nor italic, false otherwise.
A string representation of the Font object.
Object.toString()
FontMetrics, Object, Properties, String
This HTML Help has been published using the chm2web software. |