Package com.alee.laf.label

Examples of com.alee.laf.label.WebLabel


    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Left part content
        WebLabel leftLabel = new WebLabel ( "left", WebLabel.CENTER );
        leftLabel.setMargin ( 5 );
        WebPanel leftPanel = new WebPanel ( true, leftLabel );

        // Right part content
        WebLabel rightLabel = new WebLabel ( "right", WebLabel.CENTER );
        rightLabel.setMargin ( 5 );
        WebPanel rightPanel = new WebPanel ( true, rightLabel );

        // Split
        WebSplitPane splitPane = new WebSplitPane ( HORIZONTAL_SPLIT, leftPanel, rightPanel );
        splitPane.setOneTouchExpandable ( true );
View Full Code Here


    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Top part content
        WebLabel topLabel = new WebLabel ( "top", WebLabel.CENTER );
        topLabel.setMargin ( 5 );
        WebPanel topPanel = new WebPanel ( true, topLabel );

        // Bottom part content
        WebLabel bottomLabel = new WebLabel ( "bottom", WebLabel.CENTER );
        bottomLabel.setMargin ( 5 );
        WebPanel bottomPanel = new WebPanel ( true, bottomLabel );

        // Split
        WebSplitPane splitPane = new WebSplitPane ( VERTICAL_SPLIT, topPanel, bottomPanel );
        splitPane.setOneTouchExpandable ( true );
View Full Code Here

     */
    @Override
    public Component getPreview ( final WebLookAndFeelDemo owner )
    {
        type = new WebComboBox ( DynamicMenuType.values (), DynamicMenuType.shutter );
        final GroupPanel tg = new GroupPanel ( 5, new WebLabel ( "Display animation:" ), type );

        hidingType = new WebComboBox ( DynamicMenuType.values (), DynamicMenuType.star );
        final GroupPanel htg = new GroupPanel ( 5, new WebLabel ( "Hide animation:" ), hidingType );

        radius = new WebTextField ( new IntTextDocument (), "70", 4 );
        final GroupPanel rg = new GroupPanel ( 5, new WebLabel ( "Menu radius:" ), radius );

        itemsAmount = new WebTextField ( new IntTextDocument (), "5", 4 );
        final GroupPanel iag = new GroupPanel ( 5, new WebLabel ( "Items amount:" ), itemsAmount );

        drawBorder = new WebCheckBox ( "Show custom border", true );

        final WebPanel clickPanel = new WebPanel ( true );
        clickPanel.setWebColoredBackground ( false );
        clickPanel.setShadeWidth ( 20 );
        clickPanel.setBackground ( Color.WHITE );
        clickPanel.add ( new WebLabel ( "Click with left mouse button here to show menu", WebLabel.CENTER ) );
        clickPanel.addMouseListener ( new MouseAdapter ()
        {
            @Override
            public void mousePressed ( final MouseEvent e )
            {
View Full Code Here

    {
        // Panel with focusable field
        final WebPanel panel1 = new WebPanel ( true );
        panel1.setPaintFocus ( true );
        panel1.setMargin ( 10 );
        panel1.add ( new WebLabel ( "Some field:", WebLabel.CENTER ), BorderLayout.NORTH );
        panel1.add ( new WebTextField ( "TextField", 6 ), BorderLayout.CENTER );

        // Panel with focusable button
        final WebPanel panel2 = new WebPanel ( true );
        panel2.setPaintFocus ( true );
        panel2.setMargin ( 10 );
        panel2.add ( new WebLabel ( "Some button:", WebLabel.CENTER ), BorderLayout.NORTH );
        panel2.add ( new WebButton ( "Button" ), BorderLayout.CENTER );

        // Panel with focusable combobox
        final WebPanel panel3 = new WebPanel ( true );
        panel3.setPaintFocus ( true );
        panel3.setMargin ( 10 );
        panel3.add ( new WebLabel ( "Some combo:", WebLabel.CENTER ), BorderLayout.NORTH );
        panel3.add ( new WebComboBox ( new String[]{ "ComboBox" } ), BorderLayout.CENTER );

        // Equalizing panel widths
        SwingUtils.equalizeComponentsWidths ( panel1, panel2, panel3 );
View Full Code Here

        // Custom content
        switch ( location )
        {
            case NORTH:
            {
                panel.add ( new WebLabel ( "North panel", WebLabel.CENTER ) );
                break;
            }
            case SOUTH:
            {
                panel.add ( new WebLabel ( "South panel", WebLabel.CENTER ) );
                break;
            }
            case WEST:
            {
                panel.add ( new WebVerticalLabel ( "West panel", WebLabel.CENTER, false ) );
                break;
            }
            case EAST:
            {
                panel.add ( new WebVerticalLabel ( "East panel", WebLabel.CENTER, true ) );
                break;
            }
            case CENTER:
            {
                panel.add ( new WebLabel ( "Center panel", WebLabel.CENTER ) );
                break;
            }
        }
    }
View Full Code Here

    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Simple label
        WebLabel simpleLabel = new WebLabel ( "Simple label" );

        // Iconed label
        WebLabel iconedLabel = new WebLabel ( "Iconed label", loadIcon ( "icon.png" ) );

        return new GroupPanel ( 4, false, simpleLabel, iconedLabel );
    }
View Full Code Here

    @Override
    public Component getPreview ( final WebLookAndFeelDemo owner )
    {
        // You can show any kind of content inside the tooltip
        final WebLabel tip = new WebLabel ( "Custom content tooltip", loadIcon ( "web.png" ) );
        TooltipManager.setTooltip ( tip, new WheelImage (), TooltipWay.trailing, 0 ).setLeftRightSpacing ( 0 );
        tip.setMargin ( 4 );

        return new GroupPanel ( tip );
    }
View Full Code Here

    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // This is custom tooltip set by TooltipManager
        WebLabel tip = new WebLabel ( "Default " + TooltipManager.getDefaultDelay () + "ms delay", loadIcon ( "web.png" ) );
        TooltipManager.setTooltip ( tip, "Delayed custom tooltip", TooltipWay.trailing );
        tip.setMargin ( 4 );

        return new GroupPanel ( tip );
    }
View Full Code Here

    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Iconed tooltip
        WebLabel tip = new WebLabel ( "Iconed tooltip", loadIcon ( "web.png" ) );
        TooltipManager.setTooltip ( tip, loadIcon ( "tooltip.png" ), "Tooltip text", TooltipWay.trailing, 0 );
        tip.setMargin ( 4 );

        return new GroupPanel ( tip );
    }
View Full Code Here

            {
                final WebPopOver popOver = new WebPopOver ( owner );
                popOver.setCloseOnFocusLoss ( true );
                popOver.setMargin ( 10 );
                popOver.setLayout ( new VerticalFlowLayout () );
                popOver.add ( new WebLabel ( "1. This is simple detached pop-over dialog" ) );
                popOver.add ( new WebLabel ( "2. You can move pop-over by dragging it" ) );
                popOver.add ( new WebLabel ( "3. Pop-over will get closed if loses focus" ) );
                popOver.show ( owner );
            }
        } );
        return new GroupPanel ( showDialog );
    }
View Full Code Here

TOP

Related Classes of com.alee.laf.label.WebLabel

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.