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.

This filter is case insensitive.

This inner class has been generalized by the class FileExtensionFilter in the package edu.neu.ccs.util. To minimize confusion and to support backward compatibility, this class has been retained.

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.

Extension match is case insensitive.

If the given String is null or of length 0, 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