GridView
Class ImageFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by GridView.ImageFilter

 class ImageFilter
extends javax.swing.filechooser.FileFilter

Filter class for image files (for screenshots). Currently accepts JPG, PNG, GIF and BMP file extensions.

Since:
1.0

Constructor Summary
ImageFilter()
          Class constructor.
 
Method Summary
 boolean accept(java.io.File f)
          Accept JPG, PNG, GIF and BMP file types.
 java.lang.String getDescription()
          Get a description of this filter (shows in File Type box).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageFilter

public ImageFilter()
Class constructor.

Method Detail

accept

public boolean accept(java.io.File f)
Accept JPG, PNG, GIF and BMP file types.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - Selected file.
Returns:
true if selection is according to the filter requirements, false otherwise.

getDescription

public java.lang.String getDescription()
Get a description of this filter (shows in File Type box).

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
Description string.