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

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


            }
        });
    }

    private boolean saveIfDirty(WebServiceCall wsCall) {
        Editor page = view.getEditorForDisplayedObject(wsCall);
        if (page != null && page.isDirty()) {
            view.getEditorService().openEditor(page);
            EditorSaverResult result = view.getEditorSaver().saveEditor(page);
            return result.wasSaved(page);
        }
        return true;
View Full Code Here


        registrator.removeAll();
        registrator.dispose();
    }

    private void saveEntity(IntegrationEntity entity) {
        Editor editor = pageLocator.findOpenPage(entity);
        if (editor != null && editor.isDirty()) {
            savePage(entity, editor);
        } else {
            try {
                getProjectPersistor(entity).save(entity);
            } catch (InterchangeSavingException ex) {
View Full Code Here

    private SaveEditorException savePageIfOpen(final IntegrationEntity entity) {
        return UiThreadSupplier.call(new Supplier<SaveEditorException>() {

            @Override
            public SaveEditorException get() {
                Editor page = pageLocator.findOpenPage(entity);
                if (page != null && page.isDirty()) {
                    try {
                        page.save();
                    } catch (SaveEditorException e) {
                        return e;
                    }
                } else {
                    writeToDisk = saveToDiskEvenIfNotDirty;
View Full Code Here

    private void setInitialFocus() {
        EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                Editor p = getInitiallyFocusedPage();
                if (p != null) {
                    giveFocusToPage(p);
                }
            }
        });
View Full Code Here

            }
        });
    }

    private Editor getInitiallyFocusedPage() {
        Editor p = editorService.getActiveEditor();
        if (p != null) {
            return p;
        }
        if (editorService.getNumberOfEditors() > 0) {
            return editorService.getOpenEditors()[0];
View Full Code Here

    }

    @Override
    public Editor openPage(IntegrationEntity entity) {
        synchronized (lock) {
            Editor editor = findOpenPage(entity);
            if (editor == null) {
                editor = getPageFactory(entity).createPage(entity);
            }
            EditorService editorSvc = view.getWindow().getEditorService();
            editorSvc.openEditorDetached(editor);
View Full Code Here

            selectInTree(e);
        }
    }

    private void selectInTree(EditorServiceEvent e) {
        Editor page = e.getEditor();
        if (page instanceof IntegrationEntityPage) {
            IntegrationEntity entity = ((IntegrationEntityPage) page).getObject();
            view.displayInTree(entity);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void editorClosed(EditorServiceEvent e) {
        Editor page = e.getEditor();
        entityToPage.inverse().remove(page);
    }
View Full Code Here

    public void prepareForRemoval() {
        view.getEditorService().removeEditorServiceListener(this);
    }

    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) {
View Full Code Here

        }

        @Override
        public void run() {
            try {
                Editor page = getPage();
                if (page != null) {
                    displayPage(page);
                }
            } catch (Exception ex) {
                handleError(ex);
View Full Code Here

TOP

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

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.