public class FormatFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter, java.lang.Comparable
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(java.io.File f)
Accepts files in accordance with the file format reader.
|
int |
compareTo(java.lang.Object o)
Compares two FileFilter objects alphanumerically.
|
java.lang.String |
getDescription()
Gets the filter's description.
|
IFormatReader |
getReader()
Returns the filter's reader.
|
java.lang.String |
toString()
Gets a string representation of this file filter.
|
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(java.io.File f)
accept
in interface java.io.FileFilter
accept
in class javax.swing.filechooser.FileFilter
public IFormatReader getReader()
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
Copyright © 2014 Open Microscopy Environment