Package com.alee.laf.label

Examples of com.alee.laf.label.WebLabel


    private Component createRemovableTitle ( String title, Icon icon, final String id )
    {
        WebPanel removableTitle = new WebPanel ();
        removableTitle.setOpaque ( false );

        WebLabel titleLabel = new WebLabel ( title, icon );
        titleLabel.setMargin ( 0, 2, 0, 4 );
        removableTitle.add ( titleLabel, BorderLayout.CENTER );

        WebButton remove = WebButton.createIconWebButton ( REMOVE_ICON, StyleConstants.smallRound, 2, 2, true );
        remove.setFocusable ( false );
        remove.addActionListener ( new ActionListener ()
View Full Code Here


        final ExampleGroup sg = getSelectedGroup ();

        statusBar.addSpacing ();

        final FeatureState fgs = sg.getFeatureGroupState ();
        final WebLabel featureState = new WebLabel ();
        TooltipManager.setTooltip ( featureState, fgs.getIcon (), fgs.getDescription () );
        featureState.setIcon ( fgs.getIcon () );
        featureState.addMouseListener ( new MouseAdapter ()
        {
            @Override
            public void mousePressed ( final MouseEvent e )
            {
                showLegend ( featureState, getSelectedGroup ().getFeatureGroupState () );
            }
        } );
        statusBar.add ( featureState );

        statusBar.addSpacing ();

        final WebLabel groupDescription = new WebLabel ();
        groupDescription.setText ( sg.getGroupDescription () );
        statusBar.add ( groupDescription );

        exampleTabs.addChangeListener ( new ChangeListener ()
        {
            @Override
            public void stateChanged ( final ChangeEvent e )
            {
                final ExampleGroup sg = getSelectedGroup ();
                final FeatureState fgs = sg.getFeatureGroupState ();
                TooltipManager.removeTooltips ( featureState );
                TooltipManager.setTooltip ( featureState, fgs.getIcon (), fgs.getDescription () );
                featureState.setIcon ( fgs.getIcon () );
                groupDescription.setText ( sg.getGroupDescription () );
            }
        } );

        // Update button
        final WebButton update = WebButton.createIconWebButton ( getUpdateIcon () );
View Full Code Here

        if ( legendPanel == null )
        {
            legendPanel = new WebPanel ( new VerticalFlowLayout () );
            legendPanel.setOpaque ( false );

            legendPanel.add ( new WebLabel ( "<html><center>Every feature is marked with a colored leaf.<br>" +
                    "Each leaf color reflects feature development state.</center></html>", WebLabel.CENTER ) );
            legendPanel.add ( createLegendSeparator () );

            final FeatureState[] values = FeatureState.values ();
            for ( final FeatureState fs : values )
            {
                legendPanel.add ( new WebLabel ( fs.getDescription (), fs.getIcon (), WebLabel.CENTER ).setBoldFont () );
                legendPanel.add ( new WebLabel ( fs.getFullDescription (), WebLabel.CENTER ) );

                if ( !fs.equals ( values[ values.length - 1 ] ) )
                {
                    legendPanel.add ( createLegendSeparator () );
                }
View Full Code Here

        lastComponent = component;
    }

    protected WebLabel createLegendLabel ( final String text, final ImageIcon icon )
    {
        final WebLabel legendLabel = new WebLabel ( text, icon );
        legendLabel.setStyleId ( "legend-label" );
        return legendLabel;
    }
View Full Code Here

        }
    }

    public static WebLabel createDefaultComponent ( final Icon icon, final String tooltip )
    {
        final WebLabel label = new WebLabel ( tooltip, icon );
        label.setStyleId ( "custom-tooltip-label" );
        label.setFont ( WebFonts.getSystemTooltipFont () );
        return label;
    }
View Full Code Here

                {
                    final Component forComponent = hotkeyInfo.getForComponent ();
                    if ( forComponent != null && !shown.contains ( forComponent ) && forComponent.isVisible () &&
                            forComponent.isShowing () && SwingUtils.getWindowAncestor ( forComponent ) == window )
                    {
                        final WebLabel tip = new WebLabel ( HotkeyManager.getComponentHotkeysString ( forComponent ) );
                        tip.setStyleId ( "custom-tooltip-hotkey-label" );
                        tip.setBoldFont ();
                        TooltipManager.showOneTimeTooltip ( forComponent, null, tip, hotkeyInfo.getHotkeyDisplayWay () );
                        shown.add ( forComponent );
                    }
                }
            }
View Full Code Here

     *
     * @param content new notification text content
     */
    public void setContent ( final String content )
    {
        setContent ( new WebLabel ( content ) );
    }
View Full Code Here

     * @param content notification text content
     * @return displayed notification
     */
    public static WebNotification showNotification ( final String content )
    {
        return showNotification ( null, new WebLabel ( content ), NotificationIcon.information.getIcon () );
    }
View Full Code Here

     * @param icon    notification icon
     * @return displayed notification
     */
    public static WebNotification showNotification ( final String content, final Icon icon )
    {
        return showNotification ( null, new WebLabel ( content ), icon );
    }
View Full Code Here

     * @param content notification text content
     * @return displayed notification
     */
    public static WebNotification showNotification ( final Component showFor, final String content )
    {
        return showNotification ( showFor, new WebLabel ( content ), NotificationIcon.information.getIcon () );
    }
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.