Package com.mucommander.commons.file.filter

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


     */
    @Override
    public void performAction() {
        FileTable      fileTable;
        FileTableModel tableModel;
        FilenameFilter filter;
        int            rowCount;
        boolean        mark;

        // Initialization. Aborts if there is no selected file.
        fileTable  = mainFrame.getActiveTable();
        if((filter = getFilter(fileTable.getSelectedFile(false, true))) == null)
            return;
        tableModel = fileTable.getFileTableModel();
        rowCount   = tableModel.getRowCount();
        mark       = !tableModel.isRowMarked(fileTable.getSelectedRow());

        // Goes through all files in the active table, marking all that match 'filter'.
        for(int i = tableModel.getFirstMarkableRow(); i < rowCount; i++)
            if(filter.accept(tableModel.getCachedFileAtRow(i)))
                tableModel.setRowMarked(i, mark);
        fileTable.repaint();

        // Notify registered listeners that currently marked files have changed on the FileTable
        fileTable.fireMarkedFilesChangedEvent();
View Full Code Here

TOP

Related Classes of com.mucommander.commons.file.filter.FilenameFilter

Copyright © 2018 www.massapicom. 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.