summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/tickets/Ticket2240.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
committerArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
commit7b25b3886ea95bc6495506fbe9472e45fcbde684 (patch)
tree0b93cb65dab437feb46720659a63b8f1ef48f7f4 /uitest/src/com/vaadin/tests/tickets/Ticket2240.java
parent8941056349e302e687e40e94c13709e75f256d73 (diff)
downloadvaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.tar.gz
vaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.zip
Renamed tests -> uitest and tests/testbench -> uitest/src (#9299)
Diffstat (limited to 'uitest/src/com/vaadin/tests/tickets/Ticket2240.java')
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket2240.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2240.java b/uitest/src/com/vaadin/tests/tickets/Ticket2240.java
new file mode 100644
index 0000000000..bb16a40cd7
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket2240.java
@@ -0,0 +1,49 @@
+package com.vaadin.tests.tickets;
+
+import com.vaadin.Application;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.AbstractOrderedLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.UI.LegacyWindow;
+import com.vaadin.ui.TextField;
+
+public class Ticket2240 extends Application.LegacyApplication {
+
+ public static final String txt = "<p>There are two main types of windows: application-level windows, and "
+ + "\"sub windows\".</p><p>A sub window is rendered as a \"inline\" popup window"
+ + " within the (native) browser window to which it was added. You can create"
+ + " a sub window by creating a new Window and adding it to a application-level window, for instance"
+ + " your main window. </p><p> In contrast, you create a application-level window by"
+ + " creating a new Window and adding it to the Application. Application-level"
+ + " windows are not shown by default - you need to open a browser window for"
+ + " the url representing the window. You can think of the application-level"
+ + " windows as separate views into your application - and a way to create a"
+ + " \"native\" browser window.</p><p>Depending on your needs, it's also"
+ + " possible to create a new window instance (with it's own internal state)"
+ + " for each new (native) browser window, or you can share the same instance"
+ + " (and state) between several browser windows (the latter is most useful"
+ + " for read-only views).</p><br/><p>This is the end.</p>";
+
+ @Override
+ public void init() {
+ LegacyWindow w = new LegacyWindow(getClass().getSimpleName());
+ setMainWindow(w);
+ setTheme("tests-tickets");
+ createUI((AbstractOrderedLayout) w.getContent());
+ }
+
+ private void createUI(AbstractOrderedLayout layout) {
+ layout.setHeight(null);
+ layout.setStyleName("borders");
+ // layout.setSizeFull();
+ final Label l = new Label(txt);
+ l.setContentMode(ContentMode.XHTML);
+ // l.setWidth("100%");
+
+ TextField tf = new TextField("This is a textField");
+ tf.setWidth("100%");
+
+ layout.addComponent(tf);
+ layout.addComponent(l);
+ }
+}