com.huguesjohnson.fileFilter
Class MultiExtensionFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bycom.huguesjohnson.fileFilter.MultiExtensionFileFilter
Direct Known Subclasses:
XmlFileFilter

public class MultiExtensionFileFilter
extends javax.swing.filechooser.FileFilter

MultiExtensionFileFilter Filter to accept a list of file extensions

Author:
Hugues Johnson

Constructor Summary
MultiExtensionFileFilter(java.lang.String[] extensionList)
          Creates a new instance of MultiExtensionFileFilter
 
Method Summary
 boolean accept(java.io.File file)
          accept tests if a file has an extension of a known type.
 java.lang.String getDescription()
          getDescription returns the description of file accepted by the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiExtensionFileFilter

public MultiExtensionFileFilter(java.lang.String[] extensionList)
Creates a new instance of MultiExtensionFileFilter

Parameters:
extensionList - the list of file extensions to accept NOT case sensitive directories always accepted
Method Detail

accept

public final boolean accept(java.io.File file)
accept tests if a file has an extension of a known type.

Parameters:
file - file to check
Returns:
false if the extension of a file matches a known type

getDescription

public java.lang.String getDescription()
getDescription returns the description of file accepted by the filter.

Returns:
description of files accepted by the current filter