public class Product_File_Filter
extends javax.swing.filechooser.FileFilter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EDR_EXTENSION
The filename extension for EDR Products
|
static java.lang.String |
ID
Class Identifier
|
static java.lang.String |
RDR_EXTENSION
The filename extension for RDR Products
|
Constructor and Description |
---|
Product_File_Filter() |
Product_File_Filter(java.lang.String Product_Type)
Construct a new product file filter, specifying the type of product to be
filtered for.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File f) |
java.lang.String |
Get_Extension(java.io.File file)
Returns the file extension of a File.
|
java.lang.String |
getDescription() |
java.lang.String |
Set_Product_Type(java.lang.String New_Product_Type)
Sets the extension this filter should be looking for based on the product
type.
|
public static final java.lang.String ID
public static final java.lang.String EDR_EXTENSION
public static final java.lang.String RDR_EXTENSION
public Product_File_Filter()
public Product_File_Filter(java.lang.String Product_Type) throws java.lang.Exception
Product_Type
- - the type of product to be filtered for, EDR or RDR.java.lang.Exception
- - if the specified product type is not EDR or RDR.public boolean accept(java.io.File f)
accept
in class javax.swing.filechooser.FileFilter
public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
public java.lang.String Set_Product_Type(java.lang.String New_Product_Type) throws java.lang.Exception
New_Product_Type
- IOException
java.lang.Exception
public java.lang.String Get_Extension(java.io.File file)
file
- - The file to get the extension fromCopyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona