edu.jhu.tmaj.util.swing
Class DefaultFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by edu.jhu.tmaj.util.swing.DefaultFileFilter
All Implemented Interfaces:
java.io.FileFilter

public final class DefaultFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter

A file filter that display only directories and files that end with a specified extention


Field Summary
static DefaultFileFilter TEXT_FILE_FILTER
           
 
Constructor Summary
DefaultFileFilter(java.lang.String extension)
           
 
Method Summary
 boolean accept(java.io.File file)
          Returns true if the File is a directory or ends with the specified extention, otherwise false.
 java.lang.String getDescription()
          Returns the extention
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_FILE_FILTER

public static final DefaultFileFilter TEXT_FILE_FILTER
Constructor Detail

DefaultFileFilter

public DefaultFileFilter(java.lang.String extension)
Method Detail

getDescription

public java.lang.String getDescription()
Returns the extention

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

accept

public boolean accept(java.io.File file)
Returns true if the File is a directory or ends with the specified extention, otherwise false.

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