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

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


        int pos = editors.size() - position - 1;
        return new BackwardForwardStack(this, stack.toArray(new Editor[stack.size()]), pos);
    }

    private void removeNeighbouringDuplicates(List<Editor> editors) {
        Editor previous = null;
        for (Iterator<Editor> it = editors.iterator(); it.hasNext(); ) {
            Editor e = it.next();
            if (e == previous) {
                it.remove();
            } else {
                previous = e;
            }
View Full Code Here


        public boolean internalChange;

        @Override
        public void editorClosed(EditorServiceEvent e) {
            Editor closed = e.getEditor();
            forgetEditor(closed);
            postClose();
        }
View Full Code Here

                }
            });
        }

        private void updatePositionAfterEditorClosed() {
            Editor active = svc.getActiveEditor();
            if (editors.get(position) == active) {
                return;
            }
            int forwardDistance = getForwardDistanceTo(active);
            int backwardDistance = getBackwardDistanceto(active);
View Full Code Here

            return -1;
        }

        @Override
        public void activeEditorChanged(EditorServiceEvent e) {
            Editor active = e.getEditor();
            if (internalChange || closeEditorInProgress || active == null || active.getWindow() == null) {
                return;
            }
            if (isNewBranch(active)) {
                startNewBranch(active);
            }
View Full Code Here

            ++position;
        }

        private boolean isNewBranch(Editor active) {
            if (position < editors.size() - 1) {
                Editor next = editors.get(position + 1);
                return (next != active);
            }
            return true;
        }
View Full Code Here

    }

    void closeEditorsForDeletedEntities(List<IntegrationEntity> deleted) {
        List<Editor> editorsToClose = Lists.newArrayList();
        for (IntegrationEntity e : deleted) {
            Editor editor = getEditorForEntity(e);
            if (editor != null) {
                editorsToClose.add(editor);
            }
            String[] mementoRoot = new String[] { e.getID().toString() };
            getEditorService().getEditorMemento().remove(mementoRoot);
View Full Code Here

     * @param entity
     *            the entity to display
     * @return the <code>Editor</code> displaying the entity
     */
    public Editor openEditorFor(IntegrationEntity entity) {
        Editor page = getEditorForDisplayedObject(entity);
        if (page != null) {
            displayEditor(page);
            return page;
        }
        pageManager.open(entity);
View Full Code Here

        }

    }

    private void saveEntityIfNeeded(IntegrationEntity entity) throws SaveEditorException {
        Editor editor = pageLocator.findOpenPage(entity);
        if (editor != null && editor.isDirty()) {
            editor.save();
        }
    }
View Full Code Here

            updateEditorStates();
            getEditorService().fireActiveEditorChanged();
        }

        private void updateEditorStates() {
            Editor active = getActiveEditor();
            MultiTabEditorServiceUi2.this.updateEditorStates(active);
        }
View Full Code Here

        super.activeEditorChanged(e);
        setEnabled(getEntityPage() != null);
    }

    private IntegrationEntityPage getEntityPage() {
        Editor active = getActiveEditor();
        if (active instanceof IntegrationEntityPage) {
            // XXX: In the current version, the ProjectPage already displays a description editor.
            // We need to  link that editor to the one used by IntegrationEntityPage.showDescriptionEditor().
            // Until then, we just disable this action for ProjectPages.
            if (active instanceof ProjectPage) {
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.