<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.awt.Font
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.FlowLayout.html#_top_">Previous</a>  <a href="java.awt.FontMetrics.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.awt.Font
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.awt.Font
</pre>
<hr>
<dl>
  <dt> public class <b>Font</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements <a href="java.io.Serializable.html#_top_">Serializable</a>
</dl>
A class that produces font objects.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#BOLD"><b>BOLD</b></a>
  <dd>  The bold style constant.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ITALIC"><b>ITALIC</b></a>
  <dd>  The italicized style constant.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#name"><b>name</b></a>
  <dd>  The logical name of this font.
  <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#PLAIN"><b>PLAIN</b></a>
  <dd>  The plain style constant.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#size"><b>size</b></a>
  <dd>  The point size of this font.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#style"><b>style</b></a>
  <dd>  The style of the font.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Font(java.lang.String, int, int)"><b>Font</b></a>(String, int, int)
  <dd>  Creates a new font with the specified name, style and point size.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#decode(java.lang.String)"><b>decode</b></a>(String)
  <dd>  Gets the specified font using the name passed in.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Compares this object to the specifed object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFamily()"><b>getFamily</b></a>()
  <dd>  Gets the platform specific family name of the font.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFont(java.lang.String)"><b>getFont</b></a>(String)
  <dd>  Gets a font from the system properties list.
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFont(java.lang.String, java.awt.Font)"><b>getFont</b></a>(String, Font)
  <dd>  Gets the specified font from the system properties list.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getName()"><b>getName</b></a>()
  <dd>  Gets the logical name of the font.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getPeer()"><b>getPeer</b></a>()
  <dd>  Gets the peer of the font.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getSize()"><b>getSize</b></a>()
  <dd>  Gets the point size of the font.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getStyle()"><b>getStyle</b></a>()
  <dd>  Gets the style of the font.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Returns a hashcode for this font.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isBold()"><b>isBold</b></a>()
  <dd>  Indicates whether the font's style is bold.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isItalic()"><b>isItalic</b></a>()
  <dd>  Indicates whether the font's style is italic.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isPlain()"><b>isPlain</b></a>()
  <dd>  Indicates whether the font's style is plain.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Converts this object to a String representation.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="PLAIN"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>PLAIN</b>
<pre>
 public static final int PLAIN
</pre>
<dl>
  <dd> The plain style constant.  This style can be combined with
 the other style constants for mixed styles.<p>
</dl>
<a name="BOLD"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>BOLD</b>
<pre>
 public static final int BOLD
</pre>
<dl>
  <dd> The bold style constant.  This style can be combined with the
 other style constants for mixed styles.<p>
</dl>
<a name="ITALIC"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a>
<b>ITALIC</b>
<pre>
 public static final int ITALIC
</pre>
<dl>
  <dd> The italicized style constant.  This style can be combined
 with the other style constants for mixed styles.<p>
</dl>
<a name="name"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>name</b>
<pre>
 protected <a href="java.lang.String.html#_top_">String</a> name
</pre>
<dl>
  <dd> The logical name of this font.<p>
</dl>
<a name="style"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>style</b>
<pre>
 protected int style
</pre>
<dl>
  <dd> The style of the font. This is the sum of the
 constants <code>PLAIN</code>, <code>BOLD</code>,
 or <code>ITALIC</code>.<p>
</dl>
<a name="size"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>size</b>
<pre>
 protected int size
</pre>
<dl>
  <dd> The point size of this font.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Font"></a>
<a name="Font(java.lang.String, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Font</b>
<pre>
 public Font(<a href="java.lang.String.html#_top_">String</a> name,
             int style,
             int size)
</pre>
<dl>
  <dd> Creates a new font with the specified name, style and point size.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> name - the font name
    <dd> style - the constant style used
    <dd> size - the point size of the font
    <dt> <b>See Also:</b>
    <dd> <a href="java.awt.Toolkit.html#getFontList">getFontList</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="getPeer()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getPeer"><b>getPeer</b></a>
<pre>
 public <a href="java.awt.peer.FontPeer.html#_top_">FontPeer</a> getPeer()
</pre>
<dl>
  <dd> Gets the peer of the font.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the peer of the font.
  </dl></dd>
</dl>
<a name="getFamily()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFamily"><b>getFamily</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getFamily()
</pre>
<dl>
  <dd> Gets the platform specific family name of the font. Use the
 <code>getName</code> method to get the logical name of the font.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string, the platform specific family name.
    <dt> <b>See Also:</b>
    <dd> <a href="#getName">getName</a>
  </dl></dd>
</dl>
<a name="getName()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getName"><b>getName</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getName()
</pre>
<dl>
  <dd> Gets the logical name of the font.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string, the logical name of the font.
    <dt> <b>See Also:</b>
    <dd> <a href="#getFamily">getFamily</a>
  </dl></dd>
</dl>
<a name="getStyle()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getStyle"><b>getStyle</b></a>
<pre>
 public int getStyle()
</pre>
<dl>
  <dd> Gets the style of the font.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the style of this font.
    <dt> <b>See Also:</b>
    <dd> <a href="#isPlain">isPlain</a>, <a href="#isBold">isBold</a>, <a href="#isItalic">isItalic</a>
  </dl></dd>
</dl>
<a name="getSize()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getSize"><b>getSize</b></a>
<pre>
 public int getSize()
</pre>
<dl>
  <dd> Gets the point size of the font.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the point size of this font.
  </dl></dd>
</dl>
<a name="isPlain()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isPlain"><b>isPlain</b></a>
<pre>
 public boolean isPlain()
</pre>
<dl>
  <dd> Indicates whether the font's style is plain.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the font is neither
                bold nor italic; <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#getStyle">getStyle</a>
  </dl></dd>
</dl>
<a name="isBold()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isBold"><b>isBold</b></a>
<pre>
 public boolean isBold()
</pre>
<dl>
  <dd> Indicates whether the font's style is bold.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the font is bold;
            <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#getStyle">getStyle</a>
  </dl></dd>
</dl>
<a name="isItalic()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isItalic"><b>isItalic</b></a>
<pre>
 public boolean isItalic()
</pre>
<dl>
  <dd> Indicates whether the font's style is italic.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the font is italic;
            <code>false</code> otherwise.
    <dt> <b>See Also:</b>
    <dd> <a href="#getStyle">getStyle</a>
  </dl></dd>
</dl>
<a name="getFont(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFont"><b>getFont</b></a>
<pre>
 public static <a href="#_top_">Font</a> getFont(<a href="java.lang.String.html#_top_">String</a> nm)
</pre>
<dl>
  <dd> Gets a font from the system properties list.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> nm - the property name
    <dt> <b>See Also:</b>
    <dd> <a href="#getFont(java.lang.String, java.awt.Font)">getFont</a>
  </dl></dd>
</dl>
<a name="decode(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="decode"><b>decode</b></a>
<pre>
 public static <a href="#_top_">Font</a> decode(<a href="java.lang.String.html#_top_">String</a> str)
</pre>
<dl>
  <dd> Gets the specified font using the name passed in.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> str - the name
  </dl></dd>
</dl>
<a name="getFont(java.lang.String, java.awt.Font)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFont"><b>getFont</b></a>
<pre>
 public static <a href="#_top_">Font</a> getFont(<a href="java.lang.String.html#_top_">String</a> nm,
                            <a href="#_top_">Font</a> font)
</pre>
<dl>
  <dd> Gets the specified font from the system properties list.
 The first argument is treated as the name of a system property to
 be obtained as if by the method <code>System.getProperty</code>.
 The string value of this property is then interpreted as a font.
 <p>
 The property value should be one of the following forms:
 <ul>
 <li><em>fontname-style-pointsize</em>
 <li><em>fontname-pointsize</em>
 <li><em>fontname-style</em>
 <li><em>fontname</em>
 </ul>
 where <i>style</i> is one of the three strings
 <code>"BOLD"</code>, <code>"BOLDITALIC"</code>, or
 <code>"ITALIC"</code>, and point size is a decimal
 representation of the point size.
 <p>
 The default style is <code>PLAIN</code>. The default point size
 is 12.
 <p>
 If the specified property is not found, the <code>font</code>
 argument is returned instead.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> nm - the property name
    <dd> font - a default font to return if property <code>nm</code>
             is not defined
    <dt> <b>Returns:</b>
    <dd> the <code>Font</code> value of the property.
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Returns a hashcode for this font.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a hashcode value for this font.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#hashCode()">hashCode</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Compares this object to the specifed object.
 The result is <code>true</code> if and only if the argument is not
 <code>null</code> and is a <code>Font</code> object with the same
 name, style, and point size as this font.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> obj - the object to compare this font with.
    <dt> <b>Returns:</b>
    <dd> <code>true</code> if the objects are equal;
            <code>false</code> otherwise.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#equals(java.lang.Object)">equals</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Converts this object to a String representation.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this object
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.awt.html">This Package</a>  <a href="java.awt.FlowLayout.html#_top_">Previous</a>  <a href="java.awt.FontMetrics.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
