Module org.jpo
Package org.jpo.gui

Class ImageFilter


public class ImageFilter extends FileFilter
This class overrides the abstract javax.swing.filechoose.FileFilter class (not the java.io.FileFilter) to provide a true or false indicator to using JFileChoosers whether the file is a directory or image ending in .jpg, .jpeg, .tif, .tiff or .gif.
  • Constructor Details

    • ImageFilter

      public ImageFilter()
  • Method Details

    • accept

      public boolean accept(File file)
      accepts directories and files ending in .jpg, .jpeg, .tif, .tiff or .gif
      Specified by:
      accept in class FileFilter
      Parameters:
      file - the file to test
      Returns:
      true if good, false if not
    • getDescription

      public String getDescription()
      returns the description "tiff, gif, jpeg Images"
      Specified by:
      getDescription in class FileFilter
      Returns:
      A description for the filter