1 package com.vaadin.tests.components.gridlayout;
3 import com.vaadin.server.VaadinRequest;
4 import com.vaadin.tests.components.AbstractReindeerTestUI;
5 import com.vaadin.ui.Button;
6 import com.vaadin.ui.Button.ClickEvent;
7 import com.vaadin.ui.ComponentContainer;
8 import com.vaadin.ui.GridLayout;
9 import com.vaadin.ui.Label;
10 import com.vaadin.ui.VerticalLayout;
12 public class MoveComponentsFromGridLayoutToInnerLayout extends AbstractReindeerTestUI {
14 protected Button testButton;
15 private GridLayout gl;
16 protected ComponentContainer vl;
19 protected void setup(VaadinRequest request) {
20 gl = new GridLayout();
21 gl.setHideEmptyRowsAndColumns(true);
23 gl.setHeight("200px");
25 testButton = new Button("Click to move to inner layout",
26 new Button.ClickListener() {
29 public void buttonClick(ClickEvent event) {
30 vl.addComponent(testButton);
34 gl.addComponent(testButton);
36 vl = new VerticalLayout();
37 vl.addComponent(new Label("I'm inside the inner layout"));
42 Button b = new Button("Repaint inner layout",
43 new Button.ClickListener() {
46 public void buttonClick(ClickEvent event) {
55 protected String getTestDescription() {
56 return "Click the first button to move it from an outer layout to an inner. Then click the second button to repaint the inner layout.";
60 protected Integer getTicketNumber() {