Package com.alee.laf.checkbox

Examples of com.alee.laf.checkbox.WebCheckBox


        panel.add ( new WebLabel ( "Field 1:" ), "0,0" );
        panel.add ( new WebTextField (), "1,0" );

        panel.add ( new WebLabel ( "Field 2:" ), "0,1" );
        panel.add ( new WebCheckBox ( "Some check" ), "1,1" );

        return panel;
    }
View Full Code Here


        SwingUtils.setFontSize ( textField, 8 );
        panel2.add ( textField );
        b.add ( panel2 );

        // Check box panel
        b.add ( new WebBreadcrumbPanel ( new WebCheckBox ( "Check box" ) ) );
    }
View Full Code Here

        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 );
View Full Code Here

    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Text field with checkbox as leading component
        WebTextField leading = new WebTextField ( "Leading", 10 );
        leading.setMargin ( 0, 2, 0, 0 );
        WebCheckBox checkBox = new WebCheckBox ();
        checkBox.setCursor ( Cursor.getDefaultCursor () );
        checkBox.setSelected ( true );
        checkBox.setFocusable ( false );
        leading.setLeadingComponent ( checkBox );

        // Text field with image as trailing component
        WebTextField trailing = new WebTextField ( "Trailing", 10 );
        trailing.setMargin ( 0, 0, 0, 2 );
View Full Code Here

                    final TitledBorderPainter titledBorderPainter = new TitledBorderPainter ( "Window settings" );
                    titledBorderPainter.setTitleOffset ( 10 );
                    titledBorderPainter.setRound ( Math.max ( 0, ExampleFrame.this.getRound () - 2 ) );
                    setPainter ( titledBorderPainter );

                    final WebCheckBox showTitle = new WebCheckBox ( "Show title" )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowTitleComponent () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setShowTitleComponent ( isSelected () );
                                    ExampleFrame.this.pack ();
                                }
                            } );
                        }
                    };
                    add ( new GroupPanel ( 10, showTitle, new WebTextField ( ExampleFrame.this.getTitle (), 1 )
                    {
                        {
                            putClientProperty ( GroupPanel.FILL_CELL, true );
                            setEnabled ( showTitle.isSelected () );
                            showTitle.addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    setEnabled ( showTitle.isSelected () );
                                }
                            } );
                            addCaretListener ( new CaretListener ()
                            {
                                @Override
                                public void caretUpdate ( CaretEvent e )
                                {
                                    if ( !ExampleFrame.this.getTitle ().equals ( getText () ) )
                                    {
                                        ExampleFrame.this.setTitle ( getText () );
                                        ExampleFrame.this.pack ();
                                    }
                                }
                            } );
                        }
                    } ) );

                    add ( new WebSeparator ( false, true ) );

                    final WebCheckBox showWindowButtons = new WebCheckBox ( "Show window buttons" )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowWindowButtons () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setShowWindowButtons ( isSelected () );
                                    ExampleFrame.this.pack ();
                                }
                            } );
                        }
                    };
                    add ( new GroupPanel ( 10, showWindowButtons, new WebButtonGroup ( new WebToggleButton ( WebRootPaneUI.minimizeIcon )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowMinimizeButton () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setShowMinimizeButton ( isSelected () );
                                }
                            } );
                        }
                    }, new WebToggleButton ( WebRootPaneUI.maximizeIcon )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowMaximizeButton () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setShowMaximizeButton ( isSelected () );
                                }
                            } );
                        }
                    }, new WebToggleButton ( WebRootPaneUI.closeIcon )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowCloseButton () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setShowCloseButton ( isSelected () );
                                }
                            } );
                        }
                    }
                    )
                    {
                        {
                            setButtonsMargin ( 2, 4, 2, 4 );
                            setButtonsDrawFocus ( false );
                            setEnabled ( showWindowButtons.isSelected () );
                            showWindowButtons.addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    setEnabled ( showWindowButtons.isSelected () );
                                }
                            } );
                        }
                    } ) );

                    add ( new WebCheckBox ( "Attach window buttons to sides" )
                    {
                        {
                            setSelected ( ExampleFrame.this.isAttachButtons () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setAttachButtons ( isSelected () );
                                    ExampleFrame.this.pack ();
                                }
                            } );
                        }
                    } );

                    add ( new WebCheckBox ( "Group window buttons" )
                    {
                        {
                            setSelected ( ExampleFrame.this.isGroupButtons () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setGroupButtons ( isSelected () );
                                    ExampleFrame.this.pack ();
                                }
                            } );
                        }
                    } );

                    add ( new WebSeparator ( false, true ) );

                    final WebCheckBox showMenuBar = new WebCheckBox ( "Show menu bar" )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowMenuBar () );
                            addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    ExampleFrame.this.setShowMenuBar ( isSelected () );
                                    ExampleFrame.this.pack ();
                                }
                            } );
                        }
                    };
                    add ( new GroupPanel ( 10, showMenuBar, new WebComboBox ( new String[]{ "undecorated", "attached", "standalone" } )
                    {
                        {
                            addActionListener ( new ActionListener ()
                            {
                                @Override
                                public void actionPerformed ( ActionEvent e )
                                {
                                    int i = getSelectedIndex ();
                                    if ( i == 0 )
                                    {
                                        menuBar.setUndecorated ( true );
                                    }
                                    else
                                    {
                                        menuBar.setUndecorated ( false );
                                        menuBar.setMenuBarStyle ( i == 1 ? MenuBarStyle.attached : MenuBarStyle.standalone );
                                    }
                                    ExampleFrame.this.pack ();
                                }
                            } );
                            setEnabled ( showMenuBar.isSelected () );
                            showMenuBar.addItemListener ( new ItemListener ()
                            {
                                @Override
                                public void itemStateChanged ( ItemEvent e )
                                {
                                    setEnabled ( showMenuBar.isSelected () );
                                }
                            } );
                        }
                    } ) );

                    add ( new WebSeparator ( false, true ) );

                    add ( new WebCheckBox ( "Show resize corner" )
                    {
                        {
                            setSelected ( ExampleFrame.this.isShowResizeCorner () );
                            addItemListener ( new ItemListener ()
                            {
View Full Code Here

     */
    @Override
    public Component getPreview ( final WebLookAndFeelDemo owner )
    {
        // Animated check box
        final WebCheckBox checkBoxA = new WebCheckBox ( "Animated checkbox" );

        // Static check box
        final WebCheckBox checkBoxS = new WebCheckBox ( "Static checkbox" );
        checkBoxS.setAnimated ( false );

        return new GroupPanel ( 4, false, checkBoxA, checkBoxS );
    }
View Full Code Here

     */
    @Override
    public boolean shouldUseSystemProxy ()
    {
        // Whether should save the choice or not
        alwaysDoTheSame = new WebCheckBox ();
        alwaysDoTheSame.setLanguage ( "weblaf.proxy.use.system.save" );
        alwaysDoTheSame.setSelected ( false );
        alwaysDoTheSame.setFocusable ( false );

        // Ask for settings replacement with system ones
View Full Code Here

            SwingUtils.equalizeComponentsHeights ( hostValue, loginField, passwordField );

            setContent ( authPanel );


            saveSettings = new WebCheckBox ( "Save proxy settings" );
            saveSettings.registerSettings ( ProxyManager.SETTINGS_GROUP, ProxyManager.SAVE_SETTINGS, true );
            setSpecialComponent ( saveSettings );
        }
View Full Code Here

    {
        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" );
        webOnly.setSelected ( isWebOnlyColors () );
        webOnly.setMargin ( 0, 5, 0, 5 );
        webOnly.addActionListener ( new ActionListener ()
        {
            @Override
            public void actionPerformed ( final ActionEvent e )
            {
                setWebOnlyColors ( webOnly.isSelected () );
            }
        } );
        buttonsPanel.add ( webOnly );

        final WebButton ok = new WebButton ();
View Full Code Here

        return editor;
    }

    private static WebCheckBox createEditorComponent ()
    {
        final WebCheckBox editor = new WebCheckBox ();
        editor.setHorizontalAlignment ( JCheckBox.CENTER );
        editor.setAnimated ( false );
        editor.setOpaque ( true );
        editor.setFocusable ( false );
        editor.setShadeWidth ( 0 );
        editor.setIconWidth ( 12 );
        editor.setIconHeight ( 12 );
        return editor;
    }
View Full Code Here

TOP

Related Classes of com.alee.laf.checkbox.WebCheckBox

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.