Package wprover

Class JFileFilter


  • public class JFileFilter
    extends javax.swing.filechooser.FileFilter
    A file filter for use with JFileChooser that filters files based on a specified suffix.
    • Constructor Summary

      Constructors 
      Constructor Description
      JFileFilter​(java.lang.String s)
      Constructs a new JFileFilter with the specified suffix.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.io.File f)
      Determines whether the specified file should be accepted by this filter.
      java.lang.String getDescription()
      Returns the description of this filter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JFileFilter

        public JFileFilter​(java.lang.String s)
        Constructs a new JFileFilter with the specified suffix.
        Parameters:
        s - the suffix to filter files by
    • Method Detail

      • accept

        public boolean accept​(java.io.File f)
        Determines whether the specified file should be accepted by this filter.
        Specified by:
        accept in class javax.swing.filechooser.FileFilter
        Parameters:
        f - the file to test
        Returns:
        true if the file is a directory or ends with the specified suffix, false otherwise
      • getDescription

        public java.lang.String getDescription()
        Returns the description of this filter.
        Specified by:
        getDescription in class javax.swing.filechooser.FileFilter
        Returns:
        the suffix used by this filter