FontNameFont
DescriptionThe Font class represents a specific font to the system. Class Definition
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(); } ConstantsBOLDpublic static final int BOLDConstant for specifying bold fonts. ITALICpublic static final int ITALICConstant for specifying fonts. PLAINpublic static final int PLAINConstant for specifying plain fonts. Variablesnameprotected String nameThe font's logical name. sizeprotected int sizeThe font size; allegedly in points, though probably not true typographer's points. styleprotected int styleThe font style, e.g., bold or italic or a combination thereof. ConstructorsFontpublic Font (String name, int style, int size)
Class Methodsdecodepublic static Font decode (String str)
getFontpublic static Font getFont (String name)
public static Font getFont (String name, Font defaultFont)
Instance Methodsequalspublic boolean equals (Object object)
getFamilypublic String getFamily()
getNamepublic String getName()
getPeerpublic FontPeer getPeer()
getSizepublic int getSize()
getStylepublic int getStyle()
hashCodepublic int hashCode()
isBoldpublic boolean isBold()
isItalicpublic boolean isItalic()
isPlainpublic boolean isPlain()
toStringpublic String toString()
See AlsoFontMetrics, Object, Properties, String |
|