csheets.ui
Class FileChooser.Filter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by csheets.ui.FileChooser.Filter
Enclosing class:
FileChooser

public static class FileChooser.Filter
extends FileFilter

A file filter for use in file choosers.

Author:
Einar Pehrson

Constructor Summary
FileChooser.Filter(FilenameFilter filter, String description)
          Creates a new filter, using the given filename filter to determine which files to accept.
 
Method Summary
 boolean accept(File f)
           
 String getDescription()
          Returns the description of the filter
 FilenameFilter getFilter()
          Returns the filename filter used to determine which files to accept.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChooser.Filter

public FileChooser.Filter(FilenameFilter filter,
                          String description)
Creates a new filter, using the given filename filter to determine which files to accept.

Parameters:
filter - the filename filter used to determine which files to accept
description - the description of the filter
Method Detail

accept

public boolean accept(File f)
Specified by:
accept in class FileFilter

getFilter

public FilenameFilter getFilter()
Returns the filename filter used to determine which files to accept.

Returns:
the filename filter

getDescription

public String getDescription()
Returns the description of the filter

Specified by:
getDescription in class FileFilter
Returns:
the description of the filter