Package com.alee.laf.text

Examples of com.alee.laf.text.WebTextField


        // Popup itself
        WebButtonPopup popup = new WebButtonPopup ( showPopup, way );

        // Sample popup content
        WebLabel label = new WebLabel ( "Sample label", WebLabel.CENTER );
        WebTextField field = new WebTextField ( "Sample field", 10 );
        field.setHorizontalAlignment ( SwingConstants.CENTER );
        GroupPanel content = new GroupPanel ( 5, false, label, field );
        content.setMargin ( 15 );

        // Setup popup content
        popup.setContent ( content );
View Full Code Here


        label.setPainter ( painter ).setMargin ( 5 ).setForeground ( Color.WHITE );

        // State-dependant 9-patch styling
        final NinePatchStatePainter statePainter = NinePatchUtils.loadNinePatchStatePainter ( getResource ( "styling.xml" ) );

        final WebTextField field1 = new WebTextField ( "State-dependant" );
        field1.setPainter ( statePainter );

        final WebTextField field2 = new WebTextField ( "nine-patch" );
        field2.setPainter ( statePainter );

        final WebTextField field3 = new WebTextField ( "styling" );
        field3.setPainter ( statePainter );

        return new GroupPanel ( 4, false, label, new GroupPanel ( 4, field1, field2, field3 ) );
    }
View Full Code Here

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

    {
        // Painters used for example fields
        final NinePatchStatePainter painter1 = NinePatchUtils.loadNinePatchStatePainter ( getResource ( "field.xml" ) );

        // Text field
        final WebTextField textField = new WebTextField ( "Styled text field" );
        textField.setPainter ( painter1 );
        textField.setForeground ( Color.WHITE );

        // Password field
        final WebPasswordField passwordField = new WebPasswordField ( "Styled password field" );
        passwordField.setPainter ( painter1 );
        passwordField.setForeground ( Color.WHITE );

        // Field with trailing component
        final WebTextField componentField = new WebTextField ( "Styled text field with leading component" );
        componentField.setFieldMargin ( 0, 0, 0, 6 );
        componentField.setPainter ( NinePatchUtils.loadNinePatchStatePainter ( getResource ( "sfield.xml" ) ) );
        componentField.setForeground ( Color.WHITE );
        final WebButton sButton = new WebButton ();
        sButton.setFocusable ( false );
        sButton.setUndecorated ( true );
        sButton.setLeftRightSpacing ( 0 );
        sButton.setMoveIconOnPress ( false );
        sButton.setCursor ( Cursor.getDefaultCursor () );
        sButton.setIcon ( searchIcon );
        sButton.setPressedIcon ( pSearchIcon );
        componentField.setTrailingComponent ( sButton );

        return new GroupPanel ( false, textField, passwordField, componentField );
    }
View Full Code Here

            WebPanel content = new WebPanel ( layout );
            content.setMargin ( 15, 30, 15, 30 );
            content.setOpaque ( false );

            content.add ( new WebLabel ( "Login", WebLabel.TRAILING ), "0,0" );
            content.add ( new WebTextField ( 15 ), "1,0" );

            content.add ( new WebLabel ( "Password", WebLabel.TRAILING ), "0,1" );
            content.add ( new WebPasswordField ( 15 ), "1,1" );

            WebButton login = new WebButton ( "Login" );
View Full Code Here

    @Override
    public Component getPreview ( WebLookAndFeelDemo owner )
    {
        // Simple text field
        WebTextField textField1 = new WebTextField ( "Simple", 15 );

        // Non-editable text field
        WebTextField textField2 = new WebTextField ( "Non-editabled", 15 );
        textField2.setEditable ( false );

        return new GroupPanel ( false, textField1, textField2 );
    }
View Full Code Here

                showClassSearchPopup ();
            }
        } );


        classSearchField = new WebTextField ( 20, false );
        classSearchField.setHideInputPromptOnFocus ( false );
        classSearchField.setInputPrompt ( "Enter class name here..." );
        HotkeyManager.registerHotkey ( classSearchField, Hotkey.ESCAPE, new HotkeyRunnable ()
        {
            @Override
View Full Code Here

        topPanel.add ( leftLine, "0,0" );
        topPanel.add ( searchPlate, "1,0" );
        topPanel.add ( rightLine, "2,0" );


        searchField = new WebTextField ( 15 );
        TooltipManager.setTooltip ( searchField, searchIcon, "Quick components search", TooltipWay.down );
        searchField.setPainter ( new NinePatchIconPainter ( SlidingSearch.class.getResource ( "icons/searchField.png" ) ) );
        searchField.setForeground ( Color.WHITE );
        searchField.setCaretColor ( Color.LIGHT_GRAY );
        searchField.setHorizontalAlignment ( WebTextField.CENTER );
View Full Code Here

            hostLabel.setLanguage ( "weblaf.proxy.auth.host" );
            hostLabel.setHorizontalAlignment ( WebLabel.RIGHT );
            hostLabel.setEnabled ( false );
            authPanel.add ( hostLabel, "0,0" );

            final WebTextField hostValue = new WebTextField ( proxySettings.getProxyHost (), 10 );
            hostValue.setEnabled ( false );
            hostValue.putClientProperty ( GroupPanel.FILL_CELL, true );

            final WebLabel portLabel = new WebLabel ();
            portLabel.setLanguage ( "weblaf.proxy.auth.port" );
            portLabel.setHorizontalAlignment ( WebLabel.RIGHT );
            portLabel.setEnabled ( false );

            final WebTextField portValue = new WebTextField ( proxySettings.getProxyPort () );
            portValue.setEnabled ( false );

            authPanel.add ( new GroupPanel ( 2, hostValue, portLabel, portValue ), "1,0" );


            authPanel.add ( new WebSeparator ( WebSeparator.HORIZONTAL ), "0,1,1,1" );


            final WebLabel loginLabel = new WebLabel ();
            loginLabel.setLanguage ( "weblaf.proxy.auth.login" );
            loginLabel.setHorizontalAlignment ( WebLabel.RIGHT );
            authPanel.add ( loginLabel, "0,2" );

            loginField = new WebTextField ( 12 );
            loginField.addAncestorListener ( new AncestorAdapter ()
            {
                @Override
                public void ancestorAdded ( final AncestorEvent event )
                {
View Full Code Here

        final WebBreadcrumb updateBreadcrumb = new WebBreadcrumb ( false );
        updateBreadcrumb.setEncloseLastElement ( false );

        final ImageIcon updateIcon = new ImageIcon ( StyleEditor.class.getResource ( "icons/editor/update.png" ) );
        final WebLabel delayLabel = new WebLabel ( "Skin update delay:", updateIcon );
        final WebTextField delayField = new WebTextField ( new IntTextDocument (), "" + updateDelay, 3 );
        delayField.setShadeWidth ( 0 );
        delayField.setHorizontalAlignment ( WebTextField.CENTER );
        delayField.getDocument ().addDocumentListener ( new IntDocumentChangeListener ()
        {
            @Override
            public void documentChanged ( final Integer newValue, final DocumentEvent e )
            {
                updateDelay = newValue != null ? newValue : updateDelay;
View Full Code Here

TOP

Related Classes of com.alee.laf.text.WebTextField

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.