Package hipp.com.wappedidpadpro2
Class ExtensionFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
hipp.com.wappedidpadpro2.ExtensionFileFilter
public class ExtensionFileFilter
extends javax.swing.filechooser.FileFilter
ExtensionFileFilter
hold the Extention Filter for javax.swing.JFileChooser
hold the Extention Filter for javax.swing.JFileChooser
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
desc
private java.lang.String[]
extensions
-
Constructor Summary
Constructors Constructor Description ExtensionFileFilter(java.lang.String[] ext, java.lang.String description)
Constructor. -
Method Summary
Modifier and Type Method Description boolean
accept(java.io.File pathname)
java.lang.String
getDescription()
-
Field Details
-
extensions
private java.lang.String[] extensions -
desc
private final java.lang.String desc
-
-
Constructor Details
-
ExtensionFileFilter
public ExtensionFileFilter(java.lang.String[] ext, java.lang.String description)Constructor.- Parameters:
ext
- A list of filename extensions, ie new String[] { "TXT"}.description
- A description of the files.
-
-
Method Details
-
accept
public boolean accept(java.io.File pathname)- Specified by:
accept
in classjavax.swing.filechooser.FileFilter
-
getDescription
public java.lang.String getDescription()- Specified by:
getDescription
in classjavax.swing.filechooser.FileFilter
-