visad.util
Class ExtensionFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by visad.util.ExtensionFileFilter
All Implemented Interfaces:
java.io.FileFilter

public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter

A file filter based on file extensions, for use with a JFileChooser.


Constructor Summary
ExtensionFileFilter(java.lang.String[] extensions, java.lang.String description)
          construct a new filter that accepts the given filters
ExtensionFileFilter(java.lang.String extension, java.lang.String description)
          construct a new filter that accepts the given filter
 
Method Summary
 boolean accept(java.io.File f)
          accept files with the proper extensions
 java.lang.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

ExtensionFileFilter

public ExtensionFileFilter(java.lang.String extension,
                           java.lang.String description)
construct a new filter that accepts the given filter


ExtensionFileFilter

public ExtensionFileFilter(java.lang.String[] extensions,
                           java.lang.String description)
construct a new filter that accepts the given filters

Method Detail

accept

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

Specified by:
accept in interface java.io.FileFilter
Specified by:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
return the filter's description

Specified by:
getDescription in class javax.swing.filechooser.FileFilter