classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: javax.swing.filechooser.FileFilter


From: David Gilbert
Subject: [cp-patches] FYI: javax.swing.filechooser.FileFilter
Date: Thu, 22 Sep 2005 14:16:32 +0000
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050728)

I reformatted this file and added API docs:

2005-09-22  David Gilbert  <address@hidden>

        * javax/swing/filechooser/FileFilter.java: reformatted and added API
        docs.

Regards,

Dave
Index: javax/swing/filechooser/FileFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/filechooser/FileFilter.java,v
retrieving revision 1.3
diff -u -r1.3 FileFilter.java
--- javax/swing/filechooser/FileFilter.java     2 Jul 2005 20:32:50 -0000       
1.3
+++ javax/swing/filechooser/FileFilter.java     22 Sep 2005 13:12:55 -0000
@@ -1,5 +1,5 @@
 /* FileFilter.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -40,41 +40,44 @@
 
 import java.io.File;
 
+import javax.swing.JFileChooser;
+
 /**
- * FileFilter
+ * The base class for filters that control the visibility of files in the
+ * address@hidden JFileChooser} component.
+ * 
+ * @see JFileChooser#addChoosableFileFilter(FileFilter)
+ * 
  * @author     Andrew Selkirk
- * @version    1.0
  */
-public abstract class FileFilter {
-
-       //-------------------------------------------------------------
-       // Initialization ---------------------------------------------
-       //-------------------------------------------------------------
-
-       /**
-        * Constructor FileFilter
-        */
-       public FileFilter() {
-               // TODO
-       } // FileFilter()
-
-
-       //-------------------------------------------------------------
-       // Methods ----------------------------------------------------
-       //-------------------------------------------------------------
-
-       /**
-        * accept
-        * @param file TODO
-        * @returns boolean
-        */
-       public abstract boolean accept(File file);
-
-       /**
-        * getDescription
-        * @returns String
-        */
-       public abstract String getDescription();
+public abstract class FileFilter 
+{
 
+  /**
+   * Default constructor.
+   */
+  public FileFilter() {
+  }
+
+  /**
+   * Returns <code>true</code> if the specified file matches the filter, and
+   * <code>false</code> otherwise.
+   * 
+   * @param file  the file.
+   * 
+   * @returns A boolean.
+   */
+  public abstract boolean accept(File file);
+
+  /**
+   * Returns a description of the files that will be selected by the filter 
+   * (for example, "Java source files").  This description will usually be 
+   * displayed on the address@hidden JFileChooser} component, often in a combo 
box that
+   * is used to select the appropriate filter (in cases where more than one
+   * filter is available).
+   * 
+   * @returns A description of the filter.
+   */
+  public abstract String getDescription();
 
-} // FileFilter
+}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]