edu.neu.ccs.gui
Class FileView.ExtensionFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--edu.neu.ccs.gui.FileView.ExtensionFileFilter
All Implemented Interfaces:
Cloneable, Serializable
Enclosing class:
FileView

public static class FileView.ExtensionFileFilter
extends FileFilter
implements Cloneable, Serializable

A file filter that accepts all files with a specific extension.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
FileView.ExtensionFileFilter(String extension)
          Constructor for a filter accepting all files with the given extension.
 
Method Summary
 boolean accept(File f)
          Returns whether or not the given file is acceptable to this filter.
 String getDescription()
          The description of this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileView.ExtensionFileFilter

public FileView.ExtensionFileFilter(String extension)
Constructor for a filter accepting all files with the given extension. If the given String is null, all files are acceptable to this filter.

Parameters:
extension - the desired extension
Method Detail

accept

public boolean accept(File f)
Returns whether or not the given file is acceptable to this filter.

Specified by:
accept in class FileFilter
Parameters:
f - the file to be tested

getDescription

public String getDescription()
The description of this filter.

Specified by:
getDescription in class FileFilter