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/FileDialog.java
/* * @(#)FileDialog.java 1.33 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.FileDialogPeer; import java.io.FilenameFilter; /** * The <code>FileDialog</code> class displays a dialog window * from which the user can select a file. * <p> * Since it is a modal dialog, when the application calls * its <code>show</code> method to display the dialog, * it blocks the rest of the application until the user has * chosen a file. * * @see Window#show * * @version 1.33, 12/10/01 * @author Sami Shaio * @author Arthur van Hoff * @since JDK1.0 */ public class FileDialog extends Dialog { /** * This constant value indicates that the purpose of the file * dialog window is to locate a file from which to read. * @since JDK1.0 */ public static final int LOAD = 0; /** * This constant value indicates that the purpose of the file * dialog window is to locate a file to which to write. * @since JDK1.0 */ public static final int SAVE = 1; int mode; String dir; String file; FilenameFilter filter; private static final String base = "filedlg"; private static int nameCounter = 0; /* * JDK 1.1 serialVersionUID */ private static final long serialVersionUID = 5035145889651310422L; /** * Creates a file dialog for loading a file. The title of the * file dialog is initially empty. * @param parent the owner of the dialog * @since JDK1.1 */ public FileDialog(Frame parent) { this(parent, "", LOAD); } /** * Creates a file dialog window with the specified title for loading * a file. The files shown are those in the current directory. * @param parent the owner of the dialog. * @param title the title of the dialog. * @since JDK1.0 */ public FileDialog(Frame parent, String title) { this(parent, title, LOAD); } /** * Creates a file dialog window with the specified title for loading * or saving a file. * <p> * If the value of <code>mode</code> is <code>LOAD</code>, then the * file dialog is finding a file to read. If the value of * <code>mode</code> is <code>SAVE</code>, the file dialog is finding * a place to write a file. * @param parent the owner of the dialog. * @param title the title of the dialog. * @param mode the mode of the dialog. * @see java.awt.FileDialog#LOAD * @see java.awt.FileDialog#SAVE * @since JDK1.0 */ public FileDialog(Frame parent, String title, int mode) { super(parent, title, true); this.mode = mode; setLayout(null); } /** * Construct a name for this component. Called by getName() when the * name is null. */ String constructComponentName() { return base + nameCounter++; } /** * Creates the file dialog's peer. The peer allows us to change the look * of the file dialog without changing its functionality. */ public void addNotify() { synchronized(getTreeLock()) { if (peer == null) peer = getToolkit().createFileDialog(this); super.addNotify(); } } /** * Indicates whether this file dialog box is for loading from a file * or for saving to a file. * @return the mode of this file dialog window, either * <code>FileDialog.LOAD</code> or * <code>FileDialog.SAVE</code>. * @see java.awt.FileDialog#LOAD * @see java.awt.FileDialog#SAVE * @see java.awt.FileDialog#setMode * @since JDK1.0 */ public int getMode() { return mode; } /** * Sets the mode of the file dialog. * @param mode the mode for this file dialog, either * <code>FileDialog.LOAD</code> or * <code>FileDialog.SAVE</code>. * @see java.awt.FileDialog#LOAD * @see java.awt.FileDialog#SAVE * @see java.awt.FileDialog#getMode * @exception IllegalArgumentException if an illegal file * dialog mode is used. * @since JDK1.1 */ public void setMode(int mode) { switch (mode) { case LOAD: case SAVE: this.mode = mode; break; default: throw new IllegalArgumentException("illegal file dialog mode"); } } /** * Gets the directory of this file dialog. * @return the directory of this file dialog. * @see java.awt.FileDialog#setDirectory * @since JDK1.0 */ public String getDirectory() { return dir; } /** * Sets the directory of this file dialog window to be the * specified directory. * @param dir the specific directory. * @see java.awt.FileDialog#getDirectory * @since JDK1.0 */ public void setDirectory(String dir) { this.dir = dir; FileDialogPeer peer = (FileDialogPeer)this.peer; if (peer != null) { peer.setDirectory(dir); } } /** * Gets the selected file of this file dialog. * @return the currently selected file of this file dialog window, * or <code>null</code> if none is selected. * @see java.awt.FileDialog#setFile * @since JDK1.0 */ public String getFile() { return file; } /** * Sets the selected file for this file dialog window to be the * specified file. This file becomes the default file if it is set * before the file dialog window is first shown. * @param file the file being set. * @see java.awt.FileDialog#getFile * @since JDK1.0 */ public void setFile(String file) { this.file = file; FileDialogPeer peer = (FileDialogPeer)this.peer; if (peer != null) { peer.setFile(file); } } /** * Determines this file dialog's filename filter. A filename filter * allows the user to specify which files appear in the file dialog * window. * @return this file dialog's filename filter. * @see java.io.FilenameFilter * @see java.awt.FileDialog#setFilenameFilter * @since JDK1.0 */ public FilenameFilter getFilenameFilter() { return filter; } /** * Sets the filename filter for this file dialog window to the * specified filter. * @param filter the specified filter. * @see java.io.FilenameFilter * @see java.awt.FileDialog#getFilenameFilter * @since JDK1.0 */ public synchronized void setFilenameFilter(FilenameFilter filter) { this.filter = filter; FileDialogPeer peer = (FileDialogPeer)this.peer; if (peer != null) { peer.setFilenameFilter(filter); } } /** * Returns the parameter string representing the state of this file * dialog window. This string is useful for debugging. * @return the parameter string of this file dialog window. * @since JDK1.0 */ protected String paramString() { String str = super.paramString(); if (dir != null) { str += ",dir= " + dir; } return str + ((mode == LOAD) ? ",load" : ",save"); } boolean postsOldMouseEvents() { return false; } }
⏎ java/awt/FileDialog.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, 176921👍, 0💬
Popular Posts:
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...
JDOM provides a solution for using XML from Java that is as simple as Java itself. There is no compe...
Apache Avalon began in 1999 as the Java Apache Server Framework and in late 2002 separated from the ...
Where Can I see Java Source Code files for Xerces Java 2.11.2? Here are Java Source Code files for X...
JDK 17 java.desktop.jmod is the JMOD file for JDK 17 Desktop module. JDK 17 Desktop module compiled ...