Package com.vaadin.ui

Examples of com.vaadin.ui.GridLayout.addComponent()


        final Form form = new Form();
        form.setLocale(Locale.GERMAN);
        final Table table = new Table(this.title, beans);
        MenuBar menu = createMenuBar(beans, table);
        layout.addComponent(menu);
       
        table.setSelectable(true);
        table.setImmediate(true);
        table.setVisibleColumns(VISIBLE_COLUMNS);
        table.addListener(new Property.ValueChangeListener() {
View Full Code Here


                form.setItemDataSource(item);
                form.setVisibleItemProperties(VISIBLE_COLUMNS);
           }
        });
        update(beans);
        layout.addComponent(table);

        Object first = table.getItemIds().iterator().next();
        Item item = table.getItem(first);
        form.setItemDataSource(item);
View Full Code Here

                @SuppressWarnings("unchecked")
                BeanItem<Task> item = (BeanItem<Task>) form.getItemDataSource();
                taskService.updateTask(item.getBean());
            }
        });
        layout.addComponent(form);
    }

    private MenuBar createMenuBar(final BeanContainer<String, Task> beans, final Table table) {
        MenuBar menu = new MenuBar();
        menu.setImmediate(true);
View Full Code Here

  protected GridLayout buildRightArea(String username) {
    GridLayout right = new GridLayout(1, 1);
    right.setWidth(100f, Unit.PERCENTAGE);
    Layout loggedInUser = buildUserArea(username);
    right.addComponent(loggedInUser, 0, 0);
    right.setComponentAlignment(loggedInUser, Alignment.MIDDLE_RIGHT);
    return right;
  }

  @Override
View Full Code Here

                        "Centered window"));
                centered.center();
                getMainWindow().addWindow(centered);
            }
        });
        layout.addComponent(b, 0, 0);

        b = new Button("Open", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

                        "Centered window"));
                centered.center();
                getMainWindow().addWindow(centered);
            }
        });
        layout.addComponent(b, 1, 1);

        b = new Button("Open", new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

                        "Centered window"));
                centered.center();
                getMainWindow().addWindow(centered);
            }
        });
        layout.addComponent(b, 2, 2);

    }
}
View Full Code Here

        gl.setCaption("Horizontal");
        Button b;

        b = new Button("Wide button");
        b.setWidth("500px");
        gl.addComponent(b);

        addButtons(gl);

        p.setContent(gl);
View Full Code Here

        addButtons(gl);

        b = new Button("High button");
        b.setHeight("200px");
        gl.addComponent(b);

        p.setContent(gl);

    }
View Full Code Here

        for (int i = 1; i <= 5; i++) {
            Button b = new Button("Button " + i
                    + " should be 100px or 101px high");
            b.setHeight("100%");
            l.addComponent(b);
        }
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.