Class FileFilter

java.lang.Object
javax.swing.filechooser.FileFilter
VASSAL.tools.filechooser.FileFilter
All Implemented Interfaces:
FilenameFilter
Direct Known Subclasses:
DirectoryFileFilter, ExtensionFileFilter

public abstract class FileFilter
extends FileFilter
implements FilenameFilter
The file filter abstract base class for VASSAL.tools.FileChooser. This class joins together the FileFilter class and the java.awt.FilenameFilter interface so that a uniform file chooser may be used with VASSAL.tools.FileChooser, regardless of the actual (i.e., navive or Swing) file chooser displayed.
Author:
uckelman
  • Constructor Details

    • FileFilter

      public FileFilter()
  • Method Details

    • accept

      public abstract boolean accept​(File f)
      The accept test used by Swing file choosers.
      Specified by:
      accept in class FileFilter
      Returns:
      Whether the given file is accepted by this filter.
    • accept

      public boolean accept​(File dir, String name)
      The accept test used by AWT file choosers.
      Specified by:
      accept in interface FilenameFilter
      Returns:
      Whether the given file is accepted by this filter.
    • getDescription

      public abstract String getDescription()
      Specified by:
      getDescription in class FileFilter
      Returns:
      A description of this filter to be displayed in the file chooser.