org.acm.seguin.io
Class ExtensionFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by org.acm.seguin.io.ExtensionFileFilter

public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter

Accepts all files

Author:
Chris Seguin

Constructor Summary
ExtensionFileFilter()
          Constructor for the ExtensionFileFilter
 
Method Summary
 boolean accept(java.io.File file)
          Should this file be accepted
 void addExtension(java.lang.String ext)
          Add an extension
 java.lang.String getDescription()
          Return the description of the files accepted
 void setDescription(java.lang.String descr)
          Sets the description of the files accepted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionFileFilter

public ExtensionFileFilter()
Constructor for the ExtensionFileFilter

Method Detail

setDescription

public void setDescription(java.lang.String descr)
Sets the description of the files accepted

Parameters:
descr - the new description

getDescription

public java.lang.String getDescription()
Return the description of the files accepted

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
the description to be displayed in the file box

addExtension

public void addExtension(java.lang.String ext)
Add an extension

Parameters:
ext - the extension to add

accept

public boolean accept(java.io.File file)
Should this file be accepted

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - the file under consideration
Returns:
true - all files are accepted