Package info.clearthought.layout

Examples of info.clearthought.layout.TableLayout


        SwingUtil.repaint(titleBar);
    }

    protected void disableIdOnTitleBar() {
        TableLayout layout = (TableLayout) titleBar.getLayout();
        layout.setColumn(0, 3);

        SwingUtil.repaint(titleBar);
    }
View Full Code Here


                switch (anchor) {
                    case BOTTOM:
                    case TOP:
                        memoryUsage.setOrientation(SwingConstants.HORIZONTAL);
                        setLayout(new TableLayout(new double[][]{{120, 1, 17}, {-1}}));
                        add(memoryUsage, "0,0,FULL,FULL");
                        add(gc, "2,0,FULL,FULL");
                        break;
                    case LEFT:
                        memoryUsage.setOrientation(SwingConstants.VERTICAL);
                        setLayout(new TableLayout(new double[][]{{-1}, {120, 1, 17}}));
                        add(memoryUsage, "0,0,FULL,FULL");
                        add(gc, "0,2,FULL,FULL");
                        break;
                    case RIGHT:
                        memoryUsage.setOrientation(SwingConstants.VERTICAL);
                        setLayout(new TableLayout(new double[][]{{-1}, {17, 1, 120}}));
                        add(gc, "0,0,FULL,FULL");
                        add(memoryUsage, "0,2,FULL,FULL");
                        break;
                }
View Full Code Here

        fileMenu.add(exitMenuItem);
        menuBar.add(fileMenu);
        this.frame.setJMenuBar(menuBar);

        // Set a layout manager. I love TableLayout. It's powerful.
        this.frame.getContentPane().setLayout(new TableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));
    }
View Full Code Here

        if (visible) {
            descriptor.setIdOnTitleBar();
            dockedContainer.getTitleBarButtons().setType(ToolWindowType.FLOATING_LIVE);

            // Reset Layout
            TableLayout layout = (TableLayout) sheet.getLayout();
            layout.setColumn(0, 0);
            layout.setColumn(2, 0);
            layout.setRow(0, 0);
            layout.setRow(2, 0);

            content.setVisible(true);
            sheet.add(content, "1,1,FULL,FULL");

            // Prepare sheet
            sheet.setBorder(BorderFactory.createEtchedBorder());

            if (lastBounds == null) {
                FloatingLiveTypeDescriptor typeDescriptor = (FloatingLiveTypeDescriptor) descriptor.getTypeDescriptor(ToolWindowType.FLOATING_LIVE);

                // Set Size
                if (typeDescriptor.getSize() == null) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                        case RIGHT:
                            sheet.setSize(descriptor.getDockedTypeDescriptor().getDockLength(),
                                    (int) (managerCmp.getHeight() / 1.5));
                            break;
                        case TOP:
                        case BOTTOM:
                            sheet.setSize((int) (managerCmp.getWidth() / 1.5),
                                    descriptor.getDockedTypeDescriptor().getDockLength());
                            break;
                    }
                } else
                    sheet.setSize(typeDescriptor.getSize());

                SwingUtil.validateBounds(sheet, descriptor.getManager().getMainContainer().getBounds());

                // Set Location
                if (typeDescriptor.getLocation() == null ||
                        typeDescriptor.getLocation().x > descriptor.getManager().getWidth() ||
                        typeDescriptor.getLocation().y > descriptor.getManager().getHeight() ||
                        typeDescriptor.getLocation().x < 0 ||
                        typeDescriptor.getLocation().y < 0) {
                    Component managerCmp = descriptor.getManager();

                    switch (toolWindow.getAnchor()) {
                        case LEFT:
                            sheet.setLocation(50, 50);
                            break;
                        case RIGHT:
                            sheet.setLocation(managerCmp.getWidth() - 50 - sheet.getWidth(),
                                    50);
                            break;
                        case TOP:
                            sheet.setLocation(50, 50);
                            break;
                        case BOTTOM:
                            sheet.setLocation(50,
                                    managerCmp.getHeight() - 50 - sheet.getHeight());
                            break;
                    }
                } else
                    sheet.setLocation(typeDescriptor.getLocation());
            } else {
                sheet.setBounds(lastBounds);
                lastBounds = null;
            }

            layeredPane.remove(sheet);
            layeredPane.setLayer(sheet, JLayeredPane.DEFAULT_LAYER + 3);
            layeredPane.add(sheet);
/*
            if (manager.getTypeDescriptor(ToolWindowType.SLIDING).isAnimating())
                slidingAnimation.show(sheet.getBounds());
*/
        } else {
            // Set Layout
            TableLayout layout = (TableLayout) sheet.getLayout();
            layout.setColumn(0, 2);
            layout.setColumn(2, 2);
            layout.setRow(0, 2);
            layout.setRow(2, 2);

/*
            if (manager.getTypeDescriptor(ToolWindowType.SLIDING).isAnimating())
                slidingAnimation.hide(sheet.getBounds());
            else {
View Full Code Here

        this.frame = new JFrame("Sample App...");
        this.frame.setSize(640, 480);
        this.frame.setLocation(100, 100);
        this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        // I love TableLayout. It's great.
        this.frame.getContentPane().setLayout(new TableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));
    }
View Full Code Here

    protected SpinnerModel widthModel;
    protected SpinnerModel heightModel;


    public PreviewPanel() {
        super(new TableLayout(new double[][]{{-2, -1}, {3, 20, 3, 20, 3, -1}}));

        setBorder(new TitledBorder("Preview"));

        add(image = new JImage(), "0,5,1,5,FULL,FULL");
        image.setPreferredSize(new Dimension(150, 113));
View Full Code Here

        if (visible) {
            // Reset Layout
            configureSlidingIcons();

            TableLayout layout = (TableLayout) sheet.getLayout();
            layout.setColumn(0, 0);
            layout.setColumn(2, 0);
            layout.setRow(0, 0);
            layout.setRow(2, 0);

            barContainer.getParent().getLayout().layoutContainer(barContainer.getParent());
            resize();

            content.setVisible(true);
            sheet.add(content, "1,1,FULL,FULL");

            // Prepare sheet
            border.setAnchor(toolWindow.getAnchor());
            sheet.setBorder(border);

            int height = mainPanel.getHeight();
            Point point = SwingUtilities.convertPoint(mainPanel, 0, 0, layeredPane);

            sheet.setBounds(point.x, point.y, mainPanel.getWidth(), height);

            layeredPane.remove(sheet);
            layeredPane.setLayer(sheet, 100);
            layeredPane.add(sheet);

            if (descriptor.getTypeDescriptor(ToolWindowType.SLIDING).isAnimating())
                slidingAnimation.show(sheet.getBounds());
        } else {
            // Set Layout
            TableLayout layout = (TableLayout) sheet.getLayout();
            layout.setColumn(0, 2);
            layout.setColumn(2, 2);
            layout.setRow(0, 2);
            layout.setRow(2, 2);

            switch (descriptor.getToolWindow().getAnchor()) {
                case TOP:
                case BOTTOM:
                    descriptor.setDividerLocation(sheet.getHeight());
View Full Code Here

    protected void update() {
        // Reset Layout
        configureSlidingIcons();

        TableLayout layout = (TableLayout) sheet.getLayout();
        layout.setColumn(0, 0);
        layout.setColumn(2, 0);
        layout.setRow(0, 0);
        layout.setRow(2, 0);

        if (barContainer != null)
            barContainer.getParent().getLayout().layoutContainer(barContainer.getParent());
        resize();
View Full Code Here

    protected void initComponents() {
        setLayout(new ExtendedTableLayout(new double[][]{{TableLayout.FILL, 1, 14}, {0, TableLayout.FILL, 0}}, false));
        setFocusable(false);

        tabContainer = new JPanel(containerLayout = new TableLayout(new double[][]{{0}, {14}}));
        tabContainer.setOpaque(false);
        tabContainer.setBorder(null);
        tabContainer.setFocusable(false);

        viewport = new JViewport();
View Full Code Here

        fileMenu.add(exitMenuItem);
        menuBar.add(fileMenu);
        this.frame.setJMenuBar(menuBar);

        // Set a layout manager. I love TableLayout. It's powerful.
        this.frame.getContentPane().setLayout(new TableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));
        this.frame.add(new ListScenarioView().getComponent(), "1,1,FULL,FULL");

    }
View Full Code Here

TOP

Related Classes of info.clearthought.layout.TableLayout

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.