Package wprover
Class JFileFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- wprover.JFileFilter
-
public class JFileFilter extends javax.swing.filechooser.FileFilterA file filter for use with JFileChooser that filters files based on a specified suffix.
-
-
Constructor Summary
Constructors Constructor Description JFileFilter(java.lang.String s)Constructs a new JFileFilter with the specified suffix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File f)Determines whether the specified file should be accepted by this filter.java.lang.StringgetDescription()Returns the description of this filter.
-
-
-
Method Detail
-
accept
public boolean accept(java.io.File f)
Determines whether the specified file should be accepted by this filter.- Specified by:
acceptin classjavax.swing.filechooser.FileFilter- Parameters:
f- the file to test- Returns:
- true if the file is a directory or ends with the specified suffix, false otherwise
-
getDescription
public java.lang.String getDescription()
Returns the description of this filter.- Specified by:
getDescriptionin classjavax.swing.filechooser.FileFilter- Returns:
- the suffix used by this filter
-
-