Java JFileChooser Filter getFileFilter()

Here you can find the source of getFileFilter()

Description

Returns the file filter for this class loader.

License

Open Source License

Return

File filter (*.class, *.jar)

Declaration

public static FileFilter getFileFilter() 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2016 Pablo Pavon-Marino.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/lgpl.html
 *
 * Contributors://ww w .ja v a 2  s .c  o m
 *     Pablo Pavon-Marino - Jose-Luis Izquierdo-Zaragoza, up to version 0.3.1
 *     Pablo Pavon-Marino - from version 0.4.0 onwards
 ******************************************************************************/

import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileNameExtensionFilter;

public class Main {
    private final static FileFilter fileFilter = new FileNameExtensionFilter("Java files (*.class, *.jar)", "class",
            "jar");

    /**
     * Returns the file filter for this class loader.
     * 
     * @return File filter (*.class, *.jar)
     */
    public static FileFilter getFileFilter() {
        return fileFilter;
    }
}

Related

  1. fileNameAutoExtend(FileFilter filter, File file)
  2. getBinaryFileFilter()
  3. getCustomFileFilter(String desc, String[] validExtensions)
  4. getFileChooserFilter(java.util.List allowedExtensions)
  5. getFileFilter( String text, String... formats)
  6. getFileFilterForExtensions(final String[] exts, final boolean ignoreCase)
  7. getFilterExtensions(FileNameExtensionFilter... filters)
  8. getHostFileFilters()
  9. getKCTapFileFilter()