Examples of OtherApplication


Examples of com.lightcrafts.app.other.OtherApplication

    void update() {
        super.update();
        if (isEnabled()) {
            final Document doc = getDocument();
            if (OtherApplicationShim.shouldSaveDirectly(doc)) {
                final OtherApplication app = (OtherApplication) doc.getSource();
                final String appName = app.getName();
                final String appText = LOCALE.get("SaveToApp", appName);
                setText(appText);
            }
            else {
                setText(DefaultText);
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

     * open the given {@link File}.
     * @noinspection UNUSED_SYMBOL
     */
    private static void openFile( String pathToFile, String parentExe ) {
        final File file = new File( pathToFile );
        final OtherApplication app =
            WindowsApplication.getAppForExe( parentExe );
        EventQueue.invokeLater(
            new Runnable() {
                public void run() {
                    Application.openFrom( file, app );
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

     * the AppleEvent to open the given file.
     */
    @SuppressWarnings( { "UnusedDeclaration" } )
    private static synchronized void openFile( final String pathName,
                                               String senderSig ) {
        final OtherApplication app =
            MacApplication.getAppForSignature( senderSig );
        EventQueue.invokeLater(
            new Runnable() {
                public void run() {
                    Application.openFrom( new File( pathName ), app );
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

    public static void reOpen(ComboFrame frame) {
        Document doc = frame.getDocument();
        File file = doc.getFile();
        ImageMetadata meta = doc.getMetadata();
        OtherApplication otherApp = (OtherApplication) doc.getSource();
        if (file != null) {
            open(file, frame, otherApp);
        }
        else {
            open(meta.getFile(), frame, otherApp);
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

                    try {
                        TemporaryEditorCommitState state = doc.saveStart();
                        DocumentWriter.save(doc, frame, saveDirectly, null);
                        doc.saveEnd(state);
                        if (!isLzn && OtherApplication.isIntegrationEnabled()) {
                            final OtherApplication app =
                                (OtherApplication)doc.getSource();
                            if (app != null) {
                                app.postSave(
                                    saveFile, saveDirectly, openPending
                                );
                            }
                        }
                    }
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

                // We're performing some kind of Engine export:
                Engine engine = doc.getEngine();
                ImageExportOptions export =
                    SaveOptions.getExportOptions(options);

                OtherApplication app = (OtherApplication)doc.getSource();

                // Mangle LZN and add it to the export options as appropriate:
                if (options.isSidecarJpeg() || options.isSidecarTiff()) {
                    if (app instanceof LightroomApplication) {
                        File file = LightroomApplication.getOriginalFile(
                            options.getFile()
                        );
                        mangleLznSidecarFile(xml,file);
                    }
                    addLznMetadata(export, xml);
                }
                else if (options.isMultilayerTiff()) {
                    mangleLznMultilayerTiff(xml);
                    addLznMetadata(export, xml);
                }
                String message = LOCALE.get("SavingMessage");

                if (app != null && app != UnknownApplication.INSTANCE &&
                    saveDirectly) {
                    String name = app.getName();
                    message = LOCALE.get("SavingToMessage", name);
                }
                if (progress != null) {
                    export(engine, export, progress);
                    return true;
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

public class OtherApplicationShim {

    // Used in the save logic, and also by the SaveMenuItem to decide whether
    // to update its text.
    public static boolean shouldSaveDirectly(Document doc) {
        final OtherApplication app = (OtherApplication) doc.getSource();
        if (app != null) {
            final ImageInfo info = getImageInfo(doc);
            return app.shouldSaveDirectly(info);
        }
        return false;
    }
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

        }
        return false;
    }

    static SaveOptions createExportOptions(Document doc) {
        final OtherApplication app = (OtherApplication) doc.getSource();
        final ImageInfo info = getImageInfo(doc);
        final Engine engine = doc.getEngine();
        final Dimension size = engine.getNaturalSize();
        try {
            final ImageExportOptions export =
                app.createExportOptions(info, size);
            if (export != null) {
                final SaveOptions options = getSaveOptions(export);
                options.setShouldSaveDirectly( true );
                return options;
            }
View Full Code Here

Examples of com.lightcrafts.app.other.OtherApplication

            templates.dispose();
            templates = new TemplateControl(editor, this);
            ScaleModel scale = doc.getScaleModel();
            scale.addScaleListener(this);
            doc.addDocumentListener(this);
            OtherApplication source = (OtherApplication) doc.getSource();
            if ((! isEditorVisible) || (source != null)) {
                showEditorPerspective();
            }
            toolButtonListener =
                new PropertyChangeListener() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.