Package com.vlsolutions.swing.docking

Examples of com.vlsolutions.swing.docking.DockableState


         * (non-Javadoc)
         *
         * @see com.vlsolutions.swing.docking.event.DockableStateWillChangeListener#dockableStateWillChange(com.vlsolutions.swing.docking.event.DockableStateWillChangeEvent)
         */
        public void dockableStateWillChange(DockableStateWillChangeEvent event) {
            DockableState futureState = event.getFutureState();
            if (futureState.isClosed()) {
                Dockable dockable = futureState.getDockable();
                if (dockable instanceof ViewDescriptorDockable) {
                    ViewDescriptorDockable vdd = (ViewDescriptorDockable) dockable;
                    PageComponent pc = vdd.getPageComponent();
                    if (!pc.canClose())
                        event.cancel();
View Full Code Here


         * (non-Javadoc)
         *
         * @see com.vlsolutions.swing.docking.event.DockableStateChangeListener#dockableStateChanged(com.vlsolutions.swing.docking.event.DockableStateChangeEvent)
         */
        public void dockableStateChanged(DockableStateChangeEvent event) {
            DockableState previousState = event.getPreviousState();
            DockableState newState = event.getNewState();
            Dockable dockable = newState.getDockable();
            PageComponent pc = getPageComponent(dockable);
            if (pc == null)
                return;
            if (previousState != null && !previousState.isClosed() && newState.isClosed()) {
                pc.getContext().getPage().close(pc);
            }
        }
View Full Code Here

        }

        public void dockableStateWillChange(DockableStateWillChangeEvent event) {
            if (resetWorkspaceOperation)
                return;
            DockableState dockableState = event.getFutureState();
            Dockable dockable = dockableState.getDockable();
            if (dockableState.isClosed() && !canCloseComponent(dockable))
                event.cancel();
            else {
                if (dockable instanceof EditorDockable) {
                    lastClosedEditorDockableContainer = DockingUtilities.findTabbedDockableContainer(dockable);
                }
View Full Code Here

                }
            }
        }

        public void dockableStateChanged(DockableStateChangeEvent event) {
            DockableState dockableState = event.getNewState();
            Dockable dockable = dockableState.getDockable();
            if (dockableState.isClosed() && dockable instanceof EditorDockable) {
                workspace.unregisterDockable(dockable);
                Dockable selectedDockable = null;
                if (lastClosedEditorDockableContainer != null) {
                    selectedDockable = lastClosedEditorDockableContainer.getSelectedDockable();
                    lastClosedEditorDockableContainer = null;
                    if (selectedDockable == null) {
                        selectedDockable = workspace.getSelectedDockable();
                        if (!(selectedDockable instanceof EditorDockable)) {
                            selectedDockable = null;
                        }
                    }
                }
                setCurrentEditorDockable((EditorDockable) selectedDockable);
            }
            if (dockableState.isMaximized())
                maximizedDockable = dockable;
        }
View Full Code Here

            TabbedDockableContainer dockableContainer = DockingUtilities.findTabbedDockableContainer(dockable);
            int order = 1;
            if (dockableContainer != null) {
                order = dockableContainer.indexOfDockable(dockable) + 1;
            }
            DockableState dockableState = workspace.getDockableState(editorDockable);
            if (dockableState == null) {
                workspace.createTab(dockable, editorDockable, order, true);
            }
        } else {
            if (maximizedDockable != null) {
                DockableState dockableState = workspace.getDockableState(maximizedDockable);
                if (dockableState != null && dockableState.isMaximized())
                    workspace.restore(maximizedDockable);
            }
            DockableState dockableState = workspace.getDockableState(editorDockable);
            DockableState OPDockableState = workspace.getDockableState(outputPane);
            if (dockableState == null && OPDockableState != null && OPDockableState.isDocked())
                workspace.split(outputPane, editorDockable, DockingConstants.SPLIT_TOP, 0.8);
            else if (dockableState == null) {
                DockableState RDockableState = workspace.getDockableState(resultPane);
                if (RDockableState != null && RDockableState.isDocked())
                    workspace.split(resultPane, editorDockable, DockingConstants.SPLIT_TOP, 0.8);
                else
                    workspace.addDockable(editorDockable);
            }
        }
View Full Code Here

TOP

Related Classes of com.vlsolutions.swing.docking.DockableState

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.