Package com.alee.extended.layout

Examples of com.alee.extended.layout.TableLayout


        painter.setTitleAlignment ( SwingConstants.CENTER );

        final WebPanel panel = new WebPanel ( painter );
        panel.setMargin ( 5 );
        final double[][] constraints = { { TableLayout.PREFERRED, TableLayout.FILL }, { TableLayout.PREFERRED, TableLayout.PREFERRED } };
        final TableLayout layout = new TableLayout ( constraints );
        layout.setHGap ( 5 );
        layout.setVGap ( 5 );
        panel.setLayout ( layout );

        panel.add ( new WebLabel ( "Field 1:" ), "0,0" );
        panel.add ( new WebTextField (), "1,0" );
View Full Code Here


    private WebPanel createSecondPanel ()
    {
        final WebPanel panel = new WebPanel ();
        panel.setUndecorated ( false );
        panel.setLayout ( new TableLayout ( new double[][]{ { TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED },
                { TableLayout.PREFERRED, TableLayout.FILL, TableLayout.PREFERRED } } ) );
        panel.setWebColoredBackground ( false );

        final WebPanel northPanel = new WebPanel ();
        northPanel.setPaintSides ( false, false, true, true );
View Full Code Here

    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Grid-layouted container
        TableLayout gridLayout = new TableLayout ( new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED },
                { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED } } );
        WebPanel gridPanel = new WebPanel ( gridLayout );

        // Popup buttons
        gridPanel.add ( new GroupPanel ( createPopupButton ( PopupWay.upLeft ), createPopupButton ( PopupWay.upCenter ),
View Full Code Here

            setIconImages ( WebLookAndFeel.getImages () );
            setDefaultCloseOperation ( WebDialog.DISPOSE_ON_CLOSE );
            setResizable ( false );
            setModal ( true );

            TableLayout layout = new TableLayout ( new double[][]{ { TableLayout.PREFERRED, TableLayout.FILL },
                    { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED } } );
            layout.setHGap ( 5 );
            layout.setVGap ( 5 );
            WebPanel content = new WebPanel ( layout );
            content.setMargin ( 15, 30, 15, 30 );
            content.setOpaque ( false );

            content.add ( new WebLabel ( "Login", WebLabel.TRAILING ), "0,0" );
View Full Code Here

        final WebStepProgress wsp7 = new WebStepProgress ( createProgressIcon ( "ava1.jpg" ), createProgressIcon ( "ava2.jpg" ),
                createProgressIcon ( "ava3.png" ), createProgressIcon ( "ava4.jpg" ) );
        wsp7.setLabelsPosition ( WebStepProgress.TRAILING );
        wsp7.setSelectionMode ( StepSelectionMode.progress );

        final WebPanel container = new WebPanel ( new TableLayout ( new double[][]{ { TableLayout.PREFERRED, 150, TableLayout.PREFERRED },
                { TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
        container.add ( wsp1, "0,0,2,0" );
        container.add ( wsp5, "0,1,0,3" );
        container.add ( wsp2, "1,1" );
        container.add ( wsp3, "1,2" );
View Full Code Here

            final double[] columns =
                    { 20, 1f - group.getContentPartSize (), TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                            TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED,
                            group.getContentPartSize (), 20 };

            final TableLayout groupLayout = new TableLayout ( new double[][]{ columns, rows } );
            groupLayout.setHGap ( 4 );
            groupLayout.setVGap ( 4 );
            groupPanel.setLayout ( groupLayout );

            groupPanel.add ( group.modifySeparator ( createVerticalSeparator () ), "2,0,2," + ( rows.length - 1 ) );
            groupPanel.add ( group.modifySeparator ( createVerticalSeparator () ), "4,0,4," + ( rows.length - 1 ) );
            groupPanel.add ( group.modifySeparator ( createVerticalSeparator () ), "6,0,6," + ( rows.length - 1 ) );
View Full Code Here

    private static Component createPreview ( final WebLookAndFeelDemo owner, final Example example )
    {
        final WebPanel previewPanel = new WebPanel ();
        previewPanel.setOpaque ( false );
        previewPanel.setLayout ( new TableLayout ( new double[][]{ { example.isFillWidth () ? TableLayout.FILL : TableLayout.PREFERRED },
                { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL } } ) );

        previewPanel.add ( example.getPreview ( owner ), "0,1" );

        return previewPanel;
View Full Code Here

    {
        super ();


        final WebPanel topPanel = new WebPanel ();
        topPanel.setLayout ( new TableLayout (
                new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL }, { TableLayout.PREFERRED } } ) );
        topPanel.setOpaque ( false );

        searchPanel = new WebPanel ()
        {
View Full Code Here

        removeAll ();

        // Bottom popup
        if ( popupWay.equals ( PopupWay.downLeft ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED }, { TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "1,0" );
            add ( container, "0,1,1,1" );
        }
        else if ( popupWay.equals ( PopupWay.downCenter ) )
        {
            setLayout ( new TableLayout ( new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL },
                    { TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "1,0" );
            add ( container, "0,1,2,1" );
        }
        else if ( popupWay.equals ( PopupWay.downRight ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED, TableLayout.FILL }, { TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "0,0" );
            add ( container, "0,1,1,1" );
        }
        // Top popup  
        if ( popupWay.equals ( PopupWay.upLeft ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED }, { TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "1,1" );
            add ( container, "0,0,1,0" );
        }
        else if ( popupWay.equals ( PopupWay.upCenter ) )
        {
            setLayout ( new TableLayout ( new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL },
                    { TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "1,1" );
            add ( container, "0,0,2,0" );
        }
        else if ( popupWay.equals ( PopupWay.upRight ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED, TableLayout.FILL }, { TableLayout.PREFERRED, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "0,1" );
            add ( container, "0,0,1,0" );
        }
        // Left popup   
        if ( popupWay.equals ( PopupWay.leftUp ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED }, { TableLayout.FILL, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "1,1" );
            add ( container, "0,0,0,1" );
        }
        else if ( popupWay.equals ( PopupWay.leftCenter ) )
        {
            setLayout ( new TableLayout ( new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED },
                    { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL } } ) );
            add ( copiedButton, "1,1" );
            add ( container, "0,0,0,2" );
        }
        else if ( popupWay.equals ( PopupWay.leftDown ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED }, { TableLayout.PREFERRED, TableLayout.FILL } } ) );
            add ( copiedButton, "1,0" );
            add ( container, "0,0,0,1" );
        }
        // Right popup      
        if ( popupWay.equals ( PopupWay.rightUp ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED }, { TableLayout.FILL, TableLayout.PREFERRED } } ) );
            add ( copiedButton, "0,1" );
            add ( container, "1,0,1,1" );
        }
        else if ( popupWay.equals ( PopupWay.rightCenter ) )
        {
            setLayout ( new TableLayout ( new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED },
                    { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL } } ) );
            add ( copiedButton, "0,1" );
            add ( container, "1,0,1,2" );
        }
        else if ( popupWay.equals ( PopupWay.rightDown ) )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED, TableLayout.PREFERRED }, { TableLayout.PREFERRED, TableLayout.FILL } } ) );
            add ( copiedButton, "0,0" );
            add ( container, "1,0,1,1" );
        }
View Full Code Here

        super ();
        setOpaque ( false );

        if ( centerHor && centerVer )
        {
            setLayout ( new TableLayout ( new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL },
                    { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL } } ) );
            add ( component, "1,1" );
        }
        else if ( centerHor )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL }, { TableLayout.PREFERRED } } ) );
            add ( component, "1,0" );
        }
        else if ( centerVer )
        {
            setLayout ( new TableLayout (
                    new double[][]{ { TableLayout.PREFERRED }, { TableLayout.FILL, TableLayout.PREFERRED, TableLayout.FILL } } ) );
            add ( component, "0,1" );
        }
        else
        {
View Full Code Here

TOP

Related Classes of com.alee.extended.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.