I reformatted this file and added API docs:
2005-09-22 David Gilbert <[EMAIL PROTECTED]>
* 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
+ * [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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
+}
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches