public class DefaultFileFilter extends FileFilter
| Modifier and Type | Field and Description |
|---|---|
protected String |
description |
protected List<String> |
filters |
protected String |
fullDescription |
protected static String |
HIDDEN_FILE |
protected static String |
TYPE_UNKNOWN |
protected boolean |
useExtensionsInDescription |
| Constructor and Description |
|---|
DefaultFileFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File f) |
void |
addExtension(String extension)
Adds a filetype "dot" extension to filter against.
|
String |
getDescription()
Returns the human readable description of this filter.
|
String |
getExtension(File f)
Return the extension portion of the file's name .
|
boolean |
isExtensionListInDescription()
Returns whether the extension list (.jpg, .gif, etc) should
show up in the human readable description.
|
void |
setDescription(String description)
Sets the human readable description of this filter.
|
void |
setExtensionListInDescription(boolean b)
Determines whether the extension list (.jpg, .gif, etc) should
show up in the human readable description.
|
protected static final String TYPE_UNKNOWN
protected static final String HIDDEN_FILE
protected String description
protected String fullDescription
protected boolean useExtensionsInDescription
public boolean accept(File f)
accept in class FileFilterpublic void addExtension(String extension)
ExampleFileFilter filter = new ExampleFileFilter();
filter.addExtension("jpg");
filter.addExtension("tif");
Note that the "." before the extension is not needed and will be ignored.public String getDescription()
getDescription in class FileFiltersetDescription(java.lang.String),
setExtensionListInDescription(boolean),
isExtensionListInDescription()public void setDescription(String description)
public void setExtensionListInDescription(boolean b)
public boolean isExtensionListInDescription()