Class DefaultFileFilter.ImageFileFilter

java.lang.Object
javax.swing.filechooser.FileFilter
de.uni_trier.wi2.procake.gui.objecteditor.nestworkfloweditor.editor.DefaultFileFilter.ImageFileFilter
Enclosing class:
DefaultFileFilter

public static class DefaultFileFilter.ImageFileFilter extends FileFilter
Utility file filter to accept all image formats supported by image io.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    Description of the filter.
    protected static String[]
    Holds the accepted file format extensions for images.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ImageFileFilter(String description)
    Constructs a new file filter for all supported image formats using the specified description.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(File file)
    Returns true if the file is a directory or ends with a known image extension.
    Returns the description.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • imageFormats

      protected static String[] imageFormats
      Holds the accepted file format extensions for images.
    • desc

      protected String desc
      Description of the filter.
  • Constructor Details

    • ImageFileFilter

      public ImageFileFilter(String description)
      Constructs a new file filter for all supported image formats using the specified description.
      Parameters:
      description - The description to use for the file filter.
  • Method Details

    • accept

      public boolean accept(File file)
      Returns true if the file is a directory or ends with a known image extension.
      Specified by:
      accept in class FileFilter
      Parameters:
      file - The file to be checked.
      Returns:
      Returns true if the file is accepted.
    • getDescription

      public String getDescription()
      Returns the description.
      Specified by:
      getDescription in class FileFilter
      Returns:
      Returns the description.