/[classpath]/classpath/javax/swing/filechooser/FileFilter.java
ViewVC logotype

Diff of /classpath/javax/swing/filechooser/FileFilter.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.1 by gnu_andrew, Tue Aug 2 20:12:37 2005 UTC revision 1.2.2.2 by gnu_andrew, Wed Nov 2 00:43:50 2005 UTC
# Line 1  Line 1 
1  /* FileFilter.java --  /* FileFilter.java --
2     Copyright (C) 2002 Free Software Foundation, Inc.     Copyright (C) 2002, 2005 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 40  package javax.swing.filechooser; Line 40  package javax.swing.filechooser;
40    
41  import java.io.File;  import java.io.File;
42    
43    import javax.swing.JFileChooser;
44    
45  /**  /**
46   * FileFilter   * The base class for filters that control the visibility of files in the
47     * {@link JFileChooser} component.
48     *
49     * @see JFileChooser#addChoosableFileFilter(FileFilter)
50     *
51   * @author      Andrew Selkirk   * @author      Andrew Selkirk
  * @version     1.0  
52   */   */
53  public abstract class FileFilter {  public abstract class FileFilter
54    {
         //-------------------------------------------------------------  
         // 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();  
55    
56      /**
57       * Default constructor.
58       */
59      public FileFilter()
60      {
61        // Nothing to do here.
62      }
63    
64      /**
65       * Returns <code>true</code> if the specified file matches the filter, and
66       * <code>false</code> otherwise.
67       *
68       * @param file  the file.
69       *
70       * @returns A boolean.
71       */
72      public abstract boolean accept(File file);
73    
74      /**
75       * Returns a description of the files that will be selected by the filter
76       * (for example, "Java source files").  This description will usually be
77       * displayed on the {@link JFileChooser} component, often in a combo box that
78       * is used to select the appropriate filter (in cases where more than one
79       * filter is available).
80       *
81       * @returns A description of the filter.
82       */
83      public abstract String getDescription();
84    
85  } // FileFilter  }

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26