diff options
Diffstat (limited to 'uitest/src/com/vaadin/tests/tickets')
9 files changed, 33 insertions, 24 deletions
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1465ModalNotification.java b/uitest/src/com/vaadin/tests/tickets/Ticket1465ModalNotification.java index f129f01c63..522fbe7670 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1465ModalNotification.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1465ModalNotification.java @@ -6,6 +6,7 @@ import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Label; import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.Notification; +import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; public class Ticket1465ModalNotification extends LegacyApplication { @@ -17,7 +18,9 @@ public class Ticket1465ModalNotification extends LegacyApplication { "ButtonPanel containing a table test"); setMainWindow(mainWin); - final Window modal = new Window("Modal window"); + VerticalLayout layout = new VerticalLayout(); + layout.setMargin(true); + final Window modal = new Window("Modal window", layout); modal.setModal(true); Button b = new Button("click to show notification", @@ -31,7 +34,7 @@ public class Ticket1465ModalNotification extends LegacyApplication { } }); - modal.addComponent(b); + layout.addComponent(b); b = new Button("click to warning notification", new Button.ClickListener() { @@ -43,7 +46,7 @@ public class Ticket1465ModalNotification extends LegacyApplication { Notification.TYPE_WARNING_MESSAGE); } }); - modal.addComponent(b); + layout.addComponent(b); b = new Button("click to Humanized notification", new Button.ClickListener() { @@ -55,7 +58,7 @@ public class Ticket1465ModalNotification extends LegacyApplication { Notification.TYPE_HUMANIZED_MESSAGE); } }); - modal.addComponent(b); + layout.addComponent(b); b = new Button("click to test modality!", new Button.ClickListener() { @@ -66,7 +69,7 @@ public class Ticket1465ModalNotification extends LegacyApplication { } }); - modal.addComponent(b); + layout.addComponent(b); mainWin.addWindow(modal); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1804.java b/uitest/src/com/vaadin/tests/tickets/Ticket1804.java index f4516f767a..bf648b0d92 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1804.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1804.java @@ -109,7 +109,7 @@ public class Ticket1804 extends com.vaadin.server.LegacyApplication { Window w = new Window("Status of the fields"); w.setModal(true); w.setHeight("80%"); - w.addComponent(new Label(msg.toString(), ContentMode.HTML)); + w.setContent(new Label(msg.toString(), ContentMode.HTML)); main.addWindow(w); } }); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1811.java b/uitest/src/com/vaadin/tests/tickets/Ticket1811.java index 1cb122a23e..e8f23da3d1 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1811.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1811.java @@ -72,7 +72,7 @@ public class Ticket1811 extends com.vaadin.server.LegacyApplication { } Window w = new Window("Status of the fields"); w.setModal(true); - w.addComponent(new Label(msg.toString(), ContentMode.HTML)); + w.setContent(new Label(msg.toString(), ContentMode.HTML)); main.addWindow(w); } }); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1819.java b/uitest/src/com/vaadin/tests/tickets/Ticket1819.java index b24eec115e..b9a0060ce0 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket1819.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1819.java @@ -58,7 +58,7 @@ public class Ticket1819 extends com.vaadin.server.LegacyApplication { } Window w = new Window("Status of the fields"); w.setModal(true); - w.addComponent(new Label(msg.toString(), ContentMode.HTML)); + w.setContent(new Label(msg.toString(), ContentMode.HTML)); main.addWindow(w); } }); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2009.java b/uitest/src/com/vaadin/tests/tickets/Ticket2009.java index b4ef678efe..4dc69ec470 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2009.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2009.java @@ -100,6 +100,9 @@ public class Ticket2009 extends com.vaadin.server.LegacyApplication { Button done = new Button("Done"); PropertyEditor(ItemClickEvent event) { + VerticalLayout layout = new VerticalLayout(); + layout.setMargin(true); + setContent(layout); c = (Container) event.getSource(); propertyid = event.getPropertyId(); @@ -109,8 +112,8 @@ public class Ticket2009 extends com.vaadin.server.LegacyApplication { editor.setPropertyDataSource(c.getContainerProperty(itemid, propertyid)); - addComponent(editor); - addComponent(done); + layout.addComponent(editor); + layout.addComponent(done); setWidth(W + "px"); setHeight(H + "px"); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2021.java b/uitest/src/com/vaadin/tests/tickets/Ticket2021.java index 9a73636067..c6cbdbfa94 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2021.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2021.java @@ -6,7 +6,6 @@ import com.vaadin.ui.AbstractOrderedLayout; import com.vaadin.ui.Button; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; -import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.GridLayout; import com.vaadin.ui.Label; import com.vaadin.ui.Layout; @@ -31,12 +30,12 @@ public class Ticket2021 extends LegacyApplication { w.setContent(new GridLayout(2, 2)); setMainWindow(w); - Panel p = new Panel(); + VerticalLayout layout = new VerticalLayout(); + Panel p = new Panel(layout); p.setCaption("ExpandLayout"); p.setWidth("500px"); p.setHeight("500px"); - p.setContent(new VerticalLayout()); - p.getContent().setSizeFull(); + layout.setSizeFull(); w.addComponent(p); @@ -45,19 +44,19 @@ public class Ticket2021 extends LegacyApplication { tf1.setSizeFull(); tf1.setValue(contents); tf1.setCaption("TextField caption"); - ((ComponentContainer) p.getContent()).addComponent(tf1); + layout.addComponent(tf1); /* * * OrderedLayout */ - Panel p2 = new Panel(); + VerticalLayout layout2 = new VerticalLayout(); + Panel p2 = new Panel(layout2); p2.setCaption("OrderedLayout"); p2.setWidth("500px"); p2.setHeight("500px"); - p2.setContent(new VerticalLayout()); - p2.getContent().setSizeFull(); + layout2.setSizeFull(); w.addComponent(p2); @@ -66,7 +65,7 @@ public class Ticket2021 extends LegacyApplication { tf2.setSizeFull(); tf2.setValue(contents); tf2.setCaption("TextField caption"); - ((ComponentContainer) p2.getContent()).addComponent(tf2); + layout2.addComponent(tf2); /* * diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2099.java b/uitest/src/com/vaadin/tests/tickets/Ticket2099.java index 8b5d329977..0dc65cc25e 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2099.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2099.java @@ -73,7 +73,7 @@ public class Ticket2099 extends LegacyApplication { // l1.setVisible(false); // ts.setSelectedTab(l3); - w.addComponent(ts); + w.setContent(ts); return w; } diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2204.java b/uitest/src/com/vaadin/tests/tickets/Ticket2204.java index 6ccb2d8494..e32b66ffc0 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2204.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2204.java @@ -23,7 +23,6 @@ import com.vaadin.ui.GridLayout; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.HorizontalSplitPanel; import com.vaadin.ui.Label; -import com.vaadin.ui.Layout; import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.Panel; import com.vaadin.ui.RichTextArea; @@ -168,7 +167,9 @@ public class Ticket2204 extends LegacyApplication { textArea.setSizeFull(); } if (c == Panel.class) { - Layout layout = (Layout) ((Panel) cc).getContent(); + VerticalLayout layout = new VerticalLayout(); + layout.setMargin(true); + ((Panel) cc).setContent(layout); containerToComponent.put(cc, layout); layout.setVisible(false); textArea.setVisible(true); diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2323.java b/uitest/src/com/vaadin/tests/tickets/Ticket2323.java index f2ea5146d2..d9bbde52aa 100644 --- a/uitest/src/com/vaadin/tests/tickets/Ticket2323.java +++ b/uitest/src/com/vaadin/tests/tickets/Ticket2323.java @@ -3,6 +3,7 @@ package com.vaadin.tests.tickets; import com.vaadin.server.LegacyApplication; import com.vaadin.ui.LegacyWindow; import com.vaadin.ui.RichTextArea; +import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.Window; public class Ticket2323 extends LegacyApplication { @@ -12,11 +13,13 @@ public class Ticket2323 extends LegacyApplication { LegacyWindow w = new LegacyWindow(getClass().getSimpleName()); setMainWindow(w); - Window subWindow = new Window(""); + VerticalLayout layout = new VerticalLayout(); + layout.setMargin(true); + Window subWindow = new Window("", layout); subWindow.setSizeUndefined(); subWindow.getContent().setSizeUndefined(); subWindow.center(); - subWindow.addComponent(new RichTextArea()); + subWindow.setContent(new RichTextArea()); w.addWindow(subWindow); } |