From 10ecb76a0a62b0a55459a078758b9db2adcf4b75 Mon Sep 17 00:00:00 2001 From: Lillian Angel Date: Fri, 16 Jun 2006 15:41:36 +0000 Subject: 2006-06-16 Lillian Angel * java/awt/FileDialog.java (FileDialog): Implemented. (FileDialog): Implemented. (FileDialog): Implemented. * java/awt/Font.java: Added TYPE1_FONT constant field. --- ChangeLog | 9 +++++++++ java/awt/FileDialog.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ java/awt/Font.java | 7 ++++++- 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2e1c7a3ae..7e46da890 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-06-16 Lillian Angel + + * java/awt/FileDialog.java + (FileDialog): Implemented. + (FileDialog): Implemented. + (FileDialog): Implemented. + * java/awt/Font.java: + Added TYPE1_FONT constant field. + 2006-06-16 Lillian Angel * java/awt/font/TextLayout.java: diff --git a/java/awt/FileDialog.java b/java/awt/FileDialog.java index 7f2723e7e..60f993d32 100644 --- a/java/awt/FileDialog.java +++ b/java/awt/FileDialog.java @@ -101,6 +101,52 @@ private int mode; * Constructors */ + /** + * Initializes a new instance of FileDialog with the specified + * parent. This dialog will have no title and will be for loading a file. + * + * @param parent The parent dialog for this. + */ + public FileDialog(Dialog parent) + { + this(parent, "", LOAD); + } + + /** + * Initialized a new instance of FileDialog with the + * specified parent and title. This dialog will be for opening a file. + * + * @param parent The parent dialog for this. + * @param title The title for this dialog. + */ + public FileDialog(Dialog parent, String title) + { + this(parent, title, LOAD); + } + + /** + * Initialized a new instance of FileDialog with the specified + * parent, title, and mode. + * + * @param parent The parent dialog for this. + * @param title The title for this dialog. + * @param mode The mode of the dialog, either LOAD or + * SAVE. + * @throws IllegalArgumentException - if illegal mode, if + * GraphicsEnvironment.isHeadless or if parent is null. + */ + public FileDialog(Dialog parent, String title, int mode) + { + super(parent, title, true); + + // Other IllegalArgumentException cases are taken care of in Window.java + if (mode != LOAD && mode != SAVE) + throw new IllegalArgumentException ( + "Mode argument must be either LOAD or SAVE"); + + setMode(mode); + } + /** * Initializes a new instance of FileDialog with the * specified parent. This dialog will have no title and will be for diff --git a/java/awt/Font.java b/java/awt/Font.java index a52f63408..e6d5012e9 100644 --- a/java/awt/Font.java +++ b/java/awt/Font.java @@ -114,7 +114,12 @@ public class Font implements Serializable * @since 1.3 */ public static final int TRUETYPE_FONT = 0; - + + /** + * Indicates to createFont that the supplied font data + * is in Type1 format. + */ + public static final int TYPE1_FONT = 1; /** * A flag for layoutGlyphVector, indicating that the -- cgit v1.2.1