public class ComboFileFilter
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 javax.swing.filechooser.FileFilter[] |
filts
List of filters to be combined.
|
Constructor and Description |
---|
ComboFileFilter(javax.swing.filechooser.FileFilter[] filters,
java.lang.String description)
Constructs a new filter from a list of other filters.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File f)
Accepts files with the proper filename prefix.
|
int |
compareTo(java.lang.Object o)
Compares two FileFilter objects alphanumerically.
|
java.lang.String |
getDescription()
Returns the filter's description.
|
javax.swing.filechooser.FileFilter[] |
getFilters()
Gets the list of file filters forming this filter combination.
|
static javax.swing.filechooser.FileFilter[] |
sortFilters(javax.swing.filechooser.FileFilter[] filters)
Sorts the given list of file filters, and combines filters with identical
descriptions into a combination filter that accepts anything any of its
constituant filters do.
|
static javax.swing.filechooser.FileFilter[] |
sortFilters(java.util.Vector filters)
Sorts the given list of file filters, and combines filters with identical
descriptions into a combination filter that accepts anything any of its
constituant filters do.
|
java.lang.String |
toString()
Gets a string representation of this file filter.
|
private javax.swing.filechooser.FileFilter[] filts
private java.lang.String desc
public ComboFileFilter(javax.swing.filechooser.FileFilter[] filters, java.lang.String description)
public javax.swing.filechooser.FileFilter[] getFilters()
public static javax.swing.filechooser.FileFilter[] sortFilters(javax.swing.filechooser.FileFilter[] filters)
public static javax.swing.filechooser.FileFilter[] sortFilters(java.util.Vector filters)
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