comirva.io.filefilter
Class GraphicFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by comirva.io.filefilter.GraphicFileFilter
All Implemented Interfaces:
FileFilter

public class GraphicFileFilter
extends FileFilter
implements FileFilter

This class implements a FileFilter for *.png and *.jpg files which are graphic files and used to store the content of the visualization pane.


Constructor Summary
GraphicFileFilter()
           
 
Method Summary
 boolean accept(File f)
          Returns true if the File f should be shown in the directory pane, false if this is not the case.
 String getDescription()
          Returns the description of the filter.
 String getExtension(File f)
          Returns the extension of the file's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicFileFilter

public GraphicFileFilter()
Method Detail

accept

public boolean accept(File f)
Returns true if the File f should be shown in the directory pane, false if this is not the case.
Files that begin with "." are ignored.

Specified by:
accept in interface FileFilter
Specified by:
accept in class FileFilter
See Also:
FileFilter.accept(java.io.File)

getExtension

public String getExtension(File f)
Returns the extension of the file's name.

Parameters:
f - the File for which the extension should be returned
Returns:
a String containing the extension of the File f

getDescription

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

Specified by:
getDescription in class FileFilter
See Also:
FileFilter.getDescription()