public class IOPFileFilter
extends javax.swing.filechooser.FileFilter
FileFilter
,
JFileChooser
Constructor and Description |
---|
IOPFileFilter() |
IOPFileFilter(java.lang.String description) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File f)
methods of abstract super class
|
void |
addExtension(java.lang.String extension)
Adds given extension to list of accepted extensions.
|
java.lang.String |
getDescription() |
static java.lang.String |
getExtension(java.io.File f) |
void |
removeExtension(java.lang.String extension)
Removes given extenstion (in lower case) from list of
accepted extensions.
|
void |
setDescription(java.lang.String description)
Sets new description for this file filter.
|
void |
setFilesOnly(boolean flag)
If true, the filter only allows files, not directories.
|
public IOPFileFilter()
public IOPFileFilter(java.lang.String description)
public void setDescription(java.lang.String description)
null
is given, description will be empty string.description
- String used as description for this filterpublic void addExtension(java.lang.String extension)
null
. Extension will be
saved in lower case.extension
- String to denote extension of files accepted
by this filterpublic void removeExtension(java.lang.String extension)
extension
- String to denotes extension of files
no longer accepted by this filterpublic static java.lang.String getExtension(java.io.File f)
public void setFilesOnly(boolean flag)
flag
- the boolean indicating the users desirepublic boolean accept(java.io.File f)
accept
in class javax.swing.filechooser.FileFilter
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter