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

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


                return;

            // if the source component a tab?
            MyDoggyToolWindowTab toolWindowTab = null;
            if (SwingUtilities.isDescendingFrom(dge.getComponent(), toolWindowTitleBar)) {
                ToolWindowTabButton toolWindowTabButton = SwingUtil.getParent(dge.getComponent(), ToolWindowTabButton.class);
                if (toolWindowTabButton != null)
                    toolWindowTab = (MyDoggyToolWindowTab) toolWindowTabButton.getToolWindowTab();
            }

            // Start Drag
            if (toolWindowTab != null && toolWindowTab.getDockableDelegator() != null) {
                // The source is a tab
View Full Code Here


        SwingUtil.repaint(tabContainer);
    }

    protected void addTab(MyDoggyToolWindowTab tab) {
        ToolWindowTabButton tabButton = new ToolWindowTabButton(tab, toolWindowTabPanel);
        tab.removePlafPropertyChangeListener(propertyChangeBridge);
        tab.addPlafPropertyChangeListener(propertyChangeBridge);

        addTab(tabButton);
    }
View Full Code Here

    protected ToolWindowTab getNextTab(ToolWindowTab toolWindowTab) {
        // Look for column of the next tab in respeto to <code>toolWindowTab</code>
        int nextTabCol = -1;
        for (Component component : tabContainer.getComponents()) {
            if (component instanceof ToolWindowTabButton) {
                ToolWindowTabButton tabButton = (ToolWindowTabButton) component;
                if (tabButton.getToolWindowTab() == toolWindowTab) {
                    TableLayoutConstraints constraints = containerLayout.getConstraints(component);
                    nextTabCol = constraints.col1 + 3;
                    break;
                }
            }

        }

        if (nextTabCol != -1) {
            for (Component component : tabContainer.getComponents()) {
                if (component instanceof ToolWindowTabButton) {
                    ToolWindowTabButton tabButton = (ToolWindowTabButton) component;
                    TableLayoutConstraints constraints = containerLayout.getConstraints(tabButton);

                    if (constraints.col1 == nextTabCol)
                        return tabButton.getToolWindowTab();
                }
            }
            for (ToolWindowTab windowTab : toolWindow.getToolWindowTabs()) {
                if (windowTab != toolWindowTab)
                    return windowTab;
View Full Code Here

    }

    protected Component removeTab(ToolWindowTab toolWindowTab, boolean flag) {
        for (Component component : tabContainer.getComponents()) {
            if (component instanceof ToolWindowTabButton) {
                ToolWindowTabButton tabButton = (ToolWindowTabButton) component;

                if (tabButton.getToolWindowTab() == toolWindowTab) {
                    TableLayoutConstraints constraints = containerLayout.getConstraints(component);
                    tabButton.setUI(null);
                    tabContainer.remove(component);

                    if (flag)
                        toolWindowTab.removePropertyChangeListener(propertyChangeBridge);
View Full Code Here

        public void update(Component source, JPopupMenu popupMenu) {
            if (source.getParent() instanceof ToolWindowTabButton) {
                boolean enableByTabsCount = toolWindow.getToolWindowTabs().length > 1;

                ToolWindowTabButton tabButton = (ToolWindowTabButton) source.getParent();

                int index = 0;
                if (tabButton.getToolWindowTab().isCloseable()) {
                    final JMenuItem closeItem = new JMenuItem(new CloseTabAction(tabButton.getToolWindowTab()));
                    popupMenu.add(closeItem, index++);
                    popupMenu.add(closeAllItem, index++);
                    popupMenu.add(new JSeparator(), index++);
                }
                popupMenu.add(nextTabItem, index++);
View Full Code Here

            if (selectedTab != null && selecTabButton != null) {
                int nextTabCol = containerLayout.getConstraints(selecTabButton).col1 + 3;

                for (Component component : tabContainer.getComponents()) {
                    if (component instanceof ToolWindowTabButton) {
                        ToolWindowTabButton tabButton = (ToolWindowTabButton) component;
                        TableLayoutConstraints constraints = containerLayout.getConstraints(tabButton);

                        if (constraints.col1 == nextTabCol) {
                            tabButton.getToolWindowTab().setSelected(true);
                            return;
                        }
                    }
                }
                if (tabs.length > 0)
View Full Code Here

            if (selectedTab != null && selecTabButton != null) {
                int nextTabCol = containerLayout.getConstraints(selecTabButton).col1 - 3;

                for (Component component : tabContainer.getComponents()) {
                    if (component instanceof ToolWindowTabButton) {
                        ToolWindowTabButton tabButton = (ToolWindowTabButton) component;
                        TableLayoutConstraints constraints = containerLayout.getConstraints(tabButton);

                        if (constraints.col1 == nextTabCol) {
                            tabButton.getToolWindowTab().setSelected(true);
                            return;
                        }
                    }
                }
                if (tabs.length > 0)
View Full Code Here

TOP

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

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.