Package loci.formats.gui
Class ExtensionFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
loci.formats.gui.ExtensionFileFilter
- All Implemented Interfaces:
FileFilter,Comparable
A file filter based on file extensions, for use with a JFileChooser.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExtensionFileFilter(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
Modifier and TypeMethodDescriptionbooleanAccepts files with the proper extensions.intCompares two FileFilter objects alphanumerically.Gets the filter's description.Gets the filter's first valid extension.String[]Gets the filter's valid extensions.toString()Gets a string representation of this file filter.
-
Field Details
-
exts
List of valid extensions. -
desc
Description.
-
-
Constructor Details
-
ExtensionFileFilter
Constructs a new filter that accepts the given extension. -
ExtensionFileFilter
Constructs a new filter that accepts the given extensions.
-
-
Method Details
-
getExtension
Gets the filter's first valid extension. -
getExtensions
Gets the filter's valid extensions. -
accept
Accepts files with the proper extensions.- Specified by:
acceptin interfaceFileFilter- Specified by:
acceptin classFileFilter
-
getDescription
Gets the filter's description.- Specified by:
getDescriptionin classFileFilter
-
toString
Gets a string representation of this file filter. -
compareTo
Compares two FileFilter objects alphanumerically.- Specified by:
compareToin interfaceComparable
-