Class FileFilterExtensions

java.lang.Object
javax.swing.filechooser.FileFilter
info.monitorenter.gui.chart.io.FileFilterExtensions
All Implemented Interfaces:
INameFilter

public final class FileFilterExtensions extends FileFilter implements INameFilter

Configureable implementation of FileFilter that filters files by their extension (e.g.: ".txt").

The extension Strings are provided to the constructor (no configuration of initialized instance provided yet) and have to be the sole extension without the dot.

This class is most often used to configure JFileChooser dialogs. Therefore it accepts all directories to allow browsing.

Example usage:

... JFileChooser fileChooser = new JFileChooser(); FileFilter soundFileFilter = new FileFilterExtensions(new String[]{"wav","mp3"}); fileChooser.setFileFilter(soundFileFilter); ...

Author:
<a href="mailto:Achim.Westermann@gmx.de>Achim Westermann