public class JSVFileFilter
extends javax.swing.filechooser.FileFilter
FileFilter
that filters out all files
except those with extensions that are added.addExtension(java.lang.String)
Constructor and Description |
---|
JSVFileFilter()
Intialises a
JSpecViewFileFilter |
JSVFileFilter(java.lang.String[] filters)
Initialises the
JSpecViewFileFilter with an list of extensions
to filter |
JSVFileFilter(java.lang.String[] filters,
java.lang.String description)
Initialises the
JSpecViewFileFilter with an list of extensions
to filter and a description of the filter |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File f)
Implementation of method from interface
FileFilter . |
void |
addExtension(java.lang.String extension)
Adds an extension to the JSpecViewFileFilter
|
java.lang.String |
getDescription()
Returns the JSpecViewFileFilter description
|
java.lang.String |
getExtension(java.io.File f)
Returns the extension of a file
|
void |
setDescription(java.lang.String description)
Sets the description for the JSpecViewFileFilter
|
public JSVFileFilter()
JSpecViewFileFilter
public JSVFileFilter(java.lang.String[] filters)
JSpecViewFileFilter
with an list of extensions
to filterfilters
- a String
of filterspublic JSVFileFilter(java.lang.String[] filters, java.lang.String description)
JSpecViewFileFilter
with an list of extensions
to filter and a description of the filterfilters
- the array of file extensionsdescription
- the descriptionpublic boolean accept(java.io.File f)
FileFilter
.accept
in class javax.swing.filechooser.FileFilter
f
- the the file to be filteredpublic java.lang.String getExtension(java.io.File f)
f
- the filepublic void addExtension(java.lang.String extension)
extension
- the extensionpublic java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
public void setDescription(java.lang.String description)
description
- the description