Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 1.1 Source Code Directory
JDK 1.1 source code directory contains Java source code for JDK 1.1 core classes: "C:\fyicenter\jdk-1.1.8\src".
Here is the list of Java classes of the JDK 1.1 source code:
✍: FYIcenter
⏎ java/awt/Font.java
/* * @(#)Font.java 1.30 01/12/10 * * Copyright 2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package java.awt; import java.awt.peer.FontPeer; /** * A class that produces font objects. * * @version 1.30, 12/10/01 * @author Sami Shaio * @author Arthur van Hoff * @author Jim Graham * @since JDK1.0 */ public class Font implements java.io.Serializable { /* * Constants to be used for styles. Can be combined to mix * styles. */ /** * The plain style constant. This style can be combined with * the other style constants for mixed styles. * @since JDK1.0 */ public static final int PLAIN = 0; /** * The bold style constant. This style can be combined with the * other style constants for mixed styles. * @since JDK1.0 */ public static final int BOLD = 1; /** * The italicized style constant. This style can be combined * with the other style constants for mixed styles. * @since JDK1.0 */ public static final int ITALIC = 2; /** * Private data. */ transient private int pData; /** * The platform specific family name of this font. */ transient private String family; /** * The logical name of this font. * @since JDK1.0 */ protected String name; /** * The style of the font. This is the sum of the * constants <code>PLAIN</code>, <code>BOLD</code>, * or <code>ITALIC</code>. */ protected int style; /** * The point size of this font. * @since JDK1.0 */ protected int size; /** * The platform specific font information. */ transient FontPeer peer; /* * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = -4206021311591459213L; /** * Gets the peer of the font. * @return the peer of the font. * @since JDK1.1 */ public FontPeer getPeer(){ return peer; } private void initializeFont() { family = System.getProperty("awt.font." + name.toLowerCase(), name); this.peer = Toolkit.getDefaultToolkit().getFontPeer(name, style); } /** * Creates a new font with the specified name, style and point size. * @param name the font name * @param style the constant style used * @param size the point size of the font * @see Toolkit#getFontList * @since JDK1.0 */ public Font(String name, int style, int size) { this.name = name; this.style = style; this.size = size; initializeFont(); } /** * Gets the platform specific family name of the font. Use the * <code>getName</code> method to get the logical name of the font. * @return a string, the platform specific family name. * @see java.awt.Font#getName * @since JDK1.0 */ public String getFamily() { return family; } /** * Gets the logical name of the font. * @return a string, the logical name of the font. * @see #getFamily * @since JDK1.0 */ public String getName() { return name; } /** * Gets the style of the font. * @return the style of this font. * @see #isPlain * @see #isBold * @see #isItalic * @since JDK1.0 */ public int getStyle() { return style; } /** * Gets the point size of the font. * @return the point size of this font. * @since JDK1.0 */ public int getSize() { return size; } /** * Indicates whether the font's style is plain. * @return <code>true</code> if the font is neither * bold nor italic; <code>false</code> otherwise. * @see java.awt.Font#getStyle * @since JDK1.0 */ public boolean isPlain() { return style == 0; } /** * Indicates whether the font's style is bold. * @return <code>true</code> if the font is bold; * <code>false</code> otherwise. * @see java.awt.Font#getStyle * @since JDK1.0 */ public boolean isBold() { return (style & BOLD) != 0; } /** * Indicates whether the font's style is italic. * @return <code>true</code> if the font is italic; * <code>false</code> otherwise. * @see java.awt.Font#getStyle * @since JDK1.0 */ public boolean isItalic() { return (style & ITALIC) != 0; } /** * Gets a font from the system properties list. * @param nm the property name * @see java.awt.Font#getFont(java.lang.String, java.awt.Font) * @since JDK1.0 */ public static Font getFont(String nm) { return getFont(nm, null); } /** * Gets the specified font using the name passed in. * @param str the name * @since JDK1.1 */ public static Font decode(String str) { String fontName = str; int fontSize = 12; int fontStyle = Font.PLAIN; int i = str.indexOf('-'); if (i >= 0) { fontName = str.substring(0, i); str = str.substring(i+1); if ((i = str.indexOf('-')) >= 0) { if (str.startsWith("bold-")) { fontStyle = Font.BOLD; } else if (str.startsWith("italic-")) { fontStyle = Font.ITALIC; } else if (str.startsWith("bolditalic-")) { fontStyle = Font.BOLD | Font.ITALIC; } str = str.substring(i + 1); } try { fontSize = Integer.valueOf(str).intValue(); } catch (NumberFormatException e) { } } return new Font(fontName, fontStyle, fontSize); } /** * 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. * @param nm the property name * @param font a default font to return if property <code>nm</code> * is not defined * @return the <code>Font</code> value of the property. * @since JDK1.0 */ public static Font getFont(String nm, Font font) { String str = System.getProperty(nm); if (str == null) { return font; } return Font.decode(str); } /** * Returns a hashcode for this font. * @return a hashcode value for this font. * @since JDK1.0 */ public int hashCode() { return name.hashCode() ^ style ^ size; } /** * 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. * @param obj the object to compare this font with. * @return <code>true</code> if the objects are equal; * <code>false</code> otherwise. * @since JDK1.0 */ public boolean equals(Object obj) { if (obj instanceof Font) { Font font = (Font)obj; return (size == font.size) && (style == font.style) && name.equals(font.name); } return false; } /** * Converts this object to a String representation. * @return a string representation of this object * @since JDK1.0 */ public String toString() { String strStyle; if (isBold()) { strStyle = isItalic() ? "bolditalic" : "bold"; } else { strStyle = isItalic() ? "italic" : "plain"; } return getClass().getName() + "[family=" + family + ",name=" + name + ",style=" + strStyle + ",size=" + size + "]"; } /* Serialization support. A readObject method is neccessary because * the constructor creates the fonts peer, and we can't serialize the * peer. Similarly the computed font "family" may be different * at readObject time than at writeObject time. An integer version is * written so that future versions of this class will be able to recognize * serialized output from this one. */ private int fontSerializedDataVersion = 1; private void writeObject(java.io.ObjectOutputStream s) throws java.lang.ClassNotFoundException, java.io.IOException { s.defaultWriteObject(); } private void readObject(java.io.ObjectInputStream s) throws java.lang.ClassNotFoundException, java.io.IOException { s.defaultReadObject(); initializeFont(); } }
⏎ java/awt/Font.java
Or download all of them as a single archive file:
File name: jdk-1.1.8-src.zip File size: 1574187 bytes Release date: 2018-11-16 Download
⇒ Backup JDK 1.1 Installation Directory
2018-11-17, 149156👍, 0💬
Popular Posts:
Apache Log4j SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implemen...
Java Cryptography Extension 1.6 JAR File Size and Download Location: File name: jce.jar, jce-1.6.jar...
Java Cryptography Extension 1.6 JAR File Size and Download Location: File name: jce.jar, jce-1.6.jar...
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...
What Is ojdbc7.jar for Oracle 12c R1? ojdbc7.jar for Oracle 12c R1 is the JAR files of ojdbc.jar, JD...