public class FormatFileFilter extends FileFilter implements FileFilter, Comparable
Modifier and Type | Field and Description |
---|---|
private boolean |
allowOpen
Whether it is ok to open a file to determine its type.
|
private String |
desc
Description.
|
private IFormatReader |
reader
Associated file format reader.
|
Constructor and Description |
---|
FormatFileFilter(IFormatReader reader)
Constructs a new filter that accepts files of the given reader's type.
|
FormatFileFilter(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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File f)
Accepts files in accordance with the file format reader.
|
int |
compareTo(Object o)
Compares two FileFilter objects alphanumerically.
|
String |
getDescription()
Gets the filter's description.
|
IFormatReader |
getReader()
Returns the filter's reader.
|
String |
toString()
Gets a string representation of this file filter.
|
private IFormatReader reader
private boolean allowOpen
private String desc
public FormatFileFilter(IFormatReader reader)
public FormatFileFilter(IFormatReader reader, boolean allowOpen)
reader
- The reader to use for verifying a file's type.allowOpen
- Whether it is ok to open a file to determine its type.public boolean accept(File f)
accept
in interface FileFilter
accept
in class FileFilter
public IFormatReader getReader()
public String getDescription()
getDescription
in class FileFilter
public String toString()
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2017 Open Microscopy Environment