public static class DefaultFileFilter.ImageFileFilter
extends javax.swing.filechooser.FileFilter
ImageIO.getReaderFormatNames()
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
desc
Description of the filter.
|
protected static java.lang.String[] |
imageFormats
Holds the accepted file format extensions for images.
|
Constructor and Description |
---|
DefaultFileFilter.ImageFileFilter(java.lang.String description)
Constructs a new file filter for all supported image formats using
the specified description.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Returns true if the file is a directory or ends with a known image
extension.
|
java.lang.String |
getDescription()
Returns the description.
|
protected static java.lang.String[] imageFormats
protected java.lang.String desc
public DefaultFileFilter.ImageFileFilter(java.lang.String description)
description
- The description to use for the file filter.public boolean accept(java.io.File file)
accept
in class javax.swing.filechooser.FileFilter
file
- The file to be checked.public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter