Package com.lightcrafts.platform.macosx.sheets

Examples of com.lightcrafts.platform.macosx.sheets.SaveExportSheet


    /**
     * {@inheritDoc}
     */
    public ImageExportOptions exportFile( ImageExportOptions options,
                                          Frame parent ) {
        final SaveExportSheet sheet = new SaveExportSheet();
        sheet.showExportAndWait(
            parent,
            //
            // Chop off filename extension so we don't get proposed filenames
            // like "myimage.CRW.jpg".
            //
            new File( FileUtil.trimExtensionOf( options.getExportFile() ) ),
            new ImageExportOptions[]{ options }
        );
        return sheet.getExportOptions();
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public ImageExportOptions saveFile( ImageExportOptions options,
                                        Frame parent ) {
        final SaveExportSheet sheet = new SaveExportSheet();

        //
        // Chop off filename extension so we don't get proposed filenames like
        // "myimage.CRW.jpg".
        //
        String fileName = FileUtil.trimExtensionOf( options.getExportFile() );

        //
        // Add a suffix so it makes it much harder for a user to overwrite an
        // original JPEG or TIFF file.
        //
        if ( !fileName.endsWith( "_lzn" ) )
            fileName += "_lzn";

        sheet.showSaveAndWait(
            parent, new File( fileName ),
            new ImageExportOptions[]{ options }
        );
        return sheet.getExportOptions();
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.platform.macosx.sheets.SaveExportSheet

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.