Class FilenameMaskFilter

  • All Implemented Interfaces:
    java.io.FilenameFilter

    @Deprecated
    public class FilenameMaskFilter
    extends java.lang.Object
    implements java.io.FilenameFilter
    Deprecated.
    A Java Bean used for approving file names which are to be included in a java.io.File listing. The mask is given as a well-known DOS filename format, with '*' and '?' as wildcards. All other characters counts as ordinary characters.

    The file name masks are used as a filter input and is given to the class via the string array property:

    filenameMasksForInclusion
    Filename mask for exclusion of files (default if both properties are defined).
    filenameMasksForExclusion
    Filename mask for exclusion of files.

    A recommended way of doing this is by referencing to the component which uses this class for file listing. In this way all properties are set in the same component and this utility component is kept in the background with only initial configuration necessary.

    See Also:
    java.io.File.list, java.io.FilenameFilter, WildcardStringParser
    • Field Detail

      • filenameMasksForInclusion

        private java.lang.String[] filenameMasksForInclusion
        Deprecated.
      • filenameMasksForExclusion

        private java.lang.String[] filenameMasksForExclusion
        Deprecated.
      • inclusion

        private boolean inclusion
        Deprecated.
    • Constructor Detail

      • FilenameMaskFilter

        public FilenameMaskFilter()
        Deprecated.
        Creates a FilenameMaskFilter
      • FilenameMaskFilter

        public FilenameMaskFilter​(java.lang.String pFilenameMask)
        Deprecated.
        Creates a FilenameMaskFilter
        Parameters:
        pFilenameMask - the filename mask
      • FilenameMaskFilter

        public FilenameMaskFilter​(java.lang.String[] pFilenameMasks)
        Deprecated.
        Creates a FilenameMaskFilter
        Parameters:
        pFilenameMasks - the filename masks
      • FilenameMaskFilter

        public FilenameMaskFilter​(java.lang.String pFilenameMask,
                                  boolean pExclusion)
        Deprecated.
        Creates a FilenameMaskFilter
        Parameters:
        pFilenameMask - the filename masks
        pExclusion - if true, the masks will be excluded
      • FilenameMaskFilter

        public FilenameMaskFilter​(java.lang.String[] pFilenameMasks,
                                  boolean pExclusion)
        Deprecated.
        Creates a FilenameMaskFilter
        Parameters:
        pFilenameMasks - the filename masks
        pExclusion - if true, the masks will be excluded
    • Method Detail

      • setFilenameMasksForInclusion

        public void setFilenameMasksForInclusion​(java.lang.String[] pFilenameMasksForInclusion)
        Deprecated.
        Parameters:
        pFilenameMasksForInclusion - the filename masks to include
      • getFilenameMasksForInclusion

        public java.lang.String[] getFilenameMasksForInclusion()
        Deprecated.
        Returns:
        the current inclusion masks
      • setFilenameMasksForExclusion

        public void setFilenameMasksForExclusion​(java.lang.String[] pFilenameMasksForExclusion)
        Deprecated.
        Parameters:
        pFilenameMasksForExclusion - the filename masks to exclude
      • getFilenameMasksForExclusion

        public java.lang.String[] getFilenameMasksForExclusion()
        Deprecated.
        Returns:
        the current exclusion masks
      • accept

        public boolean accept​(java.io.File pDir,
                              java.lang.String pName)
        Deprecated.
        This method implements the java.io.FilenameFilter interface.
        Specified by:
        accept in interface java.io.FilenameFilter
        Parameters:
        pDir - the directory in which the file was found.
        pName - the name of the file.
        Returns:
        true if the file pName should be included in the file list; false otherwise.
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation for debug purposes