public class ExampleFileFilter extends FileFilter
Modifier and Type | Field and Description |
---|---|
private String |
description |
private Hashtable |
filters |
private String |
fullDescription |
private static String |
HIDDEN_FILE |
private static String |
TYPE_UNKNOWN |
private boolean |
useExtensionsInDescription |
Constructor and Description |
---|
ExampleFileFilter()
Creates a file filter.
|
ExampleFileFilter(String extension)
Creates a file filter that accepts files with the given extension.
|
ExampleFileFilter(String[] filters)
Creates a file filter from the given string array.
|
ExampleFileFilter(String[] filters,
String description)
Creates a file filter from the given string array and description.
|
ExampleFileFilter(String extension,
String description)
Creates a file filter that accepts the given file type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File f)
Return true if this file should be shown in the directory pane,
false if it shouldn't.
|
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.
|
private static String TYPE_UNKNOWN
private static String HIDDEN_FILE
private String description
private String fullDescription
private boolean useExtensionsInDescription
public ExampleFileFilter()
addExtension(java.lang.String)
public ExampleFileFilter(String extension)
addExtension(java.lang.String)
public ExampleFileFilter(String extension, String description)
addExtension(java.lang.String)
public ExampleFileFilter(String[] filters)
addExtension(java.lang.String)
public ExampleFileFilter(String[] filters, String description)
addExtension(java.lang.String)
public boolean accept(File f)
accept
in class FileFilter
getExtension(java.io.File)
,
FileFilter#accepts
public String getExtension(File f)
public void addExtension(String extension)
public String getDescription()
getDescription
in class FileFilter
setDescription
,
setExtensionListInDescription
,
isExtensionListInDescription
,
FileFilter.getDescription()
public void setDescription(String description)
setDescription
,
setExtensionListInDescription
,
isExtensionListInDescription
public void setExtensionListInDescription(boolean b)
getDescription
,
setDescription
,
isExtensionListInDescription
public boolean isExtensionListInDescription()
getDescription
,
setDescription
,
setExtensionListInDescription
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses