Example usage for javax.swing.filechooser FileFilter subclass-usage

List of usage examples for javax.swing.filechooser FileFilter subclass-usage

Introduction

In this page you can find the example usage for javax.swing.filechooser FileFilter subclass-usage.

Usage

From source file GUI.MyCustomFilter.java

class MyCustomFilter extends javax.swing.filechooser.FileFilter {

    @Override
    public boolean accept(File file) {
        // Allow only directories, or files with ".txt" extension
        return file.isDirectory() || file.getAbsolutePath().endsWith(".cpp");

From source file FilesystemFilter.java

/**
 * A filesystem filter.
 * 
 * @author David Gilbert
 */
public class FilesystemFilter extends FileFilter implements FilenameFilter {

From source file ImageFileFilterImageScale.java

class ImageFilter extends javax.swing.filechooser.FileFilter {
    public boolean accept(File f) {
        if (f.isDirectory())
            return true;
        String name = f.getName();
        if (name.matches(".*((.jpg)|(.gif)|(.png))"))

From source file ffx.potential.parsers.ARCFileFilter.java

/**
 * The ARCFileFilter class is used to choose a TINKER Archive (*.ARC).
 *
 * @author Michael J. Schnieders
 * @since 1.0
 *

From source file ffx.potential.parsers.DYNFileFilter.java

/**
 * The DYNFileFilter class is used to choose a TINKER Restart (*.DYN) file.
 *
 * @author Michael J. Schnieders
 * @since 1.0
 *

From source file ffx.potential.parsers.FFXFileFilter.java

/**
 * The FFXFileFilter class is used to choose Force Field X script (*.FFX) files.
 *
 * @author Michael J. Schnieders
 * @since 1.0
 *

From source file ffx.potential.parsers.PDBMLFileFilter.java

/**
 * The PDBXFileFilter class is used to choose a PDBML File (*.XML).
 *
 * @author Michael J. Schnieders
 * @since 1.0.
 *

From source file ffx.potential.parsers.ForceFieldFileFilter.java

/**
 * The ForceFieldFileFilter class is used to choose a TINKER Parameter file
 * (*.PRM).
 *
 * @author Michael J. Schnieders
 * @since 1.0

From source file ffx.potential.parsers.InducedFileFilter.java

/**
 * The InducedFileFilter class is used to choose a TINKER induced dipole (*.IND)
 * file.
 *
 * @author Michael J. Schnieders
 * @since 1.0

From source file ffx.potential.parsers.KeyFileFilter.java

/**
 * The KeyFileFilter class is used to choose a Force Field X keyword (*.KEY) or
 * property (*.properties) file.
 *
 * @author Michael J. Schnieders
 * @since 1.0