Class CLIPImageFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by CLIPImageFilter

public class CLIPImageFilter
extends javax.swing.filechooser.FileFilter

This is an image filter that supports gif, jpg, jpeg, and png images.


Field Summary
static java.lang.String gif
          gif image extension
static java.lang.String jpeg
          jpeg image extension
static java.lang.String jpg
          jpg image extension
static java.lang.String png
          png image extension
 
Constructor Summary
CLIPImageFilter()
           
 
Method Summary
 boolean accept(java.io.File f)
          Accepts directories, jpg, jpeg, gif, and png files.
 java.lang.String getDescription()
          Returns the description of the filter.
static java.lang.String getExtension(java.io.File f)
          Deterimines the file extension of the passed in file, then returns it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gif

public static final java.lang.String gif
gif image extension

See Also:
Constant Field Values

jpg

public static final java.lang.String jpg
jpg image extension

See Also:
Constant Field Values

jpeg

public static final java.lang.String jpeg
jpeg image extension

See Also:
Constant Field Values

png

public static final java.lang.String png
png image extension

See Also:
Constant Field Values
Constructor Detail

CLIPImageFilter

public CLIPImageFilter()
Method Detail

accept

public boolean accept(java.io.File f)
Accepts directories, jpg, jpeg, gif, and png files.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - File to test for acceptance
Returns:
true on accepted; false otherwise.

getDescription

public java.lang.String getDescription()
Returns the description of the filter.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
The description of the filter.

getExtension

public static java.lang.String getExtension(java.io.File f)
Deterimines the file extension of the passed in file, then returns it.

Parameters:
f - The file to determine the extension of
Returns:
The file extension