]> source.dussan.org Git - vaadin-framework.git/commitdiff
Removed some old ExpandLayout references
authorArtur Signell <artur.signell@itmill.com>
Thu, 11 Feb 2010 13:58:25 +0000 (13:58 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 11 Feb 2010 13:58:25 +0000 (13:58 +0000)
svn changeset:11280/svn branch:6.3

14 files changed:
tests/src/com/vaadin/tests/ScrollbarStressTest.java
tests/src/com/vaadin/tests/TestBench.java
tests/src/com/vaadin/tests/TestCaptionWrapper.java
tests/src/com/vaadin/tests/TestComponentsAndLayouts.java
tests/src/com/vaadin/tests/TestForExpandLayout.java [deleted file]
tests/src/com/vaadin/tests/TestForExpandLayout2.java [deleted file]
tests/src/com/vaadin/tests/TestForExpandLayout3.java [deleted file]
tests/src/com/vaadin/tests/TestSizeableIncomponents.java
tests/src/com/vaadin/tests/TreeFilesystemContainer.java
tests/src/com/vaadin/tests/tickets/Ticket1902.java [deleted file]
tests/src/com/vaadin/tests/tickets/Ticket1934.java [deleted file]
tests/src/com/vaadin/tests/tickets/Ticket2032.java [deleted file]
tests/src/com/vaadin/tests/tickets/Ticket2033.java [deleted file]
tests/src/com/vaadin/tests/tickets/Ticket2061c.java

index b6cef8353ad1a3a8fc9542302294dbd257e071a1..23a34302f8657826a03d339f2b55ec453a1c86d9 100644 (file)
@@ -4,14 +4,14 @@ import com.vaadin.Application;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
-import com.vaadin.ui.ExpandLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;
@@ -93,8 +93,7 @@ public class ScrollbarStressTest extends Application {
             }
         });
 
-        OrderedLayout ol = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout ol = new HorizontalLayout();
         ol.addComponent(context);
         ol.addComponent(testComponent);
         ol.addComponent(width);
@@ -104,17 +103,17 @@ public class ScrollbarStressTest extends Application {
         ol.setMargin(true);
 
         Window controller = new Window("Controller");
-        controller.setLayout(ol);
+        controller.setContent(ol);
         main.addWindow(controller);
     }
 
     protected void drawInExpandLayout() {
         main.removeAllComponents();
-        main.getLayout().setSizeFull();
+        main.getContent().setSizeFull();
 
-        OrderedLayout ol = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
 
-        ExpandLayout el = new ExpandLayout();
+        VerticalLayout el = new VerticalLayout();
 
         el.removeAllComponents();
 
@@ -125,18 +124,18 @@ public class ScrollbarStressTest extends Application {
 
         el.addComponent(ol);
 
-        main.getLayout().addComponent(el);
+        main.getContent().addComponent(el);
         main.removeWindow(subwindow);
 
     }
 
     protected void drawInTabSheet(boolean verticalAkaAccordion) {
         main.removeAllComponents();
-        main.getLayout().setSizeFull();
+        main.getContent().setSizeFull();
 
-        OrderedLayout ol = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
         ol.setCaption("Tab 1");
-        OrderedLayout ol2 = new OrderedLayout();
+        VerticalLayout ol2 = new VerticalLayout();
         ol2.setCaption("Tab 2");
 
         TabSheet ts = (verticalAkaAccordion ? accordion : tabsheet);
@@ -162,10 +161,10 @@ public class ScrollbarStressTest extends Application {
 
     private void drawInSplitPanel() {
         main.removeAllComponents();
-        main.getLayout().setSizeFull();
+        main.getContent().setSizeFull();
 
-        OrderedLayout ol = new OrderedLayout();
-        OrderedLayout ol2 = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
+        VerticalLayout ol2 = new VerticalLayout();
 
         splitPanel.setFirstComponent(ol);
         splitPanel.setSecondComponent(ol2);
@@ -185,11 +184,11 @@ public class ScrollbarStressTest extends Application {
 
     private void drawInPanel() {
         main.removeAllComponents();
-        main.getLayout().setSizeFull();
+        main.getContent().setSizeFull();
 
-        OrderedLayout ol = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
         panel.setSizeFull();
-        panel.setLayout(ol);
+        panel.setContent(ol);
 
         ol.setWidth((String) width.getValue());
         ol.setHeight((String) height.getValue());
@@ -201,20 +200,20 @@ public class ScrollbarStressTest extends Application {
 
     private void drawInSubwindow() {
         main.removeAllComponents();
-        main.getLayout().setSizeFull();
-        OrderedLayout ol = new OrderedLayout();
+        main.getContent().setSizeFull();
+        VerticalLayout ol = new VerticalLayout();
         ol.setWidth((String) width.getValue());
         ol.setHeight((String) height.getValue());
 
         ol.addComponent(getTestComponent());
-        subwindow.setLayout(ol);
+        subwindow.setContent(ol);
         main.addWindow(subwindow);
     }
 
     private void drawInMainWindow() {
         main.removeAllComponents();
-        OrderedLayout ol = new OrderedLayout();
-        main.setLayout(ol);
+        VerticalLayout ol = new VerticalLayout();
+        main.setContent(ol);
         ol.setWidth((String) width.getValue());
         ol.setHeight((String) height.getValue());
 
index c3d7155b504b83d1007c5ed6cfac273664c05bfa..be3471c02d08d8ba6de7a31cf86853cd2172183a 100644 (file)
@@ -18,7 +18,6 @@ import com.vaadin.data.util.HierarchicalContainer;
 import com.vaadin.terminal.ExternalResource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
 import com.vaadin.ui.Link;
@@ -201,13 +200,13 @@ public class TestBench extends com.vaadin.Application implements
 
         bodyLayout.addStyleName("light");
         bodyLayout.setSizeFull();
-        bodyLayout.setLayout(new ExpandLayout());
+        bodyLayout.setContent(new VerticalLayout());
 
         mainLayout.addComponent(bodyLayout);
 
         mainLayout.setSplitPosition(30);
 
-        mainWindow.setLayout(mainLayout);
+        mainWindow.setContent(mainLayout);
 
         setMainWindow(mainWindow);
     }
index c15270458ea360bd24182bf142a211f0ff00e04c..82ae63f26e059046c5f82573c5a44dbce188d8cb 100644 (file)
@@ -14,14 +14,12 @@ import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
 import com.vaadin.ui.Link;
 import com.vaadin.ui.NativeSelect;
 import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.ProgressIndicator;
 import com.vaadin.ui.RichTextArea;
@@ -33,12 +31,13 @@ import com.vaadin.ui.TextField;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.TwinColSelect;
 import com.vaadin.ui.Upload;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Component.Listener;
 
 public class TestCaptionWrapper extends CustomComponent implements Listener {
 
-    OrderedLayout main = new OrderedLayout();
+    VerticalLayout main = new VerticalLayout();
 
     final String eventListenerString = "Component.Listener feedback: ";
     Label eventListenerFeedback = new Label(eventListenerString
@@ -72,13 +71,13 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
 
         final Panel panel = new Panel("Panel");
         test(panel);
-        populateLayout(panel.getLayout());
+        populateLayout((Layout) panel.getContent());
 
         final TabSheet tabsheet = new TabSheet();
         test(tabsheet);
-        final OrderedLayout tab1 = new OrderedLayout();
+        final VerticalLayout tab1 = new VerticalLayout();
         tab1.addComponent(new Label("try tab2"));
-        final OrderedLayout tab2 = new OrderedLayout();
+        final VerticalLayout tab2 = new VerticalLayout();
         test(tab2);
         populateLayout(tab2);
         tabsheet.addTab(tab1, "TabSheet tab1", new ClassResource("m.gif",
@@ -86,7 +85,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
         tabsheet.addTab(tab2, "TabSheet tab2", new ClassResource("m.gif",
                 getApplication()));
 
-        final ExpandLayout expandLayout = new ExpandLayout();
+        final VerticalLayout expandLayout = new VerticalLayout();
         test(expandLayout);
         populateLayout(expandLayout);
 
@@ -96,7 +95,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
 
         final Window window = new Window("TEST: Window");
         test(window);
-        populateLayout(window.getLayout());
+        populateLayout((Layout) window.getContent());
 
     }
 
index 5187f8f8e6bb023afc10b7fd5c7818f6f622e275..ba9fbe86d08ac922fa5a6a79252d70b7ce260c4f 100644 (file)
@@ -26,7 +26,6 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
@@ -45,6 +44,7 @@ import com.vaadin.ui.TextField;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.TwinColSelect;
 import com.vaadin.ui.Upload;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Component.Event;
 import com.vaadin.ui.Component.Listener;
@@ -194,20 +194,6 @@ public class TestComponentsAndLayouts extends Application implements Listener,
             // test(gridLayout);
         }
 
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target
-                    .addComponent(new Label(
-                            "<hr /><h1>Components inside ExpandLayout (height 250px)</h3>",
-                            Label.CONTENT_XHTML));
-            final ExpandLayout el = new ExpandLayout();
-            el.setHeight(250, Component.UNITS_PIXELS);
-            el.expand(new Label("This label will expand on expand layout"));
-            populateLayout(el);
-            target.addComponent(el);
-        }
-
         // //////////////////////////////////////////////////////////////////////
         // ////
         if (false) {
@@ -219,27 +205,6 @@ public class TestComponentsAndLayouts extends Application implements Listener,
             target.addComponent(panel);
         }
 
-        // //////////////////////////////////////////////////////////////////////
-        // ////
-        if (false) {
-            target
-                    .addComponent(new Label(
-                            "<hr /><h1>Components inside vertical SplitPanel (splitpanel is under 250height ExpandLayout)</h3>",
-                            Label.CONTENT_XHTML));
-            final ExpandLayout sp1l = new ExpandLayout();
-            sp1l.setHeight(250, ExpandLayout.UNITS_PIXELS);
-            final SplitPanel sp1 = new SplitPanel(
-                    SplitPanel.ORIENTATION_VERTICAL);
-            sp1l.addComponent(sp1);
-            final OrderedLayout sp1first = new OrderedLayout();
-            final OrderedLayout sp1second = new OrderedLayout();
-            sp1.setFirstComponent(sp1first);
-            populateLayout(sp1first);
-            populateLayout(sp1second);
-            sp1.setSecondComponent(sp1second);
-            target.addComponent(sp1l);
-        }
-
         // //////////////////////////////////////////////////////////////////////
         // ////
         if (false) {
@@ -247,13 +212,13 @@ public class TestComponentsAndLayouts extends Application implements Listener,
                     .addComponent(new Label(
                             "<hr /><h1>Components inside horizontal SplitPanel (splitpanel is under 250px height ExpandLayout)</h3>",
                             Label.CONTENT_XHTML));
-            final ExpandLayout sp2l = new ExpandLayout();
+            final VerticalLayout sp2l = new VerticalLayout();
             sp2l.setHeight(250, SplitPanel.UNITS_PIXELS);
             final SplitPanel sp2 = new SplitPanel(
                     SplitPanel.ORIENTATION_HORIZONTAL);
             sp2l.addComponent(sp2);
-            final OrderedLayout sp2first = new OrderedLayout();
-            final OrderedLayout sp2second = new OrderedLayout();
+            final VerticalLayout sp2first = new VerticalLayout();
+            final VerticalLayout sp2second = new VerticalLayout();
             sp2.setFirstComponent(sp2first);
             populateLayout(sp2first);
             populateLayout(sp2second);
@@ -278,8 +243,8 @@ public class TestComponentsAndLayouts extends Application implements Listener,
         final Embedded emb = new Embedded("Embedded " + count++, flashResource);
         emb.setType(Embedded.TYPE_OBJECT);
         emb.setMimeType("application/x-shockwave-flash");
-        emb.setWidth(250);
-        emb.setHeight(100);
+        emb.setWidth("250px");
+        emb.setHeight("100px");
         test(layout, emb);
 
         final Panel panel = new Panel("Panel " + count++);
@@ -333,9 +298,9 @@ public class TestComponentsAndLayouts extends Application implements Listener,
         test(layout, table);
 
         final TabSheet tabsheet = new TabSheet();
-        final OrderedLayout tab1 = new OrderedLayout();
+        final VerticalLayout tab1 = new VerticalLayout();
         tab1.addComponent(new Label("tab1 " + count++));
-        final OrderedLayout tab2 = new OrderedLayout();
+        final VerticalLayout tab2 = new VerticalLayout();
         tab2.addComponent(new Label("tab2 " + count++));
         tabsheet.addTab(tab1, "Default (not configured) TabSheet tab1",
                 new ClassResource("m.gif", this));
@@ -344,9 +309,9 @@ public class TestComponentsAndLayouts extends Application implements Listener,
         test(layout, tabsheet);
 
         final Accordion accordion = new Accordion();
-        final OrderedLayout acc1 = new OrderedLayout();
+        final VerticalLayout acc1 = new VerticalLayout();
         acc1.addComponent(new Label("acc1 " + count++));
-        final OrderedLayout acc2 = new OrderedLayout();
+        final VerticalLayout acc2 = new VerticalLayout();
         acc2.addComponent(new Label("acc2 " + count++));
         accordion.addTab(acc1, "Default (not configured) Accordion acc1",
                 new ClassResource("m.gif", this));
diff --git a/tests/src/com/vaadin/tests/TestForExpandLayout.java b/tests/src/com/vaadin/tests/TestForExpandLayout.java
deleted file mode 100644 (file)
index e58ec24..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* \r
-@ITMillApache2LicenseForJavaFiles@\r
- */\r
-\r
-package com.vaadin.tests;\r
-\r
-import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.DateField;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
-import com.vaadin.ui.Panel;\r
-\r
-/**\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class TestForExpandLayout extends CustomComponent {\r
-\r
-    ExpandLayout main = new ExpandLayout();\r
-\r
-    DateField df;\r
-\r
-    public TestForExpandLayout() {\r
-        setCompositionRoot(main);\r
-        createNewView();\r
-    }\r
-\r
-    public void createNewView() {\r
-        main.removeAllComponents();\r
-        for (int i = 0; i < 6; i++) {\r
-            final ExpandLayout el = new ExpandLayout(\r
-                    OrderedLayout.ORIENTATION_HORIZONTAL);\r
-            for (int j = 0; j < i + 3; j++) {\r
-                final Label l = new Label("label" + i + ":" + j);\r
-                el.addComponent(l);\r
-            }\r
-            if (i > 0) {\r
-                // el.setMargin(true);\r
-                el.setSizeUndefined();\r
-                el.setWidth("100%");\r
-                if (i % 2 == 0) {\r
-                    el.setHeight("8em");\r
-                    Panel p = new Panel("tp");\r
-                    p.addComponent(new Label("panelc"));\r
-                    p.setHeight("100%");\r
-                    p.setWidth("100px");\r
-                    el.addComponent(p);\r
-                }\r
-            }\r
-            main.addComponent(el);\r
-        }\r
-\r
-    }\r
-}\r
diff --git a/tests/src/com/vaadin/tests/TestForExpandLayout2.java b/tests/src/com/vaadin/tests/TestForExpandLayout2.java
deleted file mode 100644 (file)
index 5c6ff79..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* \r
-@ITMillApache2LicenseForJavaFiles@\r
- */\r
-\r
-package com.vaadin.tests;\r
-\r
-import com.vaadin.ui.Button;\r
-import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.Label;\r
-import com.vaadin.ui.Panel;\r
-\r
-/**\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class TestForExpandLayout2 extends CustomComponent {\r
-\r
-    ExpandLayout main;\r
-\r
-    public TestForExpandLayout2() {\r
-        createNewView();\r
-        setCompositionRoot(main);\r
-    }\r
-\r
-    public void createNewView() {\r
-        main = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
-        Panel left = new Panel("Left column");\r
-        left.setHeight(100, Panel.UNITS_PERCENTAGE);\r
-        left.setWidth(150);\r
-        main.addComponent(left);\r
-\r
-        ExpandLayout center = new ExpandLayout();\r
-        center.addComponent(new Label("header"));\r
-        Panel mainContent = new Panel();\r
-        center.addComponent(mainContent);\r
-        center.expand(mainContent);\r
-        mainContent.setSizeFull();\r
-\r
-        ExpandLayout buttons = new ExpandLayout(\r
-                ExpandLayout.ORIENTATION_HORIZONTAL);\r
-        buttons.setHeight(30, ExpandLayout.UNITS_PIXELS);\r
-        Button b1 = new Button("Save");\r
-        Button b2 = new Button("Cancel");\r
-        Button b3 = new Button("Logout");\r
-        buttons.addComponent(b1);\r
-        buttons.setComponentAlignment(b1, ExpandLayout.ALIGNMENT_RIGHT,\r
-                ExpandLayout.ALIGNMENT_TOP);\r
-        buttons.addComponent(b2);\r
-        buttons.addComponent(b3);\r
-        center.addComponent(buttons);\r
-\r
-        main.addComponent(center);\r
-        main.expand(center);\r
-\r
-        Panel right = new Panel("Right column");\r
-        right.setHeight(100, Panel.UNITS_PERCENTAGE);\r
-        right.setWidth(200);\r
-\r
-        main.addComponent(right);\r
-\r
-    }\r
-}\r
diff --git a/tests/src/com/vaadin/tests/TestForExpandLayout3.java b/tests/src/com/vaadin/tests/TestForExpandLayout3.java
deleted file mode 100644 (file)
index ae4adfc..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/* \r
-@ITMillApache2LicenseForJavaFiles@\r
- */\r
-\r
-package com.vaadin.tests;\r
-\r
-import com.vaadin.ui.Button;\r
-import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.DateField;\r
-import com.vaadin.ui.ExpandLayout;\r
-\r
-/**\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class TestForExpandLayout3 extends CustomComponent {\r
-\r
-    ExpandLayout main = new ExpandLayout();\r
-\r
-    DateField df;\r
-\r
-    public TestForExpandLayout3() {\r
-        setCompositionRoot(main);\r
-        createNewView();\r
-    }\r
-\r
-    public void createNewView() {\r
-        main.removeAllComponents();\r
-\r
-        ExpandLayout el;\r
-        Button b;\r
-        Button b2;\r
-\r
-        el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
-        b = new Button("SDFS");\r
-        b2 = new Button("DSFSDFDFSSDF");\r
-\r
-        el.addComponent(b);\r
-        el.addComponent(b2);\r
-\r
-        el.expand(b);\r
-        el.setComponentAlignment(b, ExpandLayout.ALIGNMENT_RIGHT,\r
-                ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-        main.addComponent(el);\r
-\r
-        el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
-        b = new Button("SDFS");\r
-        b2 = new Button("DSFSDFDFSSDF");\r
-\r
-        el.addComponent(b);\r
-        el.addComponent(b2);\r
-\r
-        el.expand(b);\r
-        el.setComponentAlignment(b, ExpandLayout.ALIGNMENT_HORIZONTAL_CENTER,\r
-                ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-        el.setHeight(60, ExpandLayout.UNITS_PIXELS);\r
-        el.setMargin(true);\r
-        main.addComponent(el);\r
-\r
-        el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-\r
-        b = new Button("SDFS");\r
-        b2 = new Button("DSFSDFDFSSDF");\r
-\r
-        el.addComponent(b);\r
-        el.addComponent(b2);\r
-\r
-        el.expand(b);\r
-        el.setComponentAlignment(b, ExpandLayout.ALIGNMENT_RIGHT,\r
-                ExpandLayout.ALIGNMENT_BOTTOM);\r
-        el.setHeight(100, ExpandLayout.UNITS_PIXELS);\r
-        el.setSpacing(true);\r
-\r
-        main.addComponent(el);\r
-\r
-    }\r
-}\r
index 7c9788e64032d4918ea495a0d67bd1ec0c9ac8cc..7deb4479fa75c125ca651034db663d90acae0878 100644 (file)
@@ -21,11 +21,11 @@ import com.vaadin.ui.ComboBox;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Button.ClickEvent;
 
@@ -46,8 +46,8 @@ public class TestSizeableIncomponents extends Application {
         setMainWindow(w);
         w.setTheme("demo");
 
-        final ExpandLayout main = new ExpandLayout();
-        w.setLayout(main);
+        final VerticalLayout main = new VerticalLayout();
+        w.setContent(main);
 
         select = new ComboBox();
         select.setImmediate(true);
@@ -85,8 +85,7 @@ public class TestSizeableIncomponents extends Application {
             }
         });
 
-        OrderedLayout controllers = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout controllers = new HorizontalLayout();
         controllers.addComponent(prev);
         controllers.addComponent(select);
         controllers.addComponent(next);
@@ -116,10 +115,10 @@ public class TestSizeableIncomponents extends Application {
 
         testPanel = new Panel();
         testPanel.setSizeFull();
-        testPanel.setLayout(new ExpandLayout());
+        testPanel.setContent(new VerticalLayout());
         testPanel.setStyleName("testable");
         main.addComponent(testPanel);
-        main.expand(testPanel);
+        main.setExpandRatio(testPanel, 1);
 
     }
 
@@ -147,8 +146,8 @@ public class TestSizeableIncomponents extends Application {
                         t.addConfiguration(new Configuration("100px*100px") {
                             @Override
                             void configure(Component c) {
-                                c.setWidth(60);
-                                c.setHeight(60);
+                                c.setWidth("60px");
+                                c.setHeight("60px");
                             }
                         });
                         t = new Testable(c);
@@ -177,7 +176,7 @@ public class TestSizeableIncomponents extends Application {
 
                                 Panel p = new Panel(
                                         "Wrapper panel (400px*400px)");
-                                p.setLayout(new ExpandLayout());
+                                p.setContent(new VerticalLayout());
                                 p.setWidth("400px");
                                 p.setHeight("400px");
                                 p.addComponent(c);
index 52154fbe22105fa8c2bec5877724ca97a44c8f43..690555b3ad60191415f44479403ef29b380e6e7f 100644 (file)
@@ -9,11 +9,11 @@ import java.io.File;
 import com.vaadin.data.util.FilesystemContainer;
 import com.vaadin.data.util.FilesystemContainer.FileItem;
 import com.vaadin.demo.util.SampleDirectory;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Field;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Tree;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Component.Event;
 import com.vaadin.ui.Component.Listener;
@@ -45,17 +45,16 @@ public class TreeFilesystemContainer extends com.vaadin.Application implements
     public void init() {
         final Window w = new Window("Tree FilesystemContainer demo");
         setMainWindow(w);
-        final ExpandLayout main = new ExpandLayout();
-        w.setLayout(main);
+        final VerticalLayout main = new VerticalLayout();
+        w.setContent(main);
         main.setMargin(true);
         main.setSpacing(true);
 
-        propertyPanel.setHeight(120);
+        propertyPanel.setHeight("120px");
         main.addComponent(propertyPanel);
-        explorerPanel.setHeight(100);
-        explorerPanel.setHeightUnits(Panel.UNITS_PERCENTAGE);
+        explorerPanel.setHeight("100%");
         main.addComponent(explorerPanel);
-        main.expand(explorerPanel);
+        main.setExpandRatio(explorerPanel, 1);
 
         // Explorer panel contains tree
         explorerPanel.addComponent(filesystem);
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket1902.java b/tests/src/com/vaadin/tests/tickets/Ticket1902.java
deleted file mode 100644 (file)
index 716b6b9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.vaadin.tests.tickets;
-
-import com.vaadin.Application;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.OrderedLayout;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.Window;
-import com.vaadin.ui.Button.ClickEvent;
-
-public class Ticket1902 extends Application {
-
-    @Override
-    public void init() {
-
-        // Main layout and main window
-        final OrderedLayout mainLayout = new OrderedLayout();
-        setMainWindow(new Window("Testcase for #1902", mainLayout));
-        setTheme("tests-tickets");
-        mainLayout.setMargin(false);
-        mainLayout.setSpacing(true);
-        mainLayout.addComponent(new Button("mainLayout.setSizeFull()",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        mainLayout.setSizeFull();
-                        getMainWindow().showNotification(
-                                "Set the main layout size full");
-                    }
-                }));
-        mainLayout.addComponent(new Button("mainLayout.setWidth(\"100%\")",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        mainLayout.setWidth("100%");
-                        getMainWindow().showNotification(
-                                "Set the main layout width 100%");
-                    }
-                }));
-
-        // 100% wide component
-        TextField b2 = new TextField("100% wide field");
-        mainLayout.addComponent(b2);
-        b2.setWidth("100%");
-
-        // 400px wide colored layout
-        OrderedLayout lo = new OrderedLayout();
-        lo.setStyleName("red-background");
-        mainLayout.addComponent(lo);
-        lo.setWidth(400);
-
-        Button b = new Button("100% wide button");
-        lo.addComponent(b);
-        b.setWidth("100%");
-
-        TextField tf = new TextField("100% wide textfield");
-        lo.addComponent(tf);
-        tf.setWidth("100%");
-
-        // 400x100 colored layout
-        OrderedLayout lo2 = new OrderedLayout();
-        lo2.setStyleName("red-background");
-        mainLayout.addComponent(lo2);
-        lo2.setWidth("50%");
-        lo2.setHeight(200);
-
-        Button b3 = new Button("100% wide button");
-        lo2.addComponent(b3);
-        b3.setWidth("100%");
-
-        TextField tf2 = new TextField("100% wide textfield");
-        lo2.addComponent(tf2);
-        tf2.setWidth("100%");
-        // tf2 = new TextField("50% wide, 100% height textfield"); // does not
-        // work with caption (10.7.2008 mac hosted mode) due layouts are broken
-        // in trunk
-        tf2 = new TextField();
-        tf2.setRows(2); // trigger textArea impl.
-        tf2.setHeight("100%");
-        tf2.setWidth("50%");
-        lo2.addComponent(tf2);
-    }
-}
\ No newline at end of file
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket1934.java b/tests/src/com/vaadin/tests/tickets/Ticket1934.java
deleted file mode 100644 (file)
index b80dfc0..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.vaadin.tests.tickets;
-
-import com.vaadin.Application;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.ExpandLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Window;
-
-public class Ticket1934 extends Application {
-
-    @Override
-    public void init() {
-        Window w = new Window(
-                "#1934 : Horizontal ExpandLayout completely broken");
-        setMainWindow(w);
-        w.addComponent(new Label(
-                "Horizontal 500x200 ExpandLayout with two components:"));
-
-        ExpandLayout testedLayout = new ExpandLayout(
-                ExpandLayout.ORIENTATION_HORIZONTAL);
-        testedLayout.setWidth("500px");
-        testedLayout.setHeight("200px");
-
-        Button b1 = new Button("b1");
-        testedLayout.addComponent(b1);
-        testedLayout.expand(b1);
-        testedLayout.addComponent(new Button("b2"));
-
-        w.addComponent(testedLayout);
-    }
-
-}
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket2032.java b/tests/src/com/vaadin/tests/tickets/Ticket2032.java
deleted file mode 100644 (file)
index f51984f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.vaadin.tests.tickets;\r
-\r
-import com.vaadin.Application;\r
-import com.vaadin.terminal.UserError;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.GridLayout;\r
-import com.vaadin.ui.Panel;\r
-import com.vaadin.ui.TextField;\r
-import com.vaadin.ui.Window;\r
-\r
-public class Ticket2032 extends Application {\r
-\r
-    @Override\r
-    public void init() {\r
-        Window w = new Window(getClass().getSimpleName());\r
-        setMainWindow(w);\r
-        // setTheme("tests-tickets");\r
-        GridLayout layout = new GridLayout(10, 10);\r
-        w.setLayout(layout);\r
-        createUI(layout);\r
-    }\r
-\r
-    private void createUI(GridLayout layout) {\r
-        ExpandLayout el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-        Panel p = new Panel(el);\r
-        p.setWidth(600);\r
-        p.setHeight(500);\r
-        p.getLayout().setSizeFull();\r
-\r
-        TextField tf = new TextField("Field caption");\r
-        tf.setValue("Expanded");\r
-        el.addComponent(tf);\r
-        el.expand(tf);\r
-        tf.setSizeFull();\r
-\r
-        tf = new TextField("Vertical bottom");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        tf.setValue("Vertical bottom");\r
-        el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-                ExpandLayout.ALIGNMENT_BOTTOM);\r
-        el.addComponent(tf);\r
-\r
-        tf = new TextField("Vertical top");\r
-        tf.setComponentError(new UserError("Error"));\r
-        el.addComponent(tf);\r
-        tf.setValue("Vertical top");\r
-        el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-                ExpandLayout.ALIGNMENT_TOP);\r
-        tf = new TextField("Vertical center");\r
-        el.addComponent(tf);\r
-        tf.setValue("Vertical center");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-                ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
-        layout.addComponent(p);\r
-    }\r
-}\r
diff --git a/tests/src/com/vaadin/tests/tickets/Ticket2033.java b/tests/src/com/vaadin/tests/tickets/Ticket2033.java
deleted file mode 100644 (file)
index 7441956..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-package com.vaadin.tests.tickets;\r
-\r
-import com.vaadin.Application;\r
-import com.vaadin.terminal.UserError;\r
-import com.vaadin.ui.ExpandLayout;\r
-import com.vaadin.ui.GridLayout;\r
-import com.vaadin.ui.OrderedLayout;\r
-import com.vaadin.ui.Panel;\r
-import com.vaadin.ui.TextField;\r
-import com.vaadin.ui.Window;\r
-\r
-public class Ticket2033 extends Application {\r
-\r
-    @Override\r
-    public void init() {\r
-        Window w = new Window(getClass().getSimpleName());\r
-        setMainWindow(w);\r
-        // setTheme("tests-tickets");\r
-        GridLayout layout = new GridLayout(2, 2);\r
-        w.setLayout(layout);\r
-        createUI(layout);\r
-    }\r
-\r
-    private void createUI(GridLayout layout) {\r
-        layout.addComponent(createExpandLayoutPanel());\r
-        layout.addComponent(createOrderedLayoutPanel());\r
-        layout.addComponent(createGridLayoutPanel());\r
-    }\r
-\r
-    private Panel createExpandLayoutPanel() {\r
-        ExpandLayout el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-        Panel p = new Panel("ExpandLayout", el);\r
-        p.setWidth(600);\r
-        p.setHeight(500);\r
-        p.getLayout().setSizeFull();\r
-\r
-        TextField tf = new TextField("TextField 1");\r
-        tf.setValue("Expanded");\r
-        el.addComponent(tf);\r
-        el.expand(tf);\r
-        tf.setSizeFull();\r
-\r
-        tf = new TextField("TextField 2 has a longer caption");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        tf.setWidth(100);\r
-        tf.setValue("Vertical bottom");\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_BOTTOM);\r
-        el.addComponent(tf);\r
-\r
-        tf = new TextField(\r
-                "TextField 3 has a very, very long caption for some weird reason.");\r
-        tf.setWidth(100);\r
-        tf.setComponentError(new UserError("Error"));\r
-        el.addComponent(tf);\r
-        tf.setValue("Vertical top");\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_TOP);\r
-        tf = new TextField("TextField 4");\r
-        el.addComponent(tf);\r
-        tf.setValue("Vertical center");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
-        return p;\r
-    }\r
-\r
-    private Panel createOrderedLayoutPanel() {\r
-        OrderedLayout ol = new OrderedLayout(\r
-                ExpandLayout.ORIENTATION_HORIZONTAL);\r
-        Panel p = new Panel("OrderedLayout", ol);\r
-        p.setWidth(600);\r
-        p.setHeight(500);\r
-        p.getLayout().setSizeFull();\r
-\r
-        TextField tf = new TextField("TextField 1");\r
-        tf.setValue("Expanded");\r
-        ol.addComponent(tf);\r
-        // ol.expand(tf);\r
-        tf.setSizeFull();\r
-\r
-        tf = new TextField("TextField 2 has a longer caption");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        tf.setWidth(100);\r
-        tf.setValue("Vertical bottom");\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_BOTTOM);\r
-        ol.addComponent(tf);\r
-\r
-        tf = new TextField(\r
-                "TextField 3 has a very, very long caption for some weird reason.");\r
-        tf.setWidth(100);\r
-        tf.setComponentError(new UserError("Error"));\r
-        ol.addComponent(tf);\r
-        tf.setValue("Vertical top");\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_TOP);\r
-        tf = new TextField("TextField 4");\r
-        ol.addComponent(tf);\r
-        tf.setValue("Vertical center");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
-        return p;\r
-    }\r
-\r
-    private Panel createGridLayoutPanel() {\r
-        GridLayout gl = new GridLayout(4, 1);\r
-        Panel p = new Panel("GridLayout", gl);\r
-        p.setWidth(600);\r
-        p.setHeight(500);\r
-        p.getLayout().setSizeFull();\r
-\r
-        TextField tf = new TextField("TextField 1");\r
-        tf.setValue("Expanded");\r
-        gl.addComponent(tf);\r
-        // ol.expand(tf);\r
-        tf.setSizeFull();\r
-\r
-        tf = new TextField("TextField 2 has a longer caption");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        tf.setWidth(100);\r
-        tf.setValue("Vertical bottom");\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_BOTTOM);\r
-        gl.addComponent(tf);\r
-\r
-        tf = new TextField(\r
-                "TextField 3 has a very, very long caption for some weird reason.");\r
-        tf.setWidth(100);\r
-        tf.setComponentError(new UserError("Error"));\r
-        gl.addComponent(tf);\r
-        tf.setValue("Vertical top");\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_TOP);\r
-        tf = new TextField("TextField 4");\r
-        gl.addComponent(tf);\r
-        tf.setValue("Vertical center");\r
-        // tf.setComponentError(new UserError("Error"));\r
-        // el.setComponentAlignment(tf, ExpandLayout.ALIGNMENT_LEFT,\r
-        // ExpandLayout.ALIGNMENT_VERTICAL_CENTER);\r
-\r
-        return p;\r
-    }\r
-}\r
index 77381dcbfde26e4357c808f5da22bd972c7265bf..9f4b754325e900e8eb4de6235c62fe6bf9641424 100644 (file)
@@ -8,12 +8,11 @@ import com.vaadin.data.util.HierarchicalContainer;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
 import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
@@ -28,14 +27,14 @@ public class Ticket2061c extends Application implements
     public void init() {
         mainWindow = new Window("Vaadin");
         mainWindow.setSizeFull();
-        mainWindow.getLayout().setSizeFull();
+        mainWindow.getContent().setSizeFull();
         setMainWindow(mainWindow);
 
-        OrderedLayout ol = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
         ol.setWidth("200px");
         ol.setHeight("200px");
 
-        OrderedLayout ol2 = new OrderedLayout();
+        VerticalLayout ol2 = new VerticalLayout();
         ol2.setSizeFull();
 
         p = new Panel("This is a panel");
@@ -63,7 +62,7 @@ public class Ticket2061c extends Application implements
 
         private Table table = new Table();
         private String[] columns;
-        private ExpandLayout layout = new ExpandLayout();
+        private VerticalLayout layout = new VerticalLayout();
 
         public MyTable(int columnNumber, String id) {
             setDebugId(id);