From 8ad8ce15bbd2da69db70e384230f53db74443d22 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Tue, 25 Sep 2012 11:01:17 +0300 Subject: Added test case for vertical layout relative children. --- .../orderedlayout/VerticalRelativeChildren.html | 27 ++++++++++ .../orderedlayout/VerticalRelativeChildren.java | 59 ++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html create mode 100644 uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.java diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html new file mode 100644 index 0000000000..bcff408592 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.html @@ -0,0 +1,27 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.orderedlayout.VerticalRelativeChildren?restartApplication
screenCapture
+ + diff --git a/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.java b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.java new file mode 100644 index 0000000000..260bfb02a4 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/orderedlayout/VerticalRelativeChildren.java @@ -0,0 +1,59 @@ +package com.vaadin.tests.components.orderedlayout; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Alignment; +import com.vaadin.ui.TextArea; +import com.vaadin.ui.VerticalLayout; + +public class VerticalRelativeChildren extends TestBase { + + @Override + protected void setup() { + + VerticalLayout vl = new VerticalLayout(); + vl.setWidth("300px"); + + TextArea areaUndefined = new TextArea(); + areaUndefined.setSizeUndefined(); + areaUndefined.setValue("Undefined height"); + vl.addComponent(areaUndefined); + + TextArea areaDefined = new TextArea(); + areaDefined.setWidth("200px"); + areaDefined.setValue("200px width"); + vl.addComponent(areaDefined); + + TextArea areaRelativeBottom = new TextArea(); + areaRelativeBottom.setWidth("50%"); + areaRelativeBottom.setValue("50% width, right align"); + vl.addComponent(areaRelativeBottom); + vl.setComponentAlignment(areaRelativeBottom, Alignment.TOP_RIGHT); + + TextArea areaRelativeCenter = new TextArea(); + areaRelativeCenter.setWidth("50%"); + areaRelativeCenter.setValue("50% width, center align"); + vl.addComponent(areaRelativeCenter); + vl.setComponentAlignment(areaRelativeCenter, Alignment.TOP_CENTER); + + TextArea areaRelativeTop = new TextArea(); + areaRelativeTop.setWidth("50%"); + areaRelativeTop.setValue("50% width, left align"); + vl.addComponent(areaRelativeTop); + vl.setComponentAlignment(areaRelativeTop, Alignment.TOP_LEFT); + + addComponent(vl); + } + + @Override + protected String getDescription() { + // TODO Auto-generated method stub + return null; + } + + @Override + protected Integer getTicketNumber() { + // TODO Auto-generated method stub + return null; + } + +} -- cgit v1.2.3