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

Examples of org.noos.xing.mydoggy.plaf.ui.layout.ExtendedTableLayout


    splitPane.setFocusCycleRoot(true);

    contentPane = new JPanel();
    if (anchor == ToolWindowAnchor.LEFT || anchor == ToolWindowAnchor.RIGHT) {
      horizontal = false;
      contentPane.setLayout(new ExtendedTableLayout(new double[][]{COLUMNS, {0}}));
      orientation = JSplitPane.VERTICAL_SPLIT;
    } else if (anchor == ToolWindowAnchor.TOP || anchor == ToolWindowAnchor.BOTTOM) {
      horizontal = true;
      contentPane.setLayout(new ExtendedTableLayout(new double[][]{{0}, ROWS}));
      orientation = JSplitPane.HORIZONTAL_SPLIT;
    }

    toolScrollBar = new JToolScrollBar(orientation, contentPane);
View Full Code Here


        this.frame = new JFrame("MyDoggy-Set...");
        this.frame.setSize(640, 480);
        this.frame.setLocation(100, 100);
        this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.frame.getContentPane().setLayout(new ExtendedTableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));

        this.contentPane = this.frame.getContentPane();

        JMenuBar menuBar = new JMenuBar();
View Full Code Here

        this.frame = new JFrame("MyDoggy-Set...");
        this.frame.setSize(640, 480);
        this.frame.setLocation(100, 100);
        this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.frame.getContentPane().setLayout(new ExtendedTableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));

        JMenuBar menuBar = new JMenuBar();

        // File Menu
        JMenu fileMenu = new JMenu("File");
View Full Code Here

        viewport.setView(container);
        viewport.addMouseWheelListener(new WheelScroller());

        switch (orientation) {
            case JSplitPane.VERTICAL_SPLIT:
                setLayout(new ExtendedTableLayout(new double[][]{{TableLayout.FILL}, {0, TableLayout.FILL, 0}}));
                add(renderArrow("U", "arrowUp"), "0,0,c,c");
                add(viewport, "0,1,FULL,FULL");
                add(renderArrow("D", "arrowDown"), "0,2,c,c");

                break;
            case JSplitPane.HORIZONTAL_SPLIT:
                setLayout(new ExtendedTableLayout(new double[][]{{0, TableLayout.FILL, 0}, {TableLayout.FILL}}));
                add(renderArrow("U", "arrowLeft"), "0,0,c,c");
                add(viewport, "1,0,FULL,FULL");
                add(renderArrow("D", "arrowRight"), "2,0,c,c");

                break;
View Full Code Here

    private void initFloatingComponents() {
        window = new JModalWindow(descriptor.getWindowAnchestor(), null, false);
        window.setName("toolWindow.floating.window." + toolWindow.getId());

        JPanel contentPane = new JPanel(new ExtendedTableLayout(new double[][]{{1, TableLayout.FILL, 1}, {1, TableLayout.FILL, 1}}));
        contentPane.setBorder(BorderFactory.createLineBorder(Color.GRAY));
        window.setContentPane(contentPane);
    }
View Full Code Here

        applicationBarMouseAdapter = new ApplicationBarMouseAdapter();
        ActionListener applicationBarActionListener = new ApplicationBarActionListener();

        // Container
        container = new JPanel(new ExtendedTableLayout(new double[][]{{TableLayout.FILL}, {16, TableLayout.FILL}}, false));
        container.setName("toolWindow.container." + toolWindow.getId());
        container.setBorder(new LineBorder(Color.GRAY, 1, true, 3, 3));
        container.setFocusCycleRoot(true);

        String id = toolWindow.getId();

        // Application Bar
        ExtendedTableLayout applicationBarLayout = new ExtendedTableLayout(new double[][]{{3, TableLayout.FILL, 2, 15, 2, 15, 2, 15, 2, 15, 2, 15, 3}, {1, 14, 1}}, false);
        applicationBar = new JPanel(applicationBarLayout) {
            public void setUI(PanelUI ui) {
                if (ui instanceof ApplicationBarPanelUI)
                    super.setUI(ui);
            }
        };
        applicationBar.setName("toolWindow.bar." + toolWindow.getId());
        applicationBar.setBorder(null);
        applicationBar.setEnabled(false);
        applicationBar.setUI(new ApplicationBarPanelUI(descriptor, this));
        applicationBar.addMouseListener(applicationBarMouseAdapter);

        applicationBarLayout.setColumn(0, applicationBar.getFontMetrics(
                applicationBar.getFont()
        ).stringWidth(id) + 12);

        // Tabs
        applicationBarTabs = new ToolWindowTabPanel(this, toolWindow);
View Full Code Here

                        GlassPanel glassPane = (GlassPanel) rootPaneContainer.getGlassPane();

                        if (previewPanel != null)
                            glassPane.remove(previewPanel);

                        previewPanel = new TranslucentPanel(new ExtendedTableLayout(new double[][]{{2, TableLayout.FILL, 2}, {2, TableLayout.FILL, 2}}));
                        previewPanel.setAlpha(dockedTypeDescriptor.getPreviewTransparentRatio());
                        previewPanel.setSize(width + 4, height + 4);

                        Container mainContainer = descriptor.getManager();
                        switch (descriptor.getToolWindow().getAnchor()) {
View Full Code Here

        if (lastPosition != null && lastPosition.equals(dtdeLocation))
            return lastIndex;

        int index = -1;

        ExtendedTableLayout tableLayout = (ExtendedTableLayout) container.getLayout();
        double sum = 0;
        int position;
        int[] intervals;

        switch (anchor) {
            case TOP:
            case BOTTOM:
                position = dtdeLocation.x;
                intervals = tableLayout.getColsInPixel();
                break;
            case LEFT:
            case RIGHT:
                position = dtdeLocation.y;
                intervals = tableLayout.getRowsInPixel();
                break;
            default:
                throw new IllegalStateException("Invalid anchor.");
        }
View Full Code Here

        this.frame = new JFrame("MyDoggy-Set...");
        this.frame.setSize(640, 480);
        this.frame.setLocation(100, 100);
        this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.frame.getContentPane().setLayout(new ExtendedTableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));

        JMenuBar menuBar = new JMenuBar();

        // File Menu
        JMenu fileMenu = new JMenu("File");
View Full Code Here

                return group;
            }
        });

        // Init gui
        contentPaneLayout = new ExtendedTableLayout(new double[][]{{0, TableLayout.FILL, 0}, {0, TableLayout.FILL, 0}});
        setLayout(contentPaneLayout);

        // Register bars, one for every anchor
        addBar(LEFT, JSplitPane.HORIZONTAL_SPLIT, "0,1", "0,0,c,c");
        addBar(RIGHT, JSplitPane.HORIZONTAL_SPLIT, "2,1", "2,0,c,c");
        addBar(TOP, JSplitPane.VERTICAL_SPLIT, "1,0", "2,2,c,c");
        addBar(BOTTOM, JSplitPane.VERTICAL_SPLIT, "1,2", "0,2,c,c");

        mainContainer = new JPanel();
        mainContainer.setName("toolWindowManager.mainContainer");
        mainContainer.setBackground(Color.GRAY);
        mainContainer.setLayout(new ExtendedTableLayout(new double[][]{{-1}, {-1}}));
        mainContainer.setFocusCycleRoot(true);

        getBar(BOTTOM).getSplitPane().setTopComponent(getBar(TOP).getSplitPane());
        getBar(TOP).getSplitPane().setBottomComponent(getBar(LEFT).getSplitPane());
        getBar(LEFT).getSplitPane().setRightComponent(getBar(RIGHT).getSplitPane());
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.ui.layout.ExtendedTableLayout

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.