comirva.io.filefilter
Class SOMFileFilter

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

public class SOMFileFilter
extends FileFilter
implements FileFilter

This class implements a FileFilter for *.som files which are Object-Files for SOM-instances and used to load and store SOM-objects.


Constructor Summary
SOMFileFilter()
           
 
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

SOMFileFilter

public SOMFileFilter()
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()