From: Artur Signell Date: Fri, 28 Nov 2008 09:37:28 +0000 (+0000) Subject: Test case for #2240 X-Git-Tag: 6.7.0.beta1~3698 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=050fbace679ab67fde018535482cd6576c9d5b24;p=vaadin-framework.git Test case for #2240 svn changeset:6034/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket2240.java b/src/com/itmill/toolkit/tests/tickets/Ticket2240.java new file mode 100644 index 0000000000..a016b2ca1b --- /dev/null +++ b/src/com/itmill/toolkit/tests/tickets/Ticket2240.java @@ -0,0 +1,47 @@ +package com.itmill.toolkit.tests.tickets; + +import com.itmill.toolkit.Application; +import com.itmill.toolkit.ui.Label; +import com.itmill.toolkit.ui.OrderedLayout; +import com.itmill.toolkit.ui.TextField; +import com.itmill.toolkit.ui.Window; + +public class Ticket2240 extends Application { + + public static final String txt = "

There are two main types of windows: application-level windows, and " + + "\"sub windows\".

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.

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.

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).


This is the end.

"; + + public void init() { + Window w = new Window(getClass().getSimpleName()); + setMainWindow(w); + setTheme("tests-tickets"); + createUI((OrderedLayout) w.getLayout()); + } + + private void createUI(OrderedLayout layout) { + layout.setHeight(null); + layout.setStyleName("borders"); + // layout.setSizeFull(); + final Label l = new Label(txt); + l.setContentMode(Label.CONTENT_XHTML); + // l.setWidth("100%"); + + TextField tf = new TextField("This is a textField"); + tf.setWidth("100%"); + + layout.addComponent(tf); + layout.addComponent(l); + } +}