Package com.xinapse.image
Class ImageFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
com.xinapse.image.ImageFileFilter
A file filter for all images that can be loaded directly into Jim.
The accept method returns
true
if file is an image file that can be loaded
directly into Jim.-
Field Summary
Modifier and TypeFieldDescriptionstatic final ImageFileFilter
An ImageFileFilter used for testing whether a File refers to aWritableImage
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests whether the given file probably represents a loadable image file.Returns "All Images".
-
Field Details
-
INSTANCE
An ImageFileFilter used for testing whether a File refers to aWritableImage
.
-
-
Method Details
-
getDescription
Returns "All Images".- Specified by:
getDescription
in classFileFilter
- Returns:
- the description String "All Images".
-
accept
Tests whether the given file probably represents a loadable image file. Also accepts directories to allow navigation while looking for images.- Specified by:
accept
in classFileFilter
- Parameters:
file
- the file to test.- Returns:
- true if the supplied file is a loadable image file, or a directory; returns false otherwise.
-