visad.util
Class ComboFileFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- visad.util.ComboFileFilter
-
- All Implemented Interfaces:
- java.io.FileFilter, java.lang.Comparable
public class ComboFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter, java.lang.ComparableA file filter that recognizes files from a union of other filters.
-
-
Constructor Summary
Constructors Constructor and Description ComboFileFilter(javax.swing.filechooser.FileFilter[] filters, java.lang.String description)Constructs a new filter from a list of other filters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanaccept(java.io.File f)Accepts files with the proper filename prefix.intcompareTo(java.lang.Object o)Compares two FileFilter objects alphanumerically.java.lang.StringgetDescription()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.StringtoString()Gets a string representation of this file filter.
-
-
-
Constructor Detail
-
ComboFileFilter
public ComboFileFilter(javax.swing.filechooser.FileFilter[] filters, java.lang.String description)Constructs a new filter from a list of other filters.
-
-
Method Detail
-
getFilters
public javax.swing.filechooser.FileFilter[] getFilters()
Gets the list of file filters forming this filter combination.
-
sortFilters
public 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.
-
sortFilters
public 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.
-
accept
public boolean accept(java.io.File f)
Accepts files with the proper filename prefix.- Specified by:
acceptin interfacejava.io.FileFilter- Specified by:
acceptin classjavax.swing.filechooser.FileFilter
-
getDescription
public java.lang.String getDescription()
Returns the filter's description.- Specified by:
getDescriptionin classjavax.swing.filechooser.FileFilter
-
toString
public java.lang.String toString()
Gets a string representation of this file filter.- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(java.lang.Object o)
Compares two FileFilter objects alphanumerically.- Specified by:
compareToin interfacejava.lang.Comparable
-
-
DMelt 3.0 © DataMelt by jWork.ORG