trex.GUI.ImageChooser
Class ImageFilter
java.lang.Object
|
+--javax.swing.filechooser.FileFilter
|
+--trex.GUI.ImageChooser.ImageFilter
- public class ImageFilter
- extends FileFilter
The ImageFilter checks whether a file is to be displayed in the file
chooser. This info is derived from file's extension.
This class was mostly stolen from Sun's documentation:
FileChooser
Demo (whoops... does this hurt GPL?!)
- Version:
- $Revision: 1.7 $
- Author:
- Bastian Friedrich <bastian@bastian-friedrich.de>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageFilter
public ImageFilter()
accept
public boolean accept(File f)
- Accept all directories and all gif, jpg, or png files.
- Specified by:
accept
in class FileFilter
- Returns:
- File's acceptance.
getDescription
public String getDescription()
- The description of this filter
- Specified by:
getDescription
in class FileFilter
- Returns:
- The literal string "Images (png, gif, jpg)".