Class DefaultFileFilter.EditorFileFilter

  • Enclosing class:
    DefaultFileFilter

    public static class DefaultFileFilter.EditorFileFilter
    extends javax.swing.filechooser.FileFilter
    Utility file filter to accept editor files, namely .xml and .xml.gz extensions.
    See Also:
    ImageIO.getReaderFormatNames()
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String desc
      Description of the File format
    • Constructor Summary

      Constructors 
      Constructor Description
      EditorFileFilter​(java.lang.String description)
      Constructs a new editor file filter using the specified description.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.io.File file)
      Returns true if the file is a directory or has a .xml or .xml.gz extension.
      java.lang.String getDescription()
      Returns the description.
      • Methods inherited from class java.lang.Object

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

      • desc

        protected java.lang.String desc
        Description of the File format
    • Constructor Detail

      • EditorFileFilter

        public EditorFileFilter​(java.lang.String description)
        Constructs a new editor file filter using the specified description.
        Parameters:
        description - The description to use for the filter.
    • Method Detail

      • accept

        public boolean accept​(java.io.File file)
        Returns true if the file is a directory or has a .xml or .xml.gz extension.
        Specified by:
        accept in class javax.swing.filechooser.FileFilter
        Returns:
        Returns true if the file is accepted.
      • getDescription

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