public class ExampleFileFilter extends FileFilter
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.
|
public ExampleFileFilter()
public ExampleFileFilter(String extension)
public ExampleFileFilter(String extension, String description)
public ExampleFileFilter(String[] filters)
public boolean accept(File f)
accept
in class FileFilter
public void addExtension(String extension)
public String getDescription()
getDescription
in class FileFilter
public void setDescription(String description)
public void setExtensionListInDescription(boolean b)
public boolean isExtensionListInDescription()
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.