DODS 7.1 API

org.enhydra.dods.wizard
Class DirectoryNameFilter

java.lang.Object
  extended by org.enhydra.dods.wizard.DirectoryNameFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class DirectoryNameFilter
extends java.lang.Object
implements java.io.FilenameFilter

DirectoryNameFilter restricts file sets to only those files that are directories. Use this with JFileChooser to create a directory chooser.

Version:
1.0
Author:
Nenad Vico

Constructor Summary
DirectoryNameFilter()
          Create a DirectoryNameFilter for use with the FileChooser dialog.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          Check to see if the passed file is a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryNameFilter

public DirectoryNameFilter()
Create a DirectoryNameFilter for use with the FileChooser dialog.

Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Check to see if the passed file is a directory.

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - Parent folder.
name - File to check.
Returns:
True if the file is a directory.

DODS 7.1 API