public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter, java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
desc
Description.
|
private java.lang.String[] |
exts
List of valid extensions.
|
Constructor and Description |
---|
ExtensionFileFilter(java.lang.String[] extensions,
java.lang.String description)
Constructs a new filter that accepts the given extensions.
|
ExtensionFileFilter(java.lang.String extension,
java.lang.String description)
Constructs a new filter that accepts the given extension.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File f)
Accepts files with the proper extensions.
|
int |
compareTo(java.lang.Object o)
Compares two FileFilter objects alphanumerically.
|
java.lang.String |
getDescription()
Gets the filter's description.
|
java.lang.String |
getExtension()
Gets the filter's first valid extension.
|
java.lang.String[] |
getExtensions()
Gets the filter's valid extensions.
|
java.lang.String |
toString()
Gets a string representation of this file filter.
|
private java.lang.String[] exts
private java.lang.String desc
public ExtensionFileFilter(java.lang.String extension, java.lang.String description)
public ExtensionFileFilter(java.lang.String[] extensions, java.lang.String description)
public java.lang.String getExtension()
public java.lang.String[] getExtensions()
public boolean accept(java.io.File f)
accept
in interface java.io.FileFilter
accept
in class javax.swing.filechooser.FileFilter
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 © 2019 Open Microscopy Environment