be.ugent.caagt.swirl.actions
Class ExtensionFileFilter
FileFilter
be.ugent.caagt.swirl.actions.ExtensionFileFilter
public class ExtensionFileFilter
extends FileFilter
Implements a Swing file filter that filters files on extensions.
ExtensionFileFilter(String extension, String description) - Creates a file filter which only allows files with the given extension.
|
boolean | accept(File file)
|
File | ensureExtension(File original) - Returns the given file with the extension of this filter added,
if the file has no extension.
|
String | getDescription()
|
ExtensionFileFilter
public ExtensionFileFilter(String extension,
String description)
Creates a file filter which only allows files with the given extension.
(Case is ignored when doing the comparison.)
extension
- Extension which is to be alloweddescription
- Description for this filter
accept
public boolean accept(File file)
ensureExtension
public File ensureExtension(File original)
Returns the given file with the extension of this filter added,
if the file has no extension.
getDescription
public String getDescription()