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
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 |
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
ImageFileFilter
public ImageFileFilter()
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.