Package info.clearthought.layout

Examples of info.clearthought.layout.TableLayoutConstraints


                int nextTabCol = containerLayout.getConstraints(selecTabButton).col1 + 3;

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

                        if (constraints.col1 == nextTabCol) {
                            tabButton.tab.setSelected(true);
                            return;
                        }
View Full Code Here


                int nextTabCol = containerLayout.getConstraints(selecTabButton).col1 - 3;

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

                        if (constraints.col1 == nextTabCol) {
                            tabButton.tab.setSelected(true);
                            return;
                        }
View Full Code Here

                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;
                        }
View Full Code Here

                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;
                        }
View Full Code Here

            } else {
                newCols = new double[oldCols.length + 2];

                // Move all components
                for (Component component : toolWindowTitleButtonPanel.getComponents()) {
                    TableLayoutConstraints constraints = containerLayout.getConstraints(component);
                    if (constraints.col1 >= 1) {
                        constraints.col1 += 2;
                        constraints.col2 = constraints.col1;
                        containerLayout.setConstraints(component, constraints);
                    }
                }

                // Prepare the space at the beginning of neCols
                System.arraycopy(oldCols, 1, newCols, 3, oldCols.length - 1);

                // Setup the columns for the new actions
                newCols[1] = -2;
                newCols[2] = 1;

                // setup the column destination
                col = 1;
            }
            containerLayout.setColumn(newCols);
        } else {
            int colIndex = (index != 0 ? 1 : 0) + ((toolWindowTitleButtonPanel.getComponentCount()  - index) * 2);

            for (Component component : toolWindowTitleButtonPanel.getComponents()) {
                TableLayoutConstraints constraints = containerLayout.getConstraints(component);
                if (constraints.col1 >= colIndex) {
                    constraints.col1 += 2;
                    constraints.col2 = constraints.col1;
                    containerLayout.setConstraints(component, constraints);
                }
View Full Code Here

                double[] newCols = null;
                if (toolWindowTitleButtonPanel.getComponentCount() == 1) {
                    newCols = new double[]{0, 0};
                } else {
                    TableLayoutConstraints constraints = containerLayout.getConstraints(toolWindowTitleButton);

                    double[] oldCols = containerLayout.getColumn();

                    if (constraints.col1 == oldCols.length - 2) {
                        newCols = new double[oldCols.length - 1];
                        System.arraycopy(oldCols, 0, newCols, 0, constraints.col1);
                        System.arraycopy(oldCols, constraints.col1 + 1, newCols, constraints.col1, 1);
                    } else {
                        for (Component cmp : toolWindowTitleButtonPanel.getComponents()) {
                            TableLayoutConstraints cst = containerLayout.getConstraints(cmp);
                            if (cst.col1 >= constraints.col1 + 2) {
                                cst.col1 -= 2;
                                cst.col2 = cst.col1;
                                containerLayout.setConstraints(cmp, cst);
                            }
View Full Code Here

        int nextTabCol = -1;
        for (Component component : tabContainer.getComponents()) {
            if (component instanceof TabButton) {
                TabButton tabButton = (TabButton) component;
                if (tabButton.tab == toolWindowTab) {
                    TableLayoutConstraints constraints = containerLayout.getConstraints(tabButton);
                    tabContainer.remove(tabButton);
                    tabButton.removePropertyChangeListener(this);

                    nextTabCol = constraints.col1;
                    int col = constraints.col1 - 1;
                    containerLayout.deleteColumn(col);
                    containerLayout.deleteColumn(col);
                    containerLayout.deleteColumn(col);
                    break;
                }
            }
        }

        SwingUtil.repaint(tabContainer);

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

                    if (constraints.col1 == nextTabCol)
                        return tabButton.tab;
                }
            }
View Full Code Here

                int nextTabCol = containerLayout.getConstraints(selecTabButton).col1 + 3;

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

                        if (constraints.col1 == nextTabCol) {
                            tabButton.tab.setSelected(true);
                            return;
                        }
View Full Code Here

                int nextTabCol = containerLayout.getConstraints(selecTabButton).col1 - 3;

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

                        if (constraints.col1 == nextTabCol) {
                            tabButton.tab.setSelected(true);
                            return;
                        }
View Full Code Here

        manager.propertyChange(new PropertyChangeEvent(this, "tempShowed", old, tempShowed));
    }

    public int getRepresentativeAnchorIndex(JLabel representativeAnchor) {
        TableLayoutConstraints constraints = representativeButtonsPanelLayout.getConstraints(representativeAnchor);
        if (constraints == null)
            return -1;
       
        if (horizontal)
            return (constraints.col1 / 2) - 1;
View Full Code Here

TOP

Related Classes of info.clearthought.layout.TableLayoutConstraints

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.