Package com.vaadin.ui

Examples of com.vaadin.ui.Label


        Panel p = new Panel(pl);
        p.setStyleName(Reindeer.PANEL_LIGHT);
        main.addComponent(p);
        p.setHeight("100px");

        Label l = new Label(
                "a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n");
        l.setContentMode(ContentMode.PREFORMATTED);
        pl.addComponent(l);
        main.addComponent(new Label(
                "This text should be right below the panel, w/o spacing"));
    }
View Full Code Here


    private Label label;
    private Table table;

    @Override
    protected void setup() {
        label = new Label(String.valueOf(counter));
        label.setId("label");
        table = createTable();
        table.setId("table");
        addComponent(table);
        addComponent(label);
View Full Code Here

    public Dragging() {
        setMargin(true);
        setSpacing(true);

        Label h1 = new Label("Dragging Components");
        h1.addStyleName("h1");
        addComponent(h1);

        MenuBar options = new MenuBar();
        options.setCaption("Drop Hints");
        addComponent(options);
View Full Code Here

    }

    private List<Component> createComponents() {
        final List<Component> components = new ArrayList<Component>();

        final Label label = new Label(
                "This is a long text block that will wrap.");
        label.setWidth("120px");
        components.add(label);

        final Embedded image = new Embedded("", new ThemeResource(
                "../runo/icons/64/document.png"));
        components.add(image);
View Full Code Here

        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        p = new Panel("This is a panel", pl);
        p.setSizeFull();
        Label label1 = new Label("This is a table!");
        label1.setHeight("1500px");
        label1.setWidth("1500px");
        pl.addComponent(label1);
        p.setScrollTop(50);
        // MyTable table1 = new MyTable(24, "table1");
        // table1.loadTable(1000);

        // MyTable table2 = new MyTable(24, "table2");
        // table2.loadTable(1000);

        // MyTable table3 = new MyTable(24, "table3");
        // table3.loadTable(1000);

        // MyAccordion accordion = new MyAccordion(new Component[] { table1,
        // table2 }, "Test");

        Label a = new Label("abc123");
        TextField tf = new TextField("A large textfield");
        tf.setHeight("2500px");
        tf.setWidth("2500px");

        TabsAcc tab = new TabsAcc(new Component[] { p, a, tf });
        tab.addListener(this);

        mainLayout.addComponent(sp);
        sp.addComponent(new Label("C 1"));
        // sp.addComponent(new Label("C 2"));
        // sp.setHeight("100px");

        sp.addComponent(tab);
        // mainLayout.addComponent(new Label("Filler"));
        // mainLayout.addComponent(tab);
        // mainLayout.setExpandRatio(tab, 1.0f);
        // sp.addComponent(new Label("Filler"));
        // sp.addComponent(tab);

        pl = new VerticalLayout();
        pl.setMargin(true);
        p = new Panel("This is a panel", pl);
        p.setWidth("2000px");
        p.setHeight("2000px");
        VerticalLayout p2l = new VerticalLayout();
        p2l.setMargin(true);
        Panel p2 = new Panel("This is another panel", p2l);
        p2.setWidth("2500px");
        p2.setHeight("2500px");
        label1 = new Label("This is a table!");
        label1.setHeight("1500px");
        label1.setWidth("1500px");
        p2l.addComponent(label1);
        pl.addComponent(p2);
View Full Code Here

        final VerticalLayout events = new VerticalLayout();

        t.addListener(new ItemClickEvent.ItemClickListener() {
            @Override
            public void itemClick(ItemClickEvent event) {
                events.addComponent(new Label(new Label("Click:"
                        + (event.isDoubleClick() ? "double" : "single")
                        + " button:" + event.getButtonName() + " propertyId:"
                        + event.getPropertyId() + " itemID:"
                        + event.getItemId() + " item:" + event.getItem())));

            }
        });

        main.addComponent(p);
        pl.addComponent(t);
        pl.addComponent(events);

        VerticalLayout p2l = new VerticalLayout();
        p2l.setMargin(true);
        Panel p2 = new Panel("Table test (try dbl click also)", p2l);
        p2.setSizeFull();

        final VerticalLayout events2 = new VerticalLayout();
        Table table = TestForTablesInitialColumnWidthLogicRendering
                .getTestTable(5, 100);
        table.setRowHeaderMode(Table.ROW_HEADER_MODE_ID);
        table.addListener(new ItemClickEvent.ItemClickListener() {
            @Override
            public void itemClick(ItemClickEvent event) {
                events2.addComponent(new Label("Click:"
                        + (event.isDoubleClick() ? "double" : "single")
                        + " button:" + event.getButtonName() + " propertyId:"
                        + event.getPropertyId() + " itemID:"
                        + event.getItemId() + " item:" + event.getItem()));
                if (event.isDoubleClick()) {
View Full Code Here

        t.addContainerProperty(P2, Component.class, null);
        t.setColumnHeaders(new String[] { "Col1", "Col2" });

        Item i = t.addItem("1");
        i.getItemProperty(P1).setValue(new TextField("abc"));
        i.getItemProperty(P2).setValue(new Label("label"));
        Item i2 = t.addItem("2");
        i2.getItemProperty(P1).setValue(new Button("def"));
        i2.getItemProperty(P2).setValue(new DateField());

        layout.addComponent(t);
View Full Code Here

        LegacyWindow w = new LegacyWindow(getClass().getSimpleName());
        setMainWindow(w);

        GridLayout gl = new GridLayout(3, 3);
        gl.setSpacing(true);
        gl.addComponent(new Label("Before form"));
        gl.newLine();

        form = new Form(gl);
        form.setItemDataSource(new BeanItem<MyBean>(new MyBean()));

        gl.addComponent(new Label("After form"));

        w.addComponent(form);

        w.addComponent(new Button("new item", new Button.ClickListener() {
View Full Code Here

public class NativeSelects extends VerticalLayout implements View {
    public NativeSelects() {
        setMargin(true);

        Label h1 = new Label("Selects");
        h1.addStyleName("h1");
        addComponent(h1);

        HorizontalLayout row = new HorizontalLayout();
        row.addStyleName("wrapping");
        row.setSpacing(true);
View Full Code Here

        // behaviour
        container2.addContainerProperty("text", Component.class, null);

        for (int i = 0; i < 100; i++) {
            Item item = container1.addItem(i);
            item.getItemProperty("text").setValue(new Label("Test " + i));
        }

        table.setContainerDataSource(container1);

        // workaround for case #2
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.