Package loci.formats.gui
Class FormatFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
loci.formats.gui.FormatFileFilter
- All Implemented Interfaces:
FileFilter,Comparable
A file filter for a biological file format, for use with a JFileChooser.
-
Constructor Summary
ConstructorsConstructorDescriptionFormatFileFilter(loci.formats.IFormatReader reader) Constructs a new filter that accepts files of the given reader's type.FormatFileFilter(loci.formats.IFormatReader reader, boolean allowOpen) Constructs a new filter that accepts files of the given reader's type, allowing the reader to open files only if the allowOpen flag is set. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccepts files in accordance with the file format reader.intCompares two FileFilter objects alphanumerically.Gets the filter's description.loci.formats.IFormatReaderReturns the filter's reader.toString()Gets a string representation of this file filter.
-
Constructor Details
-
FormatFileFilter
public FormatFileFilter(loci.formats.IFormatReader reader) Constructs a new filter that accepts files of the given reader's type. -
FormatFileFilter
public FormatFileFilter(loci.formats.IFormatReader reader, boolean allowOpen) Constructs a new filter that accepts files of the given reader's type, allowing the reader to open files only if the allowOpen flag is set.- Parameters:
reader- The reader to use for verifying a file's type.allowOpen- Whether it is ok to open a file to determine its type.
-
-
Method Details
-
accept
Accepts files in accordance with the file format reader.- Specified by:
acceptin interfaceFileFilter- Specified by:
acceptin classFileFilter
-
getReader
public loci.formats.IFormatReader getReader()Returns the filter's reader. -
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
-