dLife Home Page

dlife.sys
Class ImageFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by dlife.sys.ImageFileFilter

public class ImageFileFilter
extends FileFilter

This class filters files in a JFileChooser such that only recognized image types can be chosen.

Version:
Jun 28, 2009
Author:
Grant Braught, Dickinson College

Constructor Summary
ImageFileFilter()
           
 
Method Summary
 boolean accept(File f)
          Accept any file that is a directory or has an extension that is recognized by the javax.imageio.ImageIO class.
 String getDescription()
          This filter accepts all Image files that are recognized by Java.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFileFilter

public ImageFileFilter()
Method Detail

accept

public boolean accept(File f)
Accept any file that is a directory or has an extension that is recognized by the javax.imageio.ImageIO class.

Specified by:
accept in class FileFilter

getDescription

public String getDescription()
This filter accepts all Image files that are recognized by Java.

Specified by:
getDescription in class FileFilter

dLife Home Page