bb.io.filefilter
Class VisibleFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by bb.io.filefilter.BaseFilter
          extended by bb.io.filefilter.VisibleFilter
All Implemented Interfaces:
FileFilter
Direct Known Subclasses:
VisibleOrRootFilter

public class VisibleFilter
extends BaseFilter

File filter that accepts all visible normal files and directories, and rejects all hidden ones as well as other file system elements.

This class is multithread safe: it is immutable. In particular, it has no listener (see the ancestor class javadocs for more discussion).

Author:
Brent Boyer

Nested Class Summary
 
Nested classes/interfaces inherited from class bb.io.filefilter.BaseFilter
BaseFilter.UnitTest
 
Constructor Summary
VisibleFilter()
          Constructs a new VisibleFilter instance.
 
Method Summary
 String getDescription()
          
protected  boolean passesTest(File file)
          Applies this filter's test to file.
 
Methods inherited from class bb.io.filefilter.BaseFilter
accept, acceptImpl, extractPart, getDirectoryMode, getFileMode, getListener, getOtherMode, getPartMode, passesTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VisibleFilter

public VisibleFilter()
Constructs a new VisibleFilter instance.

Method Detail

passesTest

protected boolean passesTest(File file)
Description copied from class: BaseFilter
Applies this filter's test to file.

Implementation here returns passesTest( extractPart(file) ).

Overrides:
passesTest in class BaseFilter

getDescription

public String getDescription()
Description copied from class: BaseFilter

Specified by:
getDescription in class BaseFilter