com.huguesjohnson.fileFilter
Class ImageFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bycom.huguesjohnson.fileFilter.ImageFileFilter

public class ImageFileFilter
extends javax.swing.filechooser.FileFilter

ImageFileFilter filter to only accept images supported by ImageIO uses ImageReaderWriterSpi.getFileSuffixes() to get a list of supported extensions

Author:
Hugues Johnson

Constructor Summary
ImageFileFilter()
          Creates a new instance of ImageFileFilter
 
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 files accepted by the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFileFilter

public ImageFileFilter()
Creates a new instance of ImageFileFilter

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 files accepted by the filter.

Returns:
description of files accepted by the current filter