Package com.alee.extended.layout

Examples of com.alee.extended.layout.ToolbarLayout


    @Override
    public Component getPreview ( final WebLookAndFeelDemo owner )
    {
        final WebPanel container = new WebPanel ( new TexturePainter ( loadIcon ( "bg1.png" ) ) );

        final WebPanel panel = new WebPanel ( new ToolbarLayout ( 0, 0, ToolbarLayout.VERTICAL ) );
        panel.setPainter ( new ShadeBackgroundPainter ( ImageUtils.getBufferedImage ( loadIcon ( "bg2.png" ) ) ) );
        container.add ( panel );

        final WebLabel titleLabel = new WebLabel ( "Custom-styled label" )
        {
            @Override
            protected void paintComponent ( final Graphics g )
            {
                super.paintComponent ( g );
                DebugUtils.paintBorderDebugInfo ( g, this );
            }
        };
        titleLabel.setBoldFont ();
        titleLabel.setForeground ( Color.WHITE );
        titleLabel.setHorizontalAlignment ( SwingConstants.CENTER );
        panel.add ( titleLabel, ToolbarLayout.START );

        final WebPanel innerPanel = new WebPanel ( new VerticalFlowLayout ( 15, 15 ) )
        {
            @Override
            protected void paintComponent ( final Graphics g )
            {
                super.paintComponent ( g );
                DebugUtils.paintBorderDebugInfo ( g, this );
            }
        };
        innerPanel.setPainter ( new ShadeBackgroundPainter ( null ) );
        panel.add ( innerPanel, ToolbarLayout.END );

        innerPanel.add ( new WebLabel ( "Card", loadIcon ( "type1.png" ) ) );
        innerPanel.add ( new WebLabel ( "Document", loadIcon ( "type2.png" ) ) );
        innerPanel.add ( new WebLabel ( "Folder", loadIcon ( "type3.png" ) ) );

        final WebPanel ppp = new WebPanel ( new ToolbarLayout ( 0, 0, ToolbarLayout.VERTICAL ) );
        ppp.setPainter ( new ShadeBackgroundPainter ( null ) );
        ppp.setShadeWidth ( 20 );
        ppp.add ( new WebLabel ( "123" ) );
        ppp.add ( new WebLabel ( "345" )
        {
View Full Code Here


    {
        super ();

        this.jarStructure = jarStructure;

        toolBar = new WebPanel ( true, new ToolbarLayout () );
        toolBar.setPaintSides ( false, false, true, false );
        toolBar.setShadeWidth ( 0 );
        add ( toolBar, BorderLayout.NORTH );

        classPath = new WebBreadcrumb ( false );
View Full Code Here

    public WebStatusBar ()
    {
        super ();
        SwingUtils.setOrientation ( this );
        setLayout ( new ToolbarLayout () );
        updateBorder ();
    }
View Full Code Here

     * @return south panel content
     */
    protected Component createSouthContent ()
    {
        final WebPanel southPanel = new WebPanel ();
        southPanel.setLayout ( new ToolbarLayout ( 4 ) );
        southPanel.setOpaque ( false );
        southPanel.setMargin ( 0, 4, 4, 4 );
        add ( southPanel, BorderLayout.SOUTH );

        final WebLabel selectedFilesLabel = new WebLabel ();
View Full Code Here

        return buttonsPanel;
    }

    private WebPanel createButtonsPanel ()
    {
        final WebPanel buttonsPanel = new WebPanel ( new ToolbarLayout ( 2, ToolbarLayout.HORIZONTAL ) );
        buttonsPanel.setOpaque ( false );
        buttonsPanel.setMargin ( 5, 0, 3, 0 );

        final WebCheckBox webOnly = new WebCheckBox ();
        webOnly.setLanguage ( "weblaf.colorchooser.webonly" );
View Full Code Here

        }
    }

    private void updateLayout ( final JComponent c )
    {
        final ToolbarLayout layout = new ToolbarLayout ( spacing, toolBar.getOrientation () );
        if ( c.getLayout () instanceof ToolbarLayout )
        {
            final ToolbarLayout old = ( ToolbarLayout ) c.getLayout ();
            layout.setConstraints ( old.getConstraints () );
        }
        c.setLayout ( layout );
    }
View Full Code Here

    public Dimension getPreferredSize ()
    {
        final Container container = getParent ();
        if ( container != null && container.getLayout () instanceof ToolbarLayout )
        {
            final ToolbarLayout layout = ( ToolbarLayout ) container.getLayout ();
            return new Dimension ( layout.getOrientation () != VERTICAL ? spacing : 0,
                    layout.getOrientation () != HORIZONTAL ? spacing : 0 );
        }
        else
        {
            return new Dimension ( orientation != VERTICAL ? spacing : 0, orientation != HORIZONTAL ? spacing : 0 );
        }
View Full Code Here

        super.installUI ( c );

        // Default settings
        SwingUtils.setOrientation ( menuBar );
        LookAndFeel.installProperty ( menuBar, WebLookAndFeel.OPAQUE_PROPERTY, Boolean.FALSE );
        menuBar.setLayout ( new ToolbarLayout ( 0 ) );

        // Updating border
        updateBorder ();
    }
View Full Code Here

TOP

Related Classes of com.alee.extended.layout.ToolbarLayout

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.