More for JAPI

2006-06-16  Lillian Angel  <[EMAIL PROTECTED]>

        * java/awt/FileDialog.java
        (FileDialog): Implemented.
        (FileDialog): Implemented.
        (FileDialog): Implemented.
        * java/awt/Font.java:
        Added TYPE1_FONT constant field.

Index: java/awt/FileDialog.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/FileDialog.java,v
retrieving revision 1.14
diff -u -r1.14 FileDialog.java
--- java/awt/FileDialog.java	2 Jul 2005 20:32:24 -0000	1.14
+++ java/awt/FileDialog.java	16 Jun 2006 15:38:22 -0000
@@ -101,6 +101,52 @@
  * Constructors
  */
 
+  /**
+   * Initializes a new instance of <code>FileDialog</code> 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 <code>FileDialog</code> 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 <code>FileDialog</code> 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 <code>LOAD</code> or
+   *          <code>SAVE</code>.
+   * @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 <code>FileDialog</code> with the 
   * specified parent.  This dialog will have no title and will be for
Index: java/awt/Font.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Font.java,v
retrieving revision 1.34
diff -u -r1.34 Font.java
--- java/awt/Font.java	20 May 2006 12:52:52 -0000	1.34
+++ java/awt/Font.java	16 Jun 2006 15:38:22 -0000
@@ -114,7 +114,12 @@
    * @since 1.3
    */
   public static final int TRUETYPE_FONT = 0;
-
+  
+  /**
+   * Indicates to <code>createFont</code> that the supplied font data
+   * is in Type1 format.
+   */
+  public static final int TYPE1_FONT = 1;
 
   /**
    * A flag for <code>layoutGlyphVector</code>, indicating that the

Reply via email to