public class ExtFileFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ID
CVS ID
|
static javax.swing.filechooser.FileFilter |
imgFilter
Filter to accept image files based on extension
|
static javax.swing.filechooser.FileFilter |
pngFilter
Filter to accept PNG files based on extension
|
static javax.swing.filechooser.FileFilter |
txtFilter
Filter to accept text files based on extension
|
static javax.swing.filechooser.FileFilter |
xlsFilter
Filter to accept Excel files based on extension
|
Constructor and Description |
---|
ExtFileFilter(java.lang.String... exts)
Create a filter for one or more extensions
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File f)
Decide whether or not to accept a file
|
java.lang.String |
getDescription()
Get a description of what this filter accepts
|
public static final java.lang.String ID
public static final javax.swing.filechooser.FileFilter pngFilter
public static final javax.swing.filechooser.FileFilter xlsFilter
public static final javax.swing.filechooser.FileFilter imgFilter
public static final javax.swing.filechooser.FileFilter txtFilter
public ExtFileFilter(java.lang.String... exts)
exts
- The extensionspublic boolean accept(java.io.File f)
accept
in interface java.io.FileFilter
accept
in class javax.swing.filechooser.FileFilter
f
- The filepublic java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona