Return true if the given file is accepted by this filter.
// Little trick: if you don't do this, only directory names
// ending in one of the extentions appear in the window.
if (f.isDirectory()) {
return true;
} else if (f.isFile()) {
Iterator it = exts.iterator();
while (it.hasNext()) {
if (f.getName().endsWith((String)it.next()))
return true;
}
}
// A file that didn't match, or a weirdo (e.g. UNIX device file?).
return false;