Examples of AttributeFileFilter


Examples of com.mucommander.commons.file.filter.AttributeFileFilter

        this.destJar = destJar;
        this.tempDestJar = tempDestJar;
        this.classLoader = getClass().getClassLoader();

        directoryOrClassFileFilter = new OrFileFilter(
            new AttributeFileFilter(FileAttribute.DIRECTORY),
            new ExtensionFilenameFilter(".class")
        );
    }
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

  public static CompletionService getAllFilesService() {
    return new AllFilesService();
  }
 
  public static CompletionService getBrowsableFilesService() {
    return new FilteredFilesService(new AttributeFileFilter(FileAttribute.BROWSABLE));
  }
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

    public UnpackAction(MainFrame mainFrame, Map<String,Object> properties) {
        super(mainFrame, properties);

        // Unpack job operates on archives and directories
        setSelectedFileFilter(new OrFileFilter(
            new AttributeFileFilter(FileAttribute.ARCHIVE),
            new AttributeFileFilter(FileAttribute.DIRECTORY)
        ));
    }
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

        super(mainFrame, properties);

        // Enable this action only if the currently selected file is not a directory and can be read.
        setSelectedFileFilter(new AndFileFilter(
            new FileOperationFilter(FileOperation.READ_FILE),
            new AttributeFileFilter(FileAttribute.DIRECTORY, true)
        ));
    }
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

     * Creates a new instance of <code>ClassFinder</code>.
     */
    public ClassFinder() {
        filter = new OrFileFilter(
            new ExtensionFilenameFilter(".class"),
            new AttributeFileFilter(FileAttribute.DIRECTORY)
        );
    }
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

            }

            // If folders are excluded, add a regular file filter and chain it with an AndFileFilter
            if(!includeFolders) {
                filter = new AndFileFilter(
                    new AttributeFileFilter(FileAttribute.FILE),
                    filter
                );
            }

            // Mark/unmark the files using the filter
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

       
        setLayout(new BorderLayout());

        // Filters out the files that should not be displayed in the tree view
        AndFileFilter treeFileFilter = new AndFileFilter(
            new AttributeFileFilter(FileAttribute.DIRECTORY),
            new ConfigurableFolderFilter()
        );

        FileComparator sort = new FileComparator(FileComparator.NAME_CRITERION, true, true);
        model = new FilesTreeModel(treeFileFilter, sort);
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

      return;
    }

    AndFileFilter filter = new AndFileFilter(
            new StartsWithFilenameFilter(part1.getNameWithoutExtension(), false),
            new AttributeFileFilter(FileAttribute.FILE),
            new EqualsFilenameFilter(part1.getName(), false, true)
        );

    try {
      AbstractFile[] otherParts = parent.ls(filter);
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

    // - Associations building -------------------------------------------------
    // -------------------------------------------------------------------------
    private static void buildFilter(FileFilter filter, AssociationBuilder builder) throws CommandException {
        // Filter on the file type.
        if(filter instanceof AttributeFileFilter) {
            AttributeFileFilter attributeFilter;

            attributeFilter = (AttributeFileFilter)filter;
            switch(attributeFilter.getAttribute()) {
            case HIDDEN:
                builder.setIsHidden(!attributeFilter.isInverted());
                break;

            case SYMLINK:
                builder.setIsSymlink(!attributeFilter.isInverted());
                break;
            }
        }
        else if(filter instanceof PermissionsFileFilter) {
            PermissionsFileFilter permissionFilter;
View Full Code Here

Examples of com.mucommander.commons.file.filter.AttributeFileFilter

        if(!filter.isEmpty())
            CommandManager.registerAssociation(command, filter);
    }

    public void setMask(String mask, boolean isCaseSensitive) {filter.addFileFilter(new RegexpFilenameFilter(mask, isCaseSensitive));}
    public void setIsDir(boolean isDir) {filter.addFileFilter(new AttributeFileFilter(FileAttribute.DIRECTORY, isDir));}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.