Package org.jitterbit.application.ui.window

Examples of org.jitterbit.application.ui.window.WindowSectionContent


        public void activeContentChanged(WindowSectionEvent evt) {
            checkIfLauncherShouldBeHidden(evt);
        }

        private void checkIfLauncherShouldBeHidden(WindowSectionEvent evt) {
            WindowSectionContent content = evt.getContent();
            if (isErrorLogView(content)) {
                if (errorLogQuickLauncher != null) {
                    errorLogQuickLauncher.hide();
                }
            }
View Full Code Here


    private class ContentProvider implements WindowSectionContentProvider {

        @Override
        public WindowSectionContent getContent(WindowSection section) {
            WindowSectionContent content = new TrashCanView(section, TrashCanViewUi.this);
            content.addResource(new DisposableWindowElementResource(TrashCanViewUi.this));
            EventQueue.invokeLater(new Runnable() {

                @Override
                public void run() {
                    startListening();
View Full Code Here

    private void switchToAlreadyDisplayedContent(WindowSection section,
                                                 String contentId,
                                                 WindowSectionContentUpdater updater,
                                                 AddContentCallback callback) {
        try {
            WindowSectionContent c = section.getContent(contentId);
            if (updater != null) {
                updater.update(c);
            }
            section.setActiveContent(c);
            section.ensureVisible();
View Full Code Here

        EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                try {
                    WindowSectionContent content = provider.getContent(section);
                    section.addContent(content, callback);
                } catch (RuntimeException ex) {
                    if (callback != null) {
                        callback.failed(ex);
                    } else {
View Full Code Here

        centerEastSplit = createSplitPane(JSplitPane.HORIZONTAL_SPLIT, 1, true);
        centerEastSplit.setBorder(null);
        JComponent centerView = createSplitPaneCanvas();
        WindowSection centerSection = window.getWindowSection(ApplicationWindow.CENTER);
        centerSection.decorate(centerView);
        WindowSectionContent content = new EditorServiceWindowContent(centerSection, window.getEditorService());
        AddContentCallback callback = new AddContentWaitIndicator(window);
        centerSection.addContent(content, callback);
        JComponent east = createSplitPaneCanvas();
        window.getWindowSection(ApplicationWindow.EAST).decorate(east);
        centerEastSplit.setRightComponent(east);
View Full Code Here

        }
    }


    private void handleIndexSwitch(int oldIndex, int newIndex) {
        WindowSectionContent content = contents.remove(oldIndex);
        contents.add(newIndex, content);
        rebuildIndexMap();
    }
View Full Code Here

        private int selectedIndex = -1;

        @Override
        public void closeCurrentTabRequested(KongaTabbedPaneCloseEvent evt) {
            int index = evt.getSelectedIndex();
            WindowSectionContent content = (index >= 0) ? contents.get(index) : null;
            if (content != null) {
                windowSection.removeContent(content);
            }
        }
View Full Code Here

                if (n != index) {
                    contents.get(n).revokeState(WindowElementState.ACTIVE);
                }
            }
            selectedIndex = index;
            WindowSectionContent active = null;
            if (index != -1) {
                active = contents.get(index);
                active.appendState(WindowElementState.ACTIVE);
                windowSection.ensureVisible();
            }
            windowSection.fireActiveContentChanged(active);
        }
View Full Code Here

        detachedContent = new DetachedContentManager();
        addWindowSectionListener(new WindowSectionListener.Adapter() {

            @Override
            public void activeContentChanged(WindowSectionEvent evt) {
                WindowSectionContent content = evt.getContent();
                boolean detachEnabled = (content != null && content.isDetachable());
                detachAction.setEnabled(detachEnabled);
            }
        });
    }
View Full Code Here

        return idToContent.containsKey(id) || detachedContent.contains(id);
    }

    @Override
    public WindowSectionContent getContent(String id) {
        WindowSectionContent c = idToContent.get(id);
        if (c == null) {
            c = detachedContent.getContent(id);
        }
        return c;
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.window.WindowSectionContent

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.