JLogView_.utils
Class LGImageFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by JLogView_.utils.LGImageFilter

public class LGImageFilter
extends javax.swing.filechooser.FileFilter

LGImageFilter is a FileFilter extension, that filters files only according to a particular image format.


Constructor Summary
LGImageFilter(java.lang.String format)
          This is the constructor, given the format it will filters file according to it.
 
Method Summary
 boolean accept(java.io.File f)
          This methods overriden from FileFilter tells how to accept a file given the details of the file.
 java.lang.String getDescription()
          This method overriden from FileFilter return a String giving the description of what filtering is being done by this FileFilter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LGImageFilter

public LGImageFilter(java.lang.String format)
This is the constructor, given the format it will filters file according to it. N.B: currently JLogView_ only uses jpg, gif, png and bmp because they are natively implemented in java.

Parameters:
format - a String representing the image format.
See Also:
FileFilter
Method Detail

accept

public boolean accept(java.io.File f)
This methods overriden from FileFilter tells how to accept a file given the details of the file.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - the File object having all the file details.
See Also:
File

getDescription

public java.lang.String getDescription()
This method overriden from FileFilter return a String giving the description of what filtering is being done by this FileFilter.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
a String giving the filter description