public class DefaultFileFilter extends FileFilter
| Constructor and Description |
|---|
DefaultFileFilter(String extensions,
String description)
Creates a file filter that accepts the given file types.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File file) |
void |
addExtension(String extension)
Add an extension to the list of extensions.
|
String |
getDescription() |
void |
setExtensions(String extensions)
Sets all possible extensions for this filter,
divided by any of the following tokens " \t\n\r\f;,.:".
|
public DefaultFileFilter(String extensions, String description)
extensions - the extensions for the file-type.description - the description of the file-type.public void addExtension(String extension)
extension - the extension for the file-type without the '.'.public void setExtensions(String extensions)
extensions - the extensions for the file-type.public boolean accept(File file)
accept in class FileFilterpublic String getDescription()
getDescription in class FileFilterCopyright © 2002-2013 Edwin Dankert. All Rights Reserved.