|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
view.ImageFilter
public class ImageFilter
A small class that filters files to display image files of types java 1.4 can read/write. Note that we extend the File filter in the swing toolkit.
| Nested Class Summary | |
|---|---|
static class |
ImageFilter.Formats
To print all known formats. |
| Field Summary | |
|---|---|
static List<String> |
READFORMATS
The known extensions for reading. |
private static List<String> |
READSUFFIX
The known extensions for reading. |
static List<String> |
WRITEFORMATS
The known extensions for writing. |
private boolean |
writers
If true, we filter for known image writers. |
private static List<String> |
WRITESUFFIX
The known extensions for writing. |
| Constructor Summary | |
|---|---|
ImageFilter()
Constructs a new image filter for reading |
|
ImageFilter(boolean iswrite)
Constructs a new image filter. |
|
| Method Summary | |
|---|---|
boolean |
accept(File f)
Accepts directories and images with extensions returned by the ImageIO.getWriterFormatNames(). |
String |
getDescription()
Description. |
static String |
getExtension(File f)
Helper method to determine the extension of a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final List<String> READFORMATS
public static final List<String> WRITEFORMATS
private static final List<String> READSUFFIX
private static final List<String> WRITESUFFIX
private boolean writers
| Constructor Detail |
|---|
public ImageFilter()
public ImageFilter(boolean iswrite)
| Method Detail |
|---|
public boolean accept(File f)
ImageIO.getWriterFormatNames().
accept in class FileFilterpublic String getDescription()
getDescription in class FileFilterpublic static String getExtension(File f)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||