public class FileFilterSuffix extends FileFilter
FileFilter
that works with suffixes.
It is easily created with a description and comma-separated list of
extensions. The description shown in the dialog then shows the
original description with a list of extensions appended. E.g:
new FileFilterSuffix("Foo File", ".foo,.bar");
Yields "Foo File (*.foo, *.bar)" as the description in the
JFileChooser.
Constructor | Description |
---|---|
FileFilterSuffix(String desc,
String ext) |
Create new FileFilterSuffix
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
accept(File f) |
|
String |
getDescription() |
|
String[] |
getExtensions() |
public FileFilterSuffix(String desc, String ext)
desc
- Descriptionext
- Comma-separated list of extensionspublic boolean accept(File f)
accept
in class FileFilter
public String getDescription()
getDescription
in class FileFilter
public String[] getExtensions()
Copyright © 2010-2018 Nikhef / Stichting FOM. All Rights Reserved.