ucar.unidata.util
Class FileManager.ExtFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by ucar.unidata.util.FileManager.ExtFilter
Enclosing class:
FileManager

public static class FileManager.ExtFilter
extends FileFilter

A FileFilter extension that allows specifiying an extension and description.


Constructor Summary
FileManager.ExtFilter(String file_extension, String desc)
          Create an ExtFilter with the given params.
 
Method Summary
 boolean accept(File file)
          Accept the file.
 String getDescription()
          Get the description for the files this filter accepts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManager.ExtFilter

public FileManager.ExtFilter(String file_extension,
                             String desc)
Create an ExtFilter with the given params.

Parameters:
file_extension - extension for files.
desc - description of these files.
Method Detail

accept

public boolean accept(File file)
Accept the file.

Specified by:
accept in class FileFilter
Parameters:
file - file to accept
Returns:
true if it matches the extension for this file.

getDescription

public String getDescription()
Get the description for the files this filter accepts.

Specified by:
getDescription in class FileFilter
Returns:
description.