|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileFilter
de.dfg.oc.logfileanalyzer.gui.ChoosableFileFilter
public class ChoosableFileFilter
Provides a filter for the "Open file"-dialogue.
Field Summary | |
---|---|
private boolean |
acceptDirs
true to show folders in the dialog |
private String |
description
Textual description of the accepted file-type |
private String |
pattern
A String defining the accepted files (e.g. "*.log" accepts
all files having the extension "log") |
Constructor Summary | |
---|---|
ChoosableFileFilter(String description,
String pattern,
boolean acceptDirs)
Creates a new file filter. |
Method Summary | |
---|---|
boolean |
accept(File _file)
Checks if a given file fits in the defined pattern. |
String |
getDescription()
Returns a textual description of the accepted file-type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String pattern
String
defining the accepted files (e.g. "*.log" accepts
all files having the extension "log")
private String description
private boolean acceptDirs
true
to show folders in the dialog
Constructor Detail |
---|
public ChoosableFileFilter(String description, String pattern, boolean acceptDirs)
description
- a textual description of the accepted file-typepattern
- a String
defining the accepted files (e.g.
"*.log" accepts all files having the extension "log")acceptDirs
- true
to show folders in the dialogMethod Detail |
---|
public boolean accept(File _file)
accept
in interface FileFilter
accept
in class FileFilter
_file
- file to be checked
true
if the file matches the pattern (and will be
displayed)public String getDescription()
getDescription
in class FileFilter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |