java.lang.Object
javax.swing.filechooser.FileFilter
org.jpo.gui.JpgFilter
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 or .jpeg.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accepts directories and files ending in .jpg, .jpegreturns the description "JPEG Files"
-
Constructor Details
-
JpgFilter
public JpgFilter()
-
-
Method Details
-
accept
accepts directories and files ending in .jpg, .jpeg- Specified by:
accept
in classFileFilter
- Parameters:
file
- the file to test- Returns:
- true if OK
-
getDescription
returns the description "JPEG Files"- Specified by:
getDescription
in classFileFilter
- Returns:
- true if it's a jpeg, false if not
-