swpchat.client.gui
Class ImageFileFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--swpchat.client.gui.ImageFileFilter

public class ImageFileFilter
extends javax.swing.filechooser.FileFilter

Filter which only allows .jpg, .gif, .jpeg files.

Author:
msturm

Field Summary
private static java.lang.String description
           
private static java.lang.String gifSuffix
           
private static java.lang.String jpegSuffix
           
private static java.lang.String jpgSuffix
           
 
Constructor Summary
ImageFileFilter()
           
 
Method Summary
 boolean accept(java.io.File file)
          Returns true, if the filter accepts the file.
 java.lang.String getDescription()
          Returns the description string of the allowed files.
private  java.lang.String getFileSuffix(java.io.File file)
          Returns the file type suffix.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

jpgSuffix

private static final java.lang.String jpgSuffix

jpegSuffix

private static final java.lang.String jpegSuffix

gifSuffix

private static final java.lang.String gifSuffix

description

private static final java.lang.String description
Constructor Detail

ImageFileFilter

public ImageFileFilter()
Method Detail

accept

public boolean accept(java.io.File file)
Returns true, if the filter accepts the file.
Overrides:
accept in class javax.swing.filechooser.FileFilter

getDescription

public java.lang.String getDescription()
Returns the description string of the allowed files.
Overrides:
getDescription in class javax.swing.filechooser.FileFilter

getFileSuffix

private java.lang.String getFileSuffix(java.io.File file)
Returns the file type suffix.