Package org.jitterbit.application.ui.window.editor

Examples of org.jitterbit.application.ui.window.editor.EditorService


    public Editor getPageForEntity(IntegrationEntity entity) {
        Editor editor = entityToPage.get(entity);
        // This will happen if the entity is displayed in a detached editor:
        if (editor == null) {
            EditorService svc = view.getEditorService();
            for (Editor e : svc.getOpenEditors()) {
                if (e.getObject() == entity) {
                    editor = e;
                    break;
                }
            }
View Full Code Here


            if (editor == null) {
                launcher.wakeUp();
                editor = createNewEditor(launcher);
                attachLauncherListener(launcher, editor);
            }
            EditorService editorService = getEditorService();
            editorService.openEditor(editor);
        }
View Full Code Here

            editorService.openEditor(editor);
        }

        private EditorService getEditorService() {
            ApplicationWindow appWin = launcher.getWindow();
            EditorService editorService = appWin.getEditorService();
            return editorService;
        }
View Full Code Here

            };
            launcher.addLaunchListener(launcherListener);
        }

        private Editor findOpenEditor() {
            EditorService editorService = getEditorService();
            return editorService.getEditor(EDITOR_ID);
        }
View Full Code Here

        @Override
        public void actionPerformed(ActionEvent e) {
            ApplicationWindow window = editor.getWindow();
            if (window != null) {
                EditorService editors = window.getEditorService();
                editors.closeOtherEditors(editor);
            }
        }
View Full Code Here

            }
        }
    }

    public void closeOtherEditorsInCategory(EditorCategory category) {
        EditorService svc = appWin.getEditorService();
        Editor active = svc.getActiveEditor();
        if (active == null) {
            return;
        }
        EditorCategory activeEditorsCategory = model.categorize(active);
        if (!category.equals(activeEditorsCategory)) {
            return;
        }
        List<Editor> editorsToClose = model.getEditors(category);
        editorsToClose.remove(active);
        if (!editorsToClose.isEmpty()) {
            svc.closeEditors(editorsToClose);
        }
    }
View Full Code Here

        return window;
    }

    private EditorSelectorWindow createEditorSelector(EditorCategory category, KongaDialog dialog) {
        List<Editor> editors = model.getEditors(category);
        EditorService editorService = model.getEditorService();
        EditorSelectorWindow window;
        if (editors.size() <= THUMBNAIL_SELECTOR_LIMIT) {
            window = new EditorThumbnailSelectorWindow(editorService, editors, southPosition);
        } else {
            QuickSwitchEditorWindow listWindow = new QuickSwitchEditorWindow(editorService, editors);
            listWindow.setIncludeSearchField(false);
            window = listWindow;
        }
        if (dialog != null) {
            window.setDialog(dialog);
        }
        if (editors.size() > 1) {
            window.setSelectedEditor(editorService.getActiveEditor());
            window.setNotifications(model.getNotifications());
        }
        Component activeArea = getActiveArea();
        window.setActiveArea(activeArea);
        return window;
View Full Code Here

    private boolean close() {
        // We close all editors first. This is to prevent any open transformations from being
        // opened automatically when the project is re-opened. This is turn is because we may
        // delete JTR files, which would automatically cause the user to be prompted to login
        // to a server when the project is re-opened, which may be distracting.
        EditorService editors = view.getWindow().getEditorService();
        if (editors.closeAllEditors()) {
            try {
                view.getProjectManager().closeCurrentProject();
                return true;
            } catch (CloseProjectVetoException ex) {
                // Shouldn't happen since we have closed all pages, but even if it does happen
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.window.editor.EditorService

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.