Package com.ardor3d.extension.ui

Examples of com.ardor3d.extension.ui.UILabel


        //hud.setMouseManager(_mouseManager);
    }

    private UIPanel makeLoginPanel() {
        final UIPanel pLogin = new UIPanel(new GridLayout());
        final UILabel lHeader = new UILabel("Welcome! Log in to server xyz");
        lHeader.setLayoutData(new GridLayoutData(2, true, true));
        final UILabel lName = new UILabel("Name");
        final UITextField tfName = new UITextField();
        tfName.setText("player1");
        tfName.setLayoutData(GridLayoutData.WrapAndGrow);
        final UILabel lPassword = new UILabel("Password");
        final UIPasswordField tfPassword = new UIPasswordField();
        tfPassword.setLayoutData(GridLayoutData.WrapAndGrow);
        final UIButton btLogin = new UIButton("login");
        btLogin.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent event) {
View Full Code Here


    private UIPanel makeChatPanel() {
        final UIPanel chatPanel = new UIPanel(new BorderLayout());
        final UIPanel bottomPanel = new UIPanel(new BorderLayout());
        bottomPanel.setLayoutData(BorderLayoutData.SOUTH);
        final UILabel dirLabel = new UILabel("Sample chat.  Try using markup like [b]text[/b]:");
        dirLabel.setLayoutData(BorderLayoutData.NORTH);
        final UITextArea historyArea = new UITextArea();
        historyArea.setStyledText(true);
        historyArea.setAlignment(Alignment.BOTTOM_LEFT);
        historyArea.setEditable(false);
        final UIScrollPanel scrollArea = new UIScrollPanel(historyArea);
View Full Code Here

        final UISlider slider = new UISlider(Orientation.Horizontal, 0, 12, 0);
        slider.setSnapToValues(true);
        slider.setMinimumContentWidth(100);

        final UILabel lSliderValue = new UILabel("0");
        lSliderValue.setLayoutData(GridLayoutData.SpanAndWrap(2));
        slider.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent event) {
                lSliderValue.setText(String.valueOf(slider.getValue()));
            }
        });
        centerPanel.add(slider);
        centerPanel.add(lSliderValue);
View Full Code Here

        return clockPanel;
    }

    private UIPanel makeScrollPanel() {
        final Texture tex = TextureManager.load("images/clock.png", Texture.MinificationFilter.Trilinear, false);
        final UILabel comp = new UILabel("");
        comp.setIcon(new SubTex(tex));
        comp.updateIconDimensionsFromIcon();
        final UIScrollPanel panel = new UIScrollPanel(comp);
        return panel;
    }
View Full Code Here

                    // bottom left
                    new SubTex(_sharedTex, 155, 21, 4, 4),
                    // bottom right
                    new SubTex(_sharedTex, 177, 21, 1, 4));

            final UILabel label = component.getValueLabel();
            label.setBackdrop(upBack);
            label.setBorder(labelBorder);
            label.setAlignment(Alignment.LEFT);
            label.setPadding(new Insets(0, 2, 0, 2));
        }

        // drop down button
        {
            final UIBorder buttonBorder = new ImageBorder(
View Full Code Here

        hud.setMouseManager(_mouseManager);

        final UIFrame frame = new UIFrame("Controls", EnumSet.noneOf(FrameButtons.class));
        frame.setResizeable(false);

        final UILabel turnLabel = new UILabel("Turn Speed: " + ROCKET_TURN_SPEED);
        final UISlider turnSlider = new UISlider(Orientation.Horizontal, 0, 250, (int) (ROCKET_TURN_SPEED * 10));
        turnSlider.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent event) {
                ROCKET_TURN_SPEED = turnSlider.getValue() / 10;
                turnLabel.setText("Turn Speed: " + ROCKET_TURN_SPEED);
            }
        });

        final UILabel propelLabel = new UILabel("Propel Speed: " + ROCKET_PROPEL_SPEED);
        final UISlider propelSlider = new UISlider(Orientation.Horizontal, 0, 250, (int) (ROCKET_PROPEL_SPEED));
        propelSlider.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent event) {
                ROCKET_PROPEL_SPEED = propelSlider.getValue();
                propelLabel.setText("Propel Speed: " + ROCKET_PROPEL_SPEED);
            }
        });

        final UILabel ageLabel = new UILabel("Max Age of Smoke: " + age + " ms");
        final UISlider ageSlider = new UISlider(Orientation.Horizontal, 25, 400, age / 10);
        ageSlider.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent event) {
                age = ageSlider.getValue() * 10;
                ageLabel.setText("Max Age of Smoke: " + age + " ms");
                smoke.setMaximumLifeTime(age);
                smoke.setMinimumLifeTime(age / 2);
            }
        });

View Full Code Here

                skipBallCollide = !collide.isSelected();
            }
        });
        _configFrame.getContentPanel().add(collide);

        final UILabel ballsLabel = new UILabel("# of balls:");
        ballsLabel.setLayoutData(new AnchorLayoutData(Alignment.TOP_LEFT, collide, Alignment.BOTTOM_LEFT, 0, -15));
        _configFrame.getContentPanel().add(ballsLabel);

        final ButtonGroup ballsGroup = new ButtonGroup();

        final UIRadioButton balls16 = new UIRadioButton("16");
View Full Code Here

        hud.setMouseManager(_mouseManager);
    }

    private UIPanel makeLoginPanel() {
        final UIPanel pLogin = new UIPanel(new GridLayout());
        final UILabel lHeader = new UILabel("Welcome! Log in to server xyz");
        lHeader.setLayoutData(new GridLayoutData(2, true, true));
        final UILabel lName = new UILabel("Name");
        final UITextField tfName = new UITextField();
        tfName.setText("player1");
        tfName.setLayoutData(GridLayoutData.WrapAndGrow);
        final UILabel lPassword = new UILabel("Password");
        final UIPasswordField tfPassword = new UIPasswordField();
        tfPassword.setLayoutData(GridLayoutData.WrapAndGrow);
        final UIButton btLogin = new UIButton("login");
        btLogin.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent event) {
View Full Code Here

    private UIPanel makeChatPanel() {
        final UIPanel chatPanel = new UIPanel(new BorderLayout());
        final UIPanel bottomPanel = new UIPanel(new BorderLayout());
        bottomPanel.setLayoutData(BorderLayoutData.SOUTH);
        final UILabel dirLabel = new UILabel("Sample chat.  Try using markup like [b]text[/b]:");
        dirLabel.setLayoutData(BorderLayoutData.NORTH);
        final UITextArea historyArea = new UITextArea();
        historyArea.setStyledText(true);
        historyArea.setAlignment(Alignment.BOTTOM_LEFT);
        historyArea.setEditable(false);
        final UIScrollPanel scrollArea = new UIScrollPanel(historyArea);
View Full Code Here

        final UISlider slider = new UISlider(Orientation.Horizontal, 0, 12, 0);
        slider.setSnapToValues(true);
        slider.setMinimumContentWidth(100);

        final UILabel lSliderValue = new UILabel("0");
        lSliderValue.setLayoutData(GridLayoutData.SpanAndWrap(2));
        slider.addActionListener(new ActionListener() {
            public void actionPerformed(final ActionEvent event) {
                lSliderValue.setText(String.valueOf(slider.getValue()));
            }
        });
        centerPanel.add(slider);
        centerPanel.add(lSliderValue);
View Full Code Here

TOP

Related Classes of com.ardor3d.extension.ui.UILabel

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.