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
  • 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()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 class javax.swing.filechooser.FileFilter
    • getDescription

      public java.lang.String getDescription()
      Specified by:
      getDescription in class javax.swing.filechooser.FileFilter