Package ca.cgjennings.io
Class FileFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- ca.cgjennings.io.FileFilter
-
- All Implemented Interfaces:
java.io.FileFilter
public abstract class FileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter
An abstract file filter that can be used with both file chooser APIs andFile.listFiles
.- Since:
- 3.0
- Author:
- Chris Jennings
-
-
Constructor Summary
Constructors Constructor Description FileFilter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileFilter
adapt(java.io.FileFilter ioFilter, java.lang.String description)
Converts an I/O file filter into a dual filter that can be used for I/O or for file choosers.static FileFilter
adapt(javax.swing.filechooser.FileFilter chooserFilter)
Converts an file chooser filter into a dual filter that can be used for I/O or for file choosers.
-
-
-
Method Detail
-
adapt
public static FileFilter adapt(java.io.FileFilter ioFilter, java.lang.String description)
Converts an I/O file filter into a dual filter that can be used for I/O or for file choosers.- Parameters:
ioFilter
- the I/O filterdescription
- a description used when the filter is used in a file chooser- Returns:
- a dual filter
-
adapt
public static FileFilter adapt(javax.swing.filechooser.FileFilter chooserFilter)
Converts an file chooser filter into a dual filter that can be used for I/O or for file choosers.- Parameters:
chooserFilter
- a file chooser filter- Returns:
- a dual filter
-
-