1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package com.vaadin.tests.components.absolutelayout;
-
- import com.vaadin.tests.components.TestBase;
- import com.vaadin.ui.AbsoluteLayout;
- import com.vaadin.ui.Button;
- import com.vaadin.ui.ComponentContainer;
- import com.vaadin.ui.VerticalLayout;
-
- public class MoveComponentsFromAbsoluteLayoutToInnerLayout extends TestBase {
-
- protected Button testButton;
- private AbsoluteLayout al;
- protected ComponentContainer vl;
-
- @Override
- protected void setup() {
- al = new AbsoluteLayout();
- al.setWidth("200px");
- al.setHeight("200px");
-
- testButton = new Button("Click to move to inner layout",
- event -> vl.addComponent(testButton));
-
- al.addComponent(testButton);
-
- vl = new VerticalLayout();
- al.addComponent(vl, "top: 100px");
-
- addComponent(al);
-
- Button b = new Button("Repaint inner layout",
- event -> vl.markAsDirty());
-
- addComponent(b);
- }
-
- @Override
- protected String getDescription() {
- 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.";
- }
-
- @Override
- protected Integer getTicketNumber() {
- return 6061;
- }
-
- }
|