Package com.vaadin.ui

Examples of com.vaadin.ui.Label


            table.addContainerProperty("label", TextField.class, null);
            table.addGeneratedColumn("label", new ColumnGenerator() {
                @Override
                public Object generateCell(Table source, Object itemId,
                        Object columnId) {
                    Label label = new Label("Label component");
                    label.setSizeUndefined();
                    label.addStyleName("bold");
                    return label;
                }
            });

            table.addContainerProperty("checkbox", TextField.class, null);
View Full Code Here


        final Table table = new Table();
        table.setContainerDataSource(datasource);
        layout.addComponent(table);
        addComponent(layout);

        final Label label = new Label("");
        layout.addComponent(label);

        NativeButton addRowButton = new NativeButton("Add row",
                new NativeButton.ClickListener() {

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

        NativeButton jumpToLastRowButton = new NativeButton("Jump to last row",
                new NativeButton.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        jumpToLastRow(table);
                    }
                });
        NativeButton jumpTo15thRowButton = new NativeButton("Jump to 15th row",
                new NativeButton.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        jumpToFifteenthRow(table);
                    }
                });
        NativeButton jumpToFirstRowButton = new NativeButton(
                "Jump to first row", new NativeButton.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        jumpToFirstRow(table);
                    }
                });

        NativeButton updateLabelButton = new NativeButton("UpdateLabel",
                new NativeButton.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        label.setValue(Integer.toString(table
                                .getCurrentPageFirstItemIndex()));
                    }
                });
        layout.addComponent(addRowButton);
        layout.addComponent(jumpToLastRowButton);
View Full Code Here

        if (AbstractSplitPanel.class.isAssignableFrom(c)) {
            AbstractSplitPanel sp = (AbstractSplitPanel) cc;
            sp.setWidth("300px");
            sp.setHeight("300px");
            sp.addComponent(new Label("Label"));
            textArea.setSizeFull();
        }
        if (c == Panel.class) {
            VerticalLayout layout = new VerticalLayout();
            layout.setMargin(true);
View Full Code Here

        HorizontalLayout horiz = new HorizontalLayout();
        horiz.setSpacing(true);
        horiz.setMargin(true);
        horiz.setStyleName("ticket2222");

        horiz.addComponent(new Label("Horiz spacing: 60px;"));
        horiz.addComponent(new Label("Margin-left: 40px"));
        horiz.addComponent(new Label("Margin-top: 100px;"));
        horiz.addComponent(new Label("Margin-right: 20px;"));
        horiz.addComponent(new Label("Margin-bottom: 30px;"));
        horiz.addStyleName("borders");

        VerticalLayout vert = new VerticalLayout();
        vert.setSizeUndefined();
        vert.setSpacing(true);
        vert.setMargin(false);
        vert.setStyleName("ticket2222");
        vert.addComponent(new Label("Vert spacing: 50px;"));
        vert.addComponent(new Label("No margins"));
        vert.addComponent(new Label("label 3"));
        vert.addStyleName("borders");

        GridLayout gl = new GridLayout(3, 2);
        gl.setStyleName("borders");
        gl.setSpacing(true);
        gl.setMargin(true);
        gl.setStyleName("ticket2222");
        gl.addComponent(new Label("Vert spacing: 50px; horiz 20px;"));
        gl.addComponent(new Label("Margin-left: 40px"));
        gl.addComponent(new Label("Margin-top: 100px;"));
        gl.addComponent(new Label("Margin-right: 20px;"));
        gl.addComponent(new Label("Margin-bottom: 30px;"));
        gl.addComponent(new Label("label 3"));
        gl.addStyleName("borders");

        layout.addComponent(horiz);
        layout.addComponent(new Label(" "));
        layout.addComponent(vert);
        layout.addComponent(new Label(" "));
        layout.addComponent(gl);
    }
View Full Code Here

    private static final int ROWS = 100;

    @Override
    public void setup() {
        Table table1 = initTable();
        addComponent(new Label("Plain table"));
        addComponent(table1);

    }
View Full Code Here

        });

        gl.addComponent(l, 0, 0, 3, 0);
        gl.addComponent(button);
        gl.addComponent(new Label("2"));
        gl.addComponent(new Label("3"));
        gl.addComponent(new Label("4"));

        w.setContent(gl);

    }
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();
        addComponent(layout);

        final Label label = new Label("");
        addComponent(label);

        BeanContainer<String, Bean> beans = new BeanContainer<String, Bean>(
                Bean.class) {
            @Override
            public List<String> getItemIds(int startIndex, int numberOfIds) {
                label.setValue("rows requested: " + numberOfIds);
                return super.getItemIds(startIndex, numberOfIds);
            }
        };

        beans.setBeanIdProperty("i");
View Full Code Here

    private void constructTables(Layout layout) {

        Table t = createTable();
        layout.addComponent(t);
        t = createTable();
        Label l = new Label("A high label to enable scrollbars");
        l.setHeight("2000px");
        layout.addComponent(l);

    }
View Full Code Here

                Alignment.MIDDLE_LEFT);
        controlPanel.setComponentAlignment(disabledButton,
                Alignment.MIDDLE_LEFT);
        controlPanel.setComponentAlignment(addNewEvent, Alignment.MIDDLE_LEFT);

        Label viewCaption = new Label("Calendar");
        viewCaption.setStyleName(ValoTheme.LABEL_H1);
        addComponent(viewCaption);
        addComponent(controlPanel);
        addComponent(hl);
        addComponent(calendarComponent);
        setRowExpandRatio(getRows() - 1, 1.0f);
View Full Code Here

        table.addContainerProperty("Column 3", Component.class, "");
        table.addContainerProperty("Column 4", Component.class, "");

        Item item = table.addItem("Item 1 (row 1)");
        item.getItemProperty("Column 1").setValue("String A");
        item.getItemProperty("Column 2").setValue(new Label("Label A"));
        item.getItemProperty("Column 3").setValue(
                new Label("<b>Label A</b>", ContentMode.HTML));
        VerticalLayout l = new VerticalLayout();
        l.setId("row-1");
        l.setHeight(100, Unit.PIXELS);
        item.getItemProperty("Column 4").setValue(l);

        item = table.addItem("Item 2 (row 2)");
        item.getItemProperty("Column 1").setValue("String B");
        item.getItemProperty("Column 2").setValue(new Label("Label B"));
        item.getItemProperty("Column 3")
                .setValue(
                        new Label(
                                "<a style=\"color: blue\" href=\"javascript:false\">Label B</a>",
                                ContentMode.HTML));
        l = new VerticalLayout();
        l.setId("row-2");
        l.setSizeFull();
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.