Package jsky.util.gui

Examples of jsky.util.gui.ExampleFileFilter


     * @return the new file chooser
     */
    public static JFileChooser makeImageFileChooser() {
        JFileChooser fileChooser = new JFileChooser(new File("."));

        ExampleFileFilter fitsFilter = new ExampleFileFilter(new String[]{
                "fits", "fits.gz", "fits.Z", "hfits"}, "FITS Image Files");
        fileChooser.addChoosableFileFilter(fitsFilter);

        ExampleFileFilter jpgFilter = new ExampleFileFilter(new String[]{
                "jpg", "jpeg"}, "JPEG Compressed Image Files");
        fileChooser.addChoosableFileFilter(jpgFilter);

        ExampleFileFilter gifFilter = new ExampleFileFilter("gif", "GIF Image Files");
        fileChooser.addChoosableFileFilter(gifFilter);

        ExampleFileFilter tifFilter = new ExampleFileFilter(new String[]{"tif", "tiff"}, "TIFF Image Files");
        fileChooser.addChoosableFileFilter(tifFilter);

        ExampleFileFilter ppmFilter = new ExampleFileFilter(new String[]{"ppm", "png", "pgm"}, "PPM Image Files");
        fileChooser.addChoosableFileFilter(ppmFilter);

        fileChooser.setFileFilter(fitsFilter);

        return fileChooser;
View Full Code Here


     * Create and return a new file chooser to be used to select a local catalog file to open.
     */
    public JFileChooser makeFileChooser() {
        JFileChooser fileChooser = new JFileChooser(new File("."));

        ExampleFileFilter xmlFilter = new ExampleFileFilter(new String[]{
                "xml", "vot"}, "VOTable XML File");
        fileChooser.addChoosableFileFilter(xmlFilter);

        ExampleFileFilter fitsFilter = new ExampleFileFilter(new String[]{
                "fit", "fits", "fts"}, "FITS File (with Table Extensions)");
        fileChooser.addChoosableFileFilter(fitsFilter);

        ExampleFileFilter skycatLocalCatalogFilter = new ExampleFileFilter(new String[]{
                "table", "scat", "cat"}, "Skycat Local Catalog File");
        fileChooser.addChoosableFileFilter(skycatLocalCatalogFilter);

        fileChooser.setFileFilter(xmlFilter);

View Full Code Here

TOP

Related Classes of jsky.util.gui.ExampleFileFilter

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.