Package com.vaadin.ui

Examples of com.vaadin.ui.Label


        // Initial body are comes from Welcome.html
        setBody("Welcome");

        // Add heading label and custom layout panel to main window
        mainWindow.addComponent(new Label("<h3>Custom layout demo</h3>",
                ContentMode.HTML));
        mainWindow.addComponent(customLayoutPanel);
    }
View Full Code Here


        username.setVisible(false);
        loginPwd.setVisible(false);
        if (username.getValue().toString().length() < 1) {
            username.setValue("Anonymous");
        }
        mainLayout.replaceComponent(loginButton, new Label("Welcome user <em>"
                + username.getValue() + "</em>", ContentMode.HTML));
    }
View Full Code Here

        createNewView();
    }

    public void createNewView() {
        main.removeAllComponents();
        main.addComponent(new Label("SDFGFHFHGJGFDSDSSSGFDD"));

        final Link l = new Link();
        l.setCaption("Siirry Vaadiniin");
        l.setResource(new ExternalResource("http://www.vaadin.com/"));
        l.setTargetHeight(200);
View Full Code Here

            }
        });
        b.setDescription("Push this button as soon as test componenet is rendered.");
        main.addComponent(b);

        result = new Label();
        main.addComponent(result);

        testContainer = new VerticalLayout();
        populateContainer(testContainer, INITIAL_COMPONENTS);
        main.addComponent(testContainer);
View Full Code Here

        main.addComponent(testContainer);
    }

    public void startTest() {
        startTime = new Date();
        testContainer.addComponentAsFirst(new Label("Simplel Test Component"));
    }
View Full Code Here

            container.addComponent(t);
        }
    }

    private void addInfo() {
        main.addComponent(new Label(DESCRIPTION, ContentMode.HTML));
    }
View Full Code Here

    public void init() {
        final LegacyWindow mainWindow = new LegacyWindow(
                "TestSetVisibleAndCaching");
        setMainWindow(mainWindow);

        panelA.setContent(wrapInPanelLayout(new Label(
                "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")));
        panelB.setContent(wrapInPanelLayout(new Label(
                "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")));
        panelC.setContent(wrapInPanelLayout(new Label(
                "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC")));

        mainWindow
                .addComponent(new Label(
                        "Inspect transfered data from server to "
                                + "client using firebug (http request / response cycles)."
                                + " See how widgets are re-used,"
                                + " after each panel is once shown in GUI then"
                                + " their contents are not resend."));
View Full Code Here

    public PerformanceTestLabelsAndOrderedLayouts() {
        main = new VerticalLayout();
        setCompositionRoot(main);
        addInfo();

        result = new Label();
        main.addComponent(result);

        main.addComponent(new Button("click when rendered",
                new ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        endTest();
                    }
                }));

        main.addComponent(new Button(
                "Click for layout repaint (cached components)",
                new ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        testContainer.markAsDirty();
                    }
                }));

        testContainer = new VerticalLayout();

        for (int i = 0; i < INITIAL_COMPONENTS; i++) {
            Label l = new Label("foo" + i);
            testContainer.addComponent(l);
        }

        main.addComponent(testContainer);
        startTest();
View Full Code Here

        final Float f = new Float(millis / 1000.0);
        result.setValue("Test completed in " + f + " seconds");
    }

    private void addInfo() {
        main.addComponent(new Label(DESCRIPTION, ContentMode.HTML));
    }
View Full Code Here

    private final ProgressIndicator pi = new ProgressIndicator();

    private final Label memoryStatus;

    public TestForStyledUpload() {
        main.addComponent(new Label(
                "Clicking on button b updates information about upload components status or same with garbage collector."));

        up = new Upload(null, buffer);
        up.setButtonCaption("Select file");
        up.setImmediate(true);
        up.addListener((FinishedListener) this);
        up.addListener((FailedListener) this);
        up.addListener((SucceededListener) this);
        up.addListener((StartedListener) this);

        up.addListener(new Upload.ProgressListener() {

            @Override
            public void updateProgress(long readBytes, long contentLenght) {
                pi.setValue(new Float(readBytes / (float) contentLenght));

                refreshMemUsage();

                transferred.setValue("Transferred " + readBytes + " of "
                        + contentLenght);
            }

        });

        final Button b = new Button("Update status",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        readState();
                    }
                });

        final Button c = new Button("Update status with gc",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        gc();
                    }
                });

        main.addComponent(up);
        l = new Label("Idle");
        main.addComponent(l);

        pi.setVisible(false);
        pi.setPollingInterval(300);
        main.addComponent(pi);
        main.addComponent(transferred);

        memoryStatus = new Label();
        main.addComponent(memoryStatus);

        statusLayout.setMargin(true);
        status.setVisible(false);
        main.addComponent(status);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Label

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.