com.quadrique.jbuildingblocks.gui
Class FileChooserDirectoryFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.quadrique.jbuildingblocks.gui.FileChooserDirectoryFileFilter

public class FileChooserDirectoryFileFilter
extends FileFilter

This class is a directory file filter (i.e. only directories are displayed) for the JFileChooser

Author:
Hervé Rivere

Constructor Summary
FileChooserDirectoryFileFilter(String zDescription)
          Constructor
 
Method Summary
 boolean accept(File zFile)
           
 String getDescription()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileChooserDirectoryFileFilter

public FileChooserDirectoryFileFilter(String zDescription)
Constructor

Parameters:
zDescription - the description string to display in the "Files of type:" field of the JFileChooser. For instance, use "Text Files(*.txt)" if you specify a suffix of the form "txt"
Method Detail

accept

public boolean accept(File zFile)
Specified by:
accept in class FileFilter
Parameters:
zFile - the file
Returns:
true if the given file is valid

getDescription

public String getDescription()
Specified by:
getDescription in class FileFilter
Returns:
the description string to display in the "Files of type:" field of the JFileChooser.


Copyright © 2001-2009 Quadrique Corporation. All Rights Reserved.