com.huguesjohnson.fileFilter
Class SessionFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.huguesjohnson.fileFilter.SessionFileFilter

public class SessionFileFilter
extends javax.swing.filechooser.FileFilter

SessionFileFilter Filter to only accept session files in a JFileChooser

Author:
Hugues Johnson

Field Summary
static java.lang.String EXTENSION
           
 
Constructor Summary
SessionFileFilter()
          Creates a new instance of SessionFileFilter
 
Method Summary
 boolean accept(java.io.File file)
          accept tests if a file fits the filter defined in the constructor.
 java.lang.String getDescription()
          getDescription returns the description of file accepted by the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
See Also:
Constant Field Values
Constructor Detail

SessionFileFilter

public SessionFileFilter()
Creates a new instance of SessionFileFilter

Method Detail

accept

public boolean accept(java.io.File file)
accept tests if a file fits the filter defined in the constructor.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - file to check
Returns:
true if the file is a session, false if it is not

getDescription

public java.lang.String getDescription()
getDescription returns the description of file accepted by the filter.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
description of files accepted by the current filter


Copyright © 2000-2007 Hugues Johnson