visad.util
Class FormFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by visad.util.FormFileFilter
All Implemented Interfaces:
FileFilter, Comparable

public class FormFileFilter
extends FileFilter
implements FileFilter, Comparable

A file filter based on a file form adapter's isThisType(String) method, for use with a JFileChooser.


Constructor Summary
FormFileFilter(FormFileInformer form, String description)
          Constructs a new filter that accepts the given extension.
 
Method Summary
 boolean accept(File f)
          Accepts files with the proper extensions.
 int compareTo(Object o)
          Compares two FileFilter objects alphanumerically.
 String getDescription()
          return the filter's description
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormFileFilter

public FormFileFilter(FormFileInformer form,
                      String description)
Constructs a new filter that accepts the given extension.

Method Detail

accept

public boolean accept(File f)
Accepts files with the proper extensions.

Specified by:
accept in interface FileFilter
Specified by:
accept in class FileFilter

getDescription

public String getDescription()
return the filter's description

Specified by:
getDescription in class FileFilter

compareTo

public int compareTo(Object o)
Compares two FileFilter objects alphanumerically.

Specified by:
compareTo in interface Comparable