|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.filechooser.FileFilter visad.util.ExtensionFileFilter
public class ExtensionFileFilter
A file filter based on file extensions, for use with a JFileChooser.
Constructor Summary | |
---|---|
ExtensionFileFilter(String[] extensions,
String description)
Constructs a new filter that accepts the given extensions. |
|
ExtensionFileFilter(String extension,
String description)
Constructs a new filter that accepts the given extension. |
Method Summary | |
---|---|
boolean |
accept(File f)
Accepts files with the proper extensions. |
int |
compareTo(Object o)
Compares two FileFilter objects alphanumerically. |
String |
getDescription()
Gets the filter's description. |
String |
getExtension()
Gets the filter's first valid extension. |
String[] |
getExtensions()
Gets the filter's valid extensions. |
String |
toString()
Gets a string representation of this file filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExtensionFileFilter(String extension, String description)
public ExtensionFileFilter(String[] extensions, String description)
Method Detail |
---|
public String getExtension()
public String[] getExtensions()
public boolean accept(File f)
accept
in interface FileFilter
accept
in class FileFilter
public String getDescription()
getDescription
in class FileFilter
public String toString()
toString
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |