Package org.noos.xing.mydoggy.plaf.ui.cmp

Examples of org.noos.xing.mydoggy.plaf.ui.cmp.ContentWindow


            if (content.isMinimized())
                return;

            if (content.isDetached()) {
                ContentWindow contentWindow = (ContentWindow) SwingUtilities.windowForComponent(content.getComponent());
                contentWindow.setComponent(content, newCmp);
            } else {
                int index = tabbedContentPane.indexOfContent(content);
                if (index != -1)
                    tabbedContentPane.setComponentAt(index, newCmp);
                else {
View Full Code Here


                            switch (constraint.getOnIndex()) {
                                case -2:
                                    for (Window window : SwingUtil.getTopContainers()) {
                                        if (window instanceof ContentWindow) {
                                            ContentWindow contentWindow = (ContentWindow) window;

                                            if (contentWindow.containsDockable(constraint.getOnContent())) {
                                                // remove content
                                                removeContent(content);

                                                contentWindow.addDockable(content,
                                                        content.getComponent(),
                                                        null,
                                                        constraint.getOnPosition());
                                                break;
                                            }
                                        }
                                    }
                                    break;
                                default:
                                    for (Window window : SwingUtil.getTopContainers()) {
                                        if (window instanceof ContentWindow) {
                                            ContentWindow contentWindow = (ContentWindow) window;

                                            if (contentWindow.containsDockable(constraint.getOnContent())) {
                                                // remove content
                                                removeContent(content);

                                                contentWindow.addDockable(content,
                                                        content.getComponent(),
                                                        constraint.getOnContent(),
                                                        constraint.getOnPosition());
                                                break;
                                            }
                                        }
                                    }
                            }
                        } else {
                            ContentUI contentUI = getContentUI(content);

                            Rectangle inBounds = toolWindowManager.getBoundsToScreen(content.getComponent().getBounds(),
                                    content.getComponent().getParent());

                            // remove content
                            removeContent(content);

                            // Setup dialog
                            Frame parentFrame = (toolWindowManager.getWindowAncestor() instanceof Frame) ? (Frame) toolWindowManager.getWindowAncestor() : null;

                            Window dialog;
                            if (contentUI.isAddToTaskBarWhenDetached()) {
                                dialog = new ContentFrame(
                                        content, contentUI,
                                        parentFrame, inBounds);
                            } else {
                                dialog = new ContentDialog(
                                        content, contentUI,
                                        parentFrame, inBounds);
                            }
                            dialog.addWindowFocusListener(new ContentDialogFocusListener(content));
                            dialog.toFront();
                            dialog.setVisible(true);

                            componentInFocusRequest = findAndRequestFocus(dialog);
                        }
                    } finally {
                        valueAdjusting = false;
                    }
                } else {
                    ContentWindow window = (ContentWindow) SwingUtilities.windowForComponent(content.getComponent());
                    window.removeDockable(content);

                    if (window.getDockableCount() <= 0) {
                        window.setVisible(false);
                        window.dispose();
                    }

                    contentValueAdjusting = true;
                    try {
                        int index = 0;
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.ui.cmp.ContentWindow

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.