]> source.dussan.org Git - vaadin-framework.git/commitdiff
Removed use of deprecated OrderedLayout (#5749)
authorArtur Signell <artur.signell@itmill.com>
Thu, 7 Oct 2010 06:34:58 +0000 (06:34 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 7 Oct 2010 06:34:58 +0000 (06:34 +0000)
svn changeset:15431/svn branch:6.5

37 files changed:
tests/src/com/vaadin/tests/TestComponentAddAndRecursion.java
tests/src/com/vaadin/tests/TestForAlignments.java
tests/src/com/vaadin/tests/TestForContainerFilterable.java
tests/src/com/vaadin/tests/TestForPreconfiguredComponents.java
tests/src/com/vaadin/tests/TestForTrees.java
tests/src/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
tests/src/com/vaadin/tests/featurebrowser/Feature.java
tests/src/com/vaadin/tests/featurebrowser/FeatureOrderedLayout.java
tests/src/com/vaadin/tests/featurebrowser/FeatureTextField.java
tests/src/com/vaadin/tests/featurebrowser/PropertyPanel.java
tests/src/com/vaadin/tests/layouts/OrderedLayoutCSSCompatibility.java
tests/src/com/vaadin/tests/tickets/Ticket1435.java
tests/src/com/vaadin/tests/tickets/Ticket1572.java
tests/src/com/vaadin/tests/tickets/Ticket1805.java
tests/src/com/vaadin/tests/tickets/Ticket1878.java
tests/src/com/vaadin/tests/tickets/Ticket1916.java
tests/src/com/vaadin/tests/tickets/Ticket1966.java
tests/src/com/vaadin/tests/tickets/Ticket1966_2.java
tests/src/com/vaadin/tests/tickets/Ticket1966_3.java
tests/src/com/vaadin/tests/tickets/Ticket2021.java
tests/src/com/vaadin/tests/tickets/Ticket2029.java
tests/src/com/vaadin/tests/tickets/Ticket2061b.java
tests/src/com/vaadin/tests/tickets/Ticket2151.java
tests/src/com/vaadin/tests/tickets/Ticket2157.java
tests/src/com/vaadin/tests/tickets/Ticket2178.java
tests/src/com/vaadin/tests/tickets/Ticket2204.java
tests/src/com/vaadin/tests/tickets/Ticket2221.java
tests/src/com/vaadin/tests/tickets/Ticket2222.java
tests/src/com/vaadin/tests/tickets/Ticket2227OrderedlayoutInTable.java
tests/src/com/vaadin/tests/tickets/Ticket2231.java
tests/src/com/vaadin/tests/tickets/Ticket2234.java
tests/src/com/vaadin/tests/tickets/Ticket2235.java
tests/src/com/vaadin/tests/tickets/Ticket2240.java
tests/src/com/vaadin/tests/tickets/Ticket2242.java
tests/src/com/vaadin/tests/tickets/Ticket2271.java
tests/src/com/vaadin/tests/tickets/Ticket2294.java
tests/src/com/vaadin/tests/util/RandomComponents.java

index 473c0b5674897fbe790ff88368247c0f232d653a..711003010e466c3158d6c784d7027b8bd60236cf 100644 (file)
@@ -8,7 +8,6 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CustomComponent;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
@@ -44,9 +43,9 @@ public class TestComponentAddAndRecursion extends CustomComponent {
         Button b = new Button("use gridlayout", new Button.ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                p.setLayout(new GridLayout());\r
-                p2.setLayout(new GridLayout());\r
-                p3.setLayout(new GridLayout());\r
+                p.setContent(new GridLayout());\r
+                p2.setContent(new GridLayout());\r
+                p3.setContent(new GridLayout());\r
             }\r
 \r
         });\r
@@ -54,9 +53,9 @@ public class TestComponentAddAndRecursion extends CustomComponent {
         b = new Button("use orderedlayout", new Button.ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                p.setLayout(new OrderedLayout());\r
-                p2.setLayout(new OrderedLayout());\r
-                p3.setLayout(new OrderedLayout());\r
+                p.setContent(new VerticalLayout());\r
+                p2.setContent(new VerticalLayout());\r
+                p3.setContent(new VerticalLayout());\r
             }\r
 \r
         });\r
index 8315169cb9523cfd3349376c4ba2123dda906b14..4296744224320639cb411f755eadf36fa3ef1aeb 100644 (file)
@@ -4,11 +4,11 @@
 
 package com.vaadin.tests;
 
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
 
@@ -33,20 +33,20 @@ public class TestForAlignments extends CustomComponent {
         vert.addComponent(t1);
         vert.addComponent(d1);
         // vert.getSize().setWidth(500);
-        vert.setComponentAlignment(b1, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);
-        vert.setComponentAlignment(b2, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_TOP);
-        vert.setComponentAlignment(t1, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);
-        vert.setComponentAlignment(d1, OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER, OrderedLayout.ALIGNMENT_TOP);
+        vert.setComponentAlignment(b1, Alignment.TOP_RIGHT);
+        vert.setComponentAlignment(b2, Alignment.TOP_LEFT);
+        vert.setComponentAlignment(t1, Alignment.TOP_RIGHT);
+        vert.setComponentAlignment(d1, Alignment.TOP_CENTER);
         final HorizontalLayout hori = new HorizontalLayout();
         hori.addComponent(b3);
         hori.addComponent(b4);
         hori.addComponent(t2);
         hori.addComponent(d2);
         // hori.getSize().setHeight(200);
-        hori.setComponentAlignment(b3, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);
-        hori.setComponentAlignment(b4, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_TOP);
-        hori.setComponentAlignment(t2, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);
-        hori.setComponentAlignment(d2, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_VERTICAL_CENTER);
+        hori.setComponentAlignment(b3, Alignment.BOTTOM_LEFT);
+        hori.setComponentAlignment(b4, Alignment.TOP_LEFT);
+        hori.setComponentAlignment(t2, Alignment.BOTTOM_LEFT);
+        hori.setComponentAlignment(d2, Alignment.MIDDLE_LEFT);
 
         main.addComponent(vert);
         main.addComponent(hori);
index f521ba63bf6fa578963437a86108dfbb4809ddaf..3abd57c5a05723b4b15c0af1319dd5858cfa1fbb 100644 (file)
@@ -8,8 +8,8 @@ import com.vaadin.data.util.IndexedContainer;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CustomComponent;
+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.TextField;
@@ -39,7 +39,7 @@ public class TestForContainerFilterable extends CustomComponent {
         }
 
         // Init filtering view
-        final Panel filterPanel = new Panel("Filter", new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL));
+        final Panel filterPanel = new Panel("Filter", new HorizontalLayout());
         filterPanel.setWidth(100, Panel.UNITS_PERCENTAGE);
         lo.addComponent(filterPanel);
         filterPanel.addComponent(fooFilter);
index edc2ca3105ca72ca68c05142211af27f7114beed..0a2589770cc634960f192c2ce8752b2c735ea2f6 100644 (file)
@@ -121,7 +121,7 @@ public class TestForPreconfiguredComponents extends CustomComponent implements H
 
     public Panel createTestBench(Component t) {
         final Panel ol = new Panel();
-        ol.setLayout(new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL));
+        ol.setLayout(new HorizontalLayout());
 
         ol.addComponent(t);
 
index f1ec2eba121dea7f3d94a2210d4b72281dba0d20..76341cb314e3bc3bff310688e5dc47b669e56d9e 100644 (file)
@@ -6,6 +6,7 @@ package com.vaadin.tests;
 
 import com.vaadin.event.Action;
 import com.vaadin.event.Action.Handler;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;
@@ -13,7 +14,6 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.VerticalLayout;
@@ -75,7 +75,7 @@ public class TestForTrees extends CustomComponent implements Handler {
         t.setCaption("with actions");
         t.setImmediate(true);
         t.addActionHandler(this);
-        final OrderedLayout ol = (OrderedLayout) createTestBench(t);
+        final AbstractOrderedLayout ol = (AbstractOrderedLayout) createTestBench(t);
         al = new Panel("action log");
         ol.addComponent(al);
         main.addComponent(ol);
index da4cd1edb375c524fd109a3382552009ec9aa1f8..5a72a34be9d117b0367ae6617aa06e1ec3748996 100644 (file)
@@ -7,11 +7,10 @@ package com.vaadin.tests;
 import java.util.Collection;
 import java.util.Vector;
 
-import com.vaadin.ui.AbstractLayout;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.DateField;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.VerticalLayout;
@@ -28,7 +27,7 @@ import com.vaadin.ui.VerticalLayout;
 public class TestSelectAndDatefieldInDeepLayouts extends CustomComponent {
 
     public TestSelectAndDatefieldInDeepLayouts() {
-        final OrderedLayout root = (OrderedLayout) getOrderedLayout();
+        final AbstractOrderedLayout root = getOrderedLayout();
         setCompositionRoot(root);
 
         root.addComponent(getSelect());
@@ -44,7 +43,7 @@ public class TestSelectAndDatefieldInDeepLayouts extends CustomComponent {
         p1.addComponent(getSelect());
         p1.addComponent(getDateField());
 
-        final OrderedLayout l1 = (OrderedLayout) getOrderedLayout();
+        final AbstractOrderedLayout l1 = getOrderedLayout();
         p1.addComponent(l1);
 
         l1.addComponent(getSelect());
@@ -62,7 +61,7 @@ public class TestSelectAndDatefieldInDeepLayouts extends CustomComponent {
 
     }
 
-    AbstractLayout getOrderedLayout() {
+    VerticalLayout getOrderedLayout() {
         final VerticalLayout l = new VerticalLayout();
         l.setCaption(getCaption("orderedlayout"));
         return l;
index df7293d3743cee282b2bc43eb61770ff2a570c47..842a89c44636cc072ab87e07f78c31cfee534a60 100644 (file)
@@ -9,8 +9,8 @@ import com.vaadin.terminal.Resource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Embedded;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.VerticalLayout;
 
@@ -80,8 +80,8 @@ public abstract class Feature extends CustomComponent {
         // Description tab
         final String title = getTitle();
         if (getDescriptionXHTML() != null) {
-            final OrderedLayout mainLayout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
-            final OrderedLayout layout = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
+            final VerticalLayout mainLayout = new VerticalLayout();
+            final HorizontalLayout layout = new HorizontalLayout();
             mainLayout.addComponent(layout);
             if (getImage() != null) {
                 layout.addComponent(new Embedded("", new ClassResource(getImage(), getApplication())));
index 95c2b405c3b6e540b0a7206ae8a9f6f1c1f50f2d..dfee2df6184424b14aa87fddc134115a2d951844 100644 (file)
@@ -5,8 +5,6 @@
 package com.vaadin.tests.featurebrowser;
 
 import com.vaadin.ui.Component;
-import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
@@ -30,11 +28,15 @@ public class FeatureOrderedLayout extends Feature {
 
         // Properties
         propertyPanel = new PropertyPanel(ol);
-        final Form ap = propertyPanel.createBeanPropertySet(new String[] { "orientation" });
-        ap.replaceWithSelect("orientation", new Object[] { new Integer(OrderedLayout.ORIENTATION_HORIZONTAL), new Integer(OrderedLayout.ORIENTATION_VERTICAL) }, new Object[] { "Horizontal", "Vertical" });
+        // final Form ap = propertyPanel.createBeanPropertySet(new String[] {
+        // "orientation" });
+        // ap.replaceWithSelect("orientation", new Object[] { new
+        // Integer(AbstractOrderedLayout.ORIENTATION_HORIZONTAL), new
+        // Integer(AbstractOrderedLayout.ORIENTATION_VERTICAL) }, new Object[] {
+        // "Horizontal", "Vertical" });
         final Select themes = (Select) propertyPanel.getField("style");
         themes.addItem("form").getItemProperty(themes.getItemCaptionPropertyId()).setValue("form");
-        propertyPanel.addProperties("OrderedLayout Properties", ap);
+        // propertyPanel.addProperties("OrderedLayout Properties", ap);
 
         setJavadocURL("ui/OrderedLayout.html");
 
@@ -43,7 +45,7 @@ public class FeatureOrderedLayout extends Feature {
 
     @Override
     protected String getExampleSrc() {
-        return "OrderedLayout ol = new OrderedLayout(OrderedLayout.ORIENTATION_FLOW);\n" + "ol.addComponent(new TextField(\"Textfield caption\"));\n" + "ol.addComponent(new Label(\"Label\"));\n";
+        return "OrderedLayout ol = new OrderedLayout(AbstractOrderedLayout.ORIENTATION_FLOW);\n" + "ol.addComponent(new TextField(\"Textfield caption\"));\n" + "ol.addComponent(new Label(\"Label\"));\n";
 
     }
 
index f2612ec8575b40a8b83072c9141a28eae9945a7e..00db4c570896d718c4b71003be4a1b4b46cb054c 100644 (file)
@@ -6,7 +6,7 @@ package com.vaadin.tests.featurebrowser;
 
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.TextField;
 
 public class FeatureTextField extends Feature {
@@ -18,18 +18,14 @@ public class FeatureTextField extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
-
+        final HorizontalLayout l = new HorizontalLayout();
         // Test component
         final TextField tf = new TextField("Caption");
         l.addComponent(tf);
 
         // Properties
         propertyPanel = new PropertyPanel(tf);
-        final Form f = propertyPanel.createBeanPropertySet(new String[] {
-                "columns", "rows", "wordwrap", "writeThrough", "readThrough",
-                "nullRepresentation", "nullSettingAllowed", "secret" });
+        final Form f = propertyPanel.createBeanPropertySet(new String[] { "columns", "rows", "wordwrap", "writeThrough", "readThrough", "nullRepresentation", "nullSettingAllowed", "secret" });
         propertyPanel.addProperties("Text field properties", f);
 
         setJavadocURL("ui/TextField.html");
@@ -39,8 +35,7 @@ public class FeatureTextField extends Feature {
 
     @Override
     protected String getExampleSrc() {
-        return "TextField tf = new TextField(\"Caption\");\n"
-                + "tf.setValue(\"Contents\");";
+        return "TextField tf = new TextField(\"Caption\");\n" + "tf.setValue(\"Contents\");";
     }
 
     /**
@@ -48,16 +43,7 @@ public class FeatureTextField extends Feature {
      */
     @Override
     protected String getDescriptionXHTML() {
-        return "TextField combines the logic of both the single line text-entry field and the multi-line "
-                + "text-area into one component. "
-                + "As with all Data-components of Vaadin, the TextField can also be bound to an "
-                + "underlying data source, both directly or in a buffered (asynchronous) "
-                + "mode. In buffered mode its background color will change to indicate "
-                + "that the value has changed but is not committed."
-                + "<br /><br />Furthermore a validators may be bound to the component to "
-                + "check and validate the given input before it is actually committed."
-                + "<br /><br />On the demo tab you can try out how the different properties affect the "
-                + "presentation of the component.";
+        return "TextField combines the logic of both the single line text-entry field and the multi-line " + "text-area into one component. " + "As with all Data-components of Vaadin, the TextField can also be bound to an " + "underlying data source, both directly or in a buffered (asynchronous) " + "mode. In buffered mode its background color will change to indicate " + "that the value has changed but is not committed." + "<br /><br />Furthermore a validators may be bound to the component to " + "check and validate the given input before it is actually committed." + "<br /><br />On the demo tab you can try out how the different properties affect the " + "presentation of the component.";
     }
 
     @Override
index 8ec16b12f025d8763aaa4d6928a2f2fec48c4dad..cc70330d524c709148d58da7949539a3fb74ec2a 100644 (file)
@@ -27,8 +27,8 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Field;
 import com.vaadin.ui.Form;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.Table;
@@ -37,8 +37,7 @@ import com.vaadin.ui.Tree;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
-public class PropertyPanel extends Panel implements Button.ClickListener,
-        Property.ValueChangeListener {
+public class PropertyPanel extends Panel implements Button.ClickListener, Property.ValueChangeListener {
 
     private Select addComponent;
 
@@ -74,8 +73,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
         config = new BeanItem<Object>(objectToConfigure);
 
         // Control buttons
-        final OrderedLayout buttons = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        final HorizontalLayout buttons = new HorizontalLayout();
         buttons.setMargin(false, true, true, true);
         buttons.addComponent(setButton);
         buttons.addComponent(discardButton);
@@ -86,8 +84,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
         if (objectToConfigure instanceof Select) {
             addSelectProperties();
         }
-        if (objectToConfigure instanceof AbstractField
-                && !(objectToConfigure instanceof Table || objectToConfigure instanceof Tree)) {
+        if (objectToConfigure instanceof AbstractField && !(objectToConfigure instanceof Table || objectToConfigure instanceof Tree)) {
             addFieldProperties();
         }
         if ((objectToConfigure instanceof AbstractComponentContainer)) {
@@ -99,8 +96,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
         allProperties.addContainerProperty("Type", String.class, "");
         allProperties.addContainerProperty("R/W", String.class, "");
         allProperties.addContainerProperty("Demo", String.class, "");
-        allProperties.setColumnAlignments(new String[] { Table.ALIGN_LEFT,
-                Table.ALIGN_LEFT, Table.ALIGN_CENTER, Table.ALIGN_CENTER });
+        allProperties.setColumnAlignments(new String[] { Table.ALIGN_LEFT, Table.ALIGN_LEFT, Table.ALIGN_CENTER, Table.ALIGN_CENTER });
         allProperties.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_ID);
         allProperties.setPageLength(0);
         allProperties.setSizeFull();
@@ -151,12 +147,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
 
         // Fill the table
         for (int i = 0; i < pd.length; i++) {
-            allProperties.addItem(
-                    new Object[] { pd[i].getName(),
-                            pd[i].getPropertyType().getName(),
-                            (pd[i].getWriteMethod() == null ? "R" : "R/W"),
-                            (listed.contains(pd[i].getName()) ? "x" : "") },
-                    pd[i]);
+            allProperties.addItem(new Object[] { pd[i].getName(), pd[i].getPropertyType().getName(), (pd[i].getWriteMethod() == null ? "R" : "R/W"), (listed.contains(pd[i].getName()) ? "x" : "") }, pd[i]);
         }
     }
 
@@ -164,14 +155,10 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
     private void addBasicComponentProperties() {
 
         // Set of properties
-        final Form set = createBeanPropertySet(new String[] { "caption",
-                "icon", "componentError", "description", "enabled", "visible",
-                "style", "readOnly", "immediate" });
+        final Form set = createBeanPropertySet(new String[] { "caption", "icon", "componentError", "description", "enabled", "visible", "style", "readOnly", "immediate" });
 
         // Icon
-        set.replaceWithSelect("icon", new Object[] { null,
-                new ThemeResource("icon/files/file.gif") }, new Object[] {
-                "No icon", "Sample icon" });
+        set.replaceWithSelect("icon", new Object[] { null, new ThemeResource("icon/files/file.gif") }, new Object[] { "No icon", "Sample icon" });
 
         // Component error
         Throwable sampleException;
@@ -180,85 +167,26 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
         } catch (final NullPointerException e) {
             sampleException = e;
         }
-        set.replaceWithSelect(
-                "componentError",
-                new Object[] {
-                        null,
-                        new UserError("Sample text error message."),
-                        new UserError(
-                                "<h3>Error message formatting</h3><p>Error messages can "
-                                        + "contain any UIDL formatting, like: <ul><li><b>Bold"
-                                        + "</b></li><li><i>Italic</i></li></ul></p>",
-                                UserError.CONTENT_UIDL,
-                                ErrorMessage.INFORMATION),
-                        new SystemError(
-                                "This is an example of exception error reposting",
-                                sampleException) }, new Object[] { "No error",
-                        "Sample text error", "Sample Formatted error",
-                        "Sample System Error" });
+        set.replaceWithSelect("componentError", new Object[] { null, new UserError("Sample text error message."), new UserError("<h3>Error message formatting</h3><p>Error messages can " + "contain any UIDL formatting, like: <ul><li><b>Bold" + "</b></li><li><i>Italic</i></li></ul></p>", UserError.CONTENT_UIDL, ErrorMessage.INFORMATION), new SystemError("This is an example of exception error reposting", sampleException) }, new Object[] { "No error", "Sample text error", "Sample Formatted error", "Sample System Error" });
 
         // Style
-        final String currentStyle = ((Component) objectToConfigure)
-                .getStyleName();
+        final String currentStyle = ((Component) objectToConfigure).getStyleName();
         if (currentStyle == null) {
-            set.replaceWithSelect("style", new Object[] { null },
-                    new Object[] { "Default" }).setNewItemsAllowed(true);
+            set.replaceWithSelect("style", new Object[] { null }, new Object[] { "Default" }).setNewItemsAllowed(true);
         } else {
-            set.replaceWithSelect("style", new Object[] { null, currentStyle },
-                    new Object[] { "Default", currentStyle })
-                    .setNewItemsAllowed(true);
+            set.replaceWithSelect("style", new Object[] { null, currentStyle }, new Object[] { "Default", currentStyle }).setNewItemsAllowed(true);
         }
 
         // Set up descriptions
-        set.getField("caption")
-                .setDescription(
-                        "Component caption is the title of the component. Usage of the caption is optional and the "
-                                + "exact behavior of the propery is defined by the component. Setting caption null "
-                                + "or empty disables the caption.");
-        set.getField("enabled")
-                .setDescription(
-                        "Enabled property controls the usage of the component. If the component is disabled (enabled=false),"
-                                + " it can not receive any events from the terminal. In most cases it makes the usage"
-                                + " of the component easier, if the component visually looks disbled (for example is grayed), "
-                                + "when it can not be used.");
-        set.getField("icon")
-                .setDescription(
-                        "Icon of the component selects the main icon of the component. The usage of the icon is identical "
-                                + "to caption and in most components caption and icon are kept together. Icons can be "
-                                + "loaded from any resources (see Terminal/Resources for more information). Some components "
-                                + "contain more than just the captions icon. Those icons are controlled through their "
-                                + "own properties.");
-        set.getField("visible")
-                .setDescription(
-                        "Visibility property says if the component is renreded or not. Invisible components are implicitly "
-                                + "disabled, as there is no visible user interface to send event.");
-        set.getField("description")
-                .setDescription(
-                        "Description is designed to allow easy addition of short tooltips, like this. Like the caption,"
-                                + " setting description null or empty disables the description.");
-        set.getField("readOnly")
-                .setDescription(
-                        "Those components that have internal state that can be written are settable to readOnly-mode,"
-                                + " where the object can only be read, not written.");
-        set.getField("componentError")
-                .setDescription(
-                        "Vaadin supports extensive error reporting. One part of the error reporting are component"
-                                + " errors that can be controlled by the programmer. This example only contains couple of "
-                                + "sample errors; to get the full picture, read browse ErrorMessage-interface implementors "
-                                + "API documentation.");
-        set.getField("immediate")
-                .setDescription(
-                        "Not all terminals can send the events immediately to server from all action. Web is the most "
-                                + "typical environment where many events (like textfield changed) are not sent to server, "
-                                + "before they are explicitly submitted. Setting immediate property true (by default this "
-                                + "is false for most components), the programmer can assure that the application is"
-                                + " notified as soon as possible about the value change in this component.");
-        set.getField("style")
-                .setDescription(
-                        "Themes specify the overall looks of the user interface. In addition component can have a set of "
-                                + "styles, that can be visually very different (like datefield calendar- and text-styles), "
-                                + "but contain the same logical functionality. As a rule of thumb, theme specifies if a "
-                                + "component is blue or yellow and style determines how the component is used.");
+        set.getField("caption").setDescription("Component caption is the title of the component. Usage of the caption is optional and the " + "exact behavior of the propery is defined by the component. Setting caption null " + "or empty disables the caption.");
+        set.getField("enabled").setDescription("Enabled property controls the usage of the component. If the component is disabled (enabled=false)," + " it can not receive any events from the terminal. In most cases it makes the usage" + " of the component easier, if the component visually looks disbled (for example is grayed), " + "when it can not be used.");
+        set.getField("icon").setDescription("Icon of the component selects the main icon of the component. The usage of the icon is identical " + "to caption and in most components caption and icon are kept together. Icons can be " + "loaded from any resources (see Terminal/Resources for more information). Some components " + "contain more than just the captions icon. Those icons are controlled through their " + "own properties.");
+        set.getField("visible").setDescription("Visibility property says if the component is renreded or not. Invisible components are implicitly " + "disabled, as there is no visible user interface to send event.");
+        set.getField("description").setDescription("Description is designed to allow easy addition of short tooltips, like this. Like the caption," + " setting description null or empty disables the description.");
+        set.getField("readOnly").setDescription("Those components that have internal state that can be written are settable to readOnly-mode," + " where the object can only be read, not written.");
+        set.getField("componentError").setDescription("Vaadin supports extensive error reporting. One part of the error reporting are component" + " errors that can be controlled by the programmer. This example only contains couple of " + "sample errors; to get the full picture, read browse ErrorMessage-interface implementors " + "API documentation.");
+        set.getField("immediate").setDescription("Not all terminals can send the events immediately to server from all action. Web is the most " + "typical environment where many events (like textfield changed) are not sent to server, " + "before they are explicitly submitted. Setting immediate property true (by default this " + "is false for most components), the programmer can assure that the application is" + " notified as soon as possible about the value change in this component.");
+        set.getField("style").setDescription("Themes specify the overall looks of the user interface. In addition component can have a set of " + "styles, that can be visually very different (like datefield calendar- and text-styles), " + "but contain the same logical functionality. As a rule of thumb, theme specifies if a " + "component is blue or yellow and style determines how the component is used.");
 
         // Add created fields to property panel
         addProperties("Component Basics", set);
@@ -274,17 +202,11 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
 
     /** Add properties for selecting */
     private void addSelectProperties() {
-        final Form set = createBeanPropertySet(new String[] {
-                "newItemsAllowed", "lazyLoading", "multiSelect" });
+        final Form set = createBeanPropertySet(new String[] { "newItemsAllowed", "lazyLoading", "multiSelect" });
         addProperties("Select Properties", set);
 
-        set.getField("multiSelect").setDescription(
-                "Specified if multiple items can be selected at once.");
-        set.getField("newItemsAllowed")
-                .setDescription(
-                        "Select component (but not Tree or Table) can allow the user to directly "
-                                + "add new items to set of options. The new items are constrained to be "
-                                + "strings and thus feature only applies to simple lists.");
+        set.getField("multiSelect").setDescription("Specified if multiple items can be selected at once.");
+        set.getField("newItemsAllowed").setDescription("Select component (but not Tree or Table) can allow the user to directly " + "add new items to set of options. The new items are constrained to be " + "strings and thus feature only applies to simple lists.");
         /*
          * Button ll = (Button) set.getField("lazyLoading"); ll
          * .setDescription("In Ajax rendering mode select supports lazy loading
@@ -294,8 +216,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
          * set.getField("multiSelect").setVisible(false);
          * set.getField("newItemsAllowed").setVisible(false); }
          */
-        if (objectToConfigure instanceof Tree
-                || objectToConfigure instanceof Table) {
+        if (objectToConfigure instanceof Tree || objectToConfigure instanceof Table) {
             set.removeItemProperty("newItemsAllowed");
             set.removeItemProperty("lazyLoading");
         }
@@ -307,9 +228,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
         final Form set = createBeanPropertySet(new String[] { "required" });
 
         set.addField("focus", new Button("Focus", objectToConfigure, "focus"));
-        set.getField("focus").setDescription(
-                "Focus the cursor to this field. Not all "
-                        + "components and/or terminals support this feature.");
+        set.getField("focus").setDescription("Focus the cursor to this field. Not all " + "components and/or terminals support this feature.");
 
         addProperties("Field Features", set);
 
@@ -320,8 +239,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
      * container
      */
     private void addComponentContainerProperties() {
-        final Form set = new Form(new OrderedLayout(
-                OrderedLayout.ORIENTATION_VERTICAL));
+        final Form set = new Form(new VerticalLayout());
 
         addComponent = new Select();
         addComponent.setImmediate(true);
@@ -332,9 +250,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
         addComponent.addListener(this);
 
         set.addField("component adder", addComponent);
-        set.addField("remove all components", new Button(
-                "Remove all components", objectToConfigure,
-                "removeAllComponents"));
+        set.addField("remove all components", new Button("Remove all components", objectToConfigure, "removeAllComponents"));
 
         addProperties("ComponentContainer Features", set);
     }
@@ -344,11 +260,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
 
         // FIXME: navigation statistics
         try {
-            FeatureUtil.debug(
-                    getApplication().getUser().toString(),
-                    "valueChange "
-                            + ((AbstractComponent) event.getProperty())
-                                    .getTag() + ", " + event.getProperty());
+            FeatureUtil.debug(getApplication().getUser().toString(), "valueChange " + ((AbstractComponent) event.getProperty()).getTag() + ", " + event.getProperty());
         } catch (final Exception e) {
             // ignored, should never happen
         }
@@ -360,8 +272,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
             if (value != null) {
                 // TextField component
                 if (value.equals("Text field")) {
-                    ((AbstractComponentContainer) objectToConfigure)
-                            .addComponent(new TextField("Test field"));
+                    ((AbstractComponentContainer) objectToConfigure).addComponent(new TextField("Test field"));
                 }
 
                 // DateField time style
@@ -370,8 +281,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
                     d.setDescription("This is a DateField-component with text-style");
                     d.setResolution(DateField.RESOLUTION_MIN);
                     d.setStyleName("text");
-                    ((AbstractComponentContainer) objectToConfigure)
-                            .addComponent(d);
+                    ((AbstractComponentContainer) objectToConfigure).addComponent(d);
                 }
 
                 // Date field calendar style
@@ -380,8 +290,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
                     c.setDescription("DateField-component with calendar-style and day-resolution");
                     c.setStyleName("calendar");
                     c.setResolution(DateField.RESOLUTION_DAY);
-                    ((AbstractComponentContainer) objectToConfigure)
-                            .addComponent(c);
+                    ((AbstractComponentContainer) objectToConfigure).addComponent(c);
                 }
 
                 // Select option group style
@@ -393,15 +302,13 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
                     s.addItem("Solaris");
                     s.addItem("Symbian");
 
-                    ((AbstractComponentContainer) objectToConfigure)
-                            .addComponent(s);
+                    ((AbstractComponentContainer) objectToConfigure).addComponent(s);
                 }
 
                 addComponent.setValue(null);
             }
         } else if (event.getProperty() == getField("lazyLoading")) {
-            final boolean newValue = ((Boolean) event.getProperty().getValue())
-                    .booleanValue();
+            final boolean newValue = ((Boolean) event.getProperty().getValue()).booleanValue();
             final Field multiselect = getField("multiSelect");
             final Field newitems = getField("newItemsAllowed");
             if (newValue) {
@@ -420,10 +327,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
     public void buttonClick(Button.ClickEvent event) {
         // FIXME: navigation statistics
         try {
-            FeatureUtil.debug(getApplication().getUser().toString(),
-                    "buttonClick " + event.getButton().getTag() + ", "
-                            + event.getButton().getCaption() + ", "
-                            + event.getButton().getValue());
+            FeatureUtil.debug(getApplication().getUser().toString(), "buttonClick " + event.getButton().getTag() + ", " + event.getButton().getCaption() + ", " + event.getButton().getValue());
         } catch (final Exception e) {
             // ignored, should never happen
         }
@@ -446,8 +350,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
      */
     protected Form createBeanPropertySet(String names[]) {
 
-        final Form set = new Form(new OrderedLayout(
-                OrderedLayout.ORIENTATION_VERTICAL));
+        final Form set = new Form(new VerticalLayout());
 
         for (int i = 0; i < names.length; i++) {
             final Property p = config.getItemProperty(names[i]);
index 6073edf249ff3610ada57beef2bd50e656c14fab..41f1de2c4ae4efac8e4e4fcc30e3b482daf5d789 100644 (file)
@@ -1,7 +1,7 @@
 package com.vaadin.tests.layouts;
 
 import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.TextField;
 
 public class OrderedLayoutCSSCompatibility extends TestBase {
@@ -18,8 +18,7 @@ public class OrderedLayoutCSSCompatibility extends TestBase {
 
     @Override
     protected void setup() {
-        OrderedLayout l = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout l = new HorizontalLayout();
         l.setMargin(true);
         l.setSpacing(true);
         l.addComponent(new TextField("abc"));
index fea1000ffed097101bb7c7cf04115914c0e9544b..8ca9292fcb494c1db31a8c0fd8db69a4f6a72375 100644 (file)
@@ -1,6 +1,7 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CheckBox;
@@ -9,7 +10,6 @@ import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.VerticalLayout;
@@ -24,7 +24,7 @@ public class Ticket1435 extends Application {
 
         final Window mainWin = new Window("ButtonPanel containing a table test");
         setMainWindow(mainWin);
-        ((OrderedLayout) mainWin.getLayout()).setSpacing(true);
+        ((AbstractOrderedLayout) mainWin.getLayout()).setSpacing(true);
 
         ButtonPanel dataCardView1 = buildButtonPanel("My Tickets");
         ButtonPanel dataCardView2 = buildButtonPanel("My Tickets 2");
index 39fb91b6eb0cc513ae6a6bd7b1576cda62c114ae..7905328f8e03fc09b3385524f72a1e66e135d245 100644 (file)
@@ -3,8 +3,8 @@ package com.vaadin.tests.tickets;
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.GridLayout;\r
+import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.Window;\r
 \r
@@ -22,7 +22,7 @@ public class Ticket1572 extends com.vaadin.Application {
 \r
         Panel p = new Panel("Test wrapper for gridlayout margin/spacing");\r
 \r
-        p.setLayout(new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL));\r
+        p.setLayout(new HorizontalLayout());\r
 \r
         gl = new GridLayout(3, 3);\r
         gl.setMargin(true);\r
index f8906daaa707ad1058adb73bdbc9c474d2bf18f1..b324321e8e4f9bcadff3cf044c239569a6826103 100644 (file)
@@ -2,6 +2,7 @@ package com.vaadin.tests.tickets;
 \r
 import com.vaadin.data.Property.ValueChangeEvent;\r
 import com.vaadin.data.Property.ValueChangeListener;\r
+import com.vaadin.ui.Alignment;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.Label;\r
@@ -43,7 +44,7 @@ public class Ticket1805 extends com.vaadin.Application {
         grid.addComponent(new Label("VEEEEEEEEEEERY_WIDE"));\r
         Label label = new Label("|");\r
         grid.addComponent(label);\r
-        grid.setComponentAlignment(label, GridLayout.ALIGNMENT_RIGHT, GridLayout.ALIGNMENT_TOP);\r
+        grid.setComponentAlignment(label, Alignment.TOP_RIGHT);\r
         main.addComponent(grid);\r
     }\r
 \r
index f06d3c27061be62e24ba439b7c2c44a6b2f3c411..ecc076ee155305820a5074500611a7cc24abe593 100644 (file)
@@ -10,6 +10,7 @@ import com.vaadin.data.validator.StringLengthValidator;
 import com.vaadin.terminal.Resource;\r
 import com.vaadin.terminal.ThemeResource;\r
 import com.vaadin.terminal.UserError;\r
+import com.vaadin.ui.Alignment;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Button.ClickListener;\r
@@ -21,7 +22,6 @@ import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Layout;\r
 import com.vaadin.ui.Layout.AlignmentHandler;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.VerticalLayout;\r
@@ -87,15 +87,15 @@ public class Ticket1878 extends Application {
         GridLayout layout = new GridLayout(1, 5);\r
 \r
         GridLayout l1 = new GridLayout(1, 3);\r
-        createLayout(l1, new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL), "1000px", "150px", "100%", null, true);\r
-        createLayout(l1, new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL), "1000px", "150px", "50px", null, false);\r
+        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "100%", null, true);\r
+        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "50px", null, false);\r
         GridLayout l2 = new GridLayout(6, 1);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL), "200px", "500px", true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL), "200px", "500px", "100%", null, true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL), "150px", "500px", true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL), "150px", "500px", "100%", null, true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL), "100px", "500px", true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL), "100px", "500px", "100%", null, true);\r
+        createLayout(l2, new VerticalLayout(), "200px", "500px", true);\r
+        createLayout(l2, new VerticalLayout(), "200px", "500px", "100%", null, true);\r
+        createLayout(l2, new VerticalLayout(), "150px", "500px", true);\r
+        createLayout(l2, new VerticalLayout(), "150px", "500px", "100%", null, true);\r
+        createLayout(l2, new VerticalLayout(), "100px", "500px", true);\r
+        createLayout(l2, new VerticalLayout(), "100px", "500px", "100%", null, true);\r
         layout.addComponent(l1);\r
         layout.addComponent(l2);\r
 \r
@@ -243,19 +243,19 @@ public class Ticket1878 extends Application {
     }\r
 \r
     private static void createLayout(GridLayout parentLayout, Layout newLayout, String w, String h, String componentWidth, String componentHeight, boolean align) {\r
-        int dir;\r
+        String dirText = "V";\r
         String type;\r
         if (newLayout instanceof VerticalLayout) {\r
-            dir = OrderedLayout.ORIENTATION_VERTICAL;\r
             type = "OL";\r
-        } else if (newLayout instanceof OrderedLayout) {\r
-            dir = OrderedLayout.ORIENTATION_HORIZONTAL;\r
+        } else if (newLayout instanceof HorizontalLayout) {\r
+            dirText = "H";\r
             type = "OL";\r
         } else {\r
-            dir = ((GridLayout) newLayout).getColumns() == 1 ? OrderedLayout.ORIENTATION_VERTICAL : OrderedLayout.ORIENTATION_HORIZONTAL;\r
+            if (((GridLayout) newLayout).getColumns() != 1) {\r
+                dirText = "H";\r
+            }\r
             type = "GL";\r
         }\r
-        String dirText = (dir == OrderedLayout.ORIENTATION_HORIZONTAL ? "H" : "V");\r
         String alignText = align ? "-A" : "";\r
         String cWidth = componentWidth == null ? "" : " - " + componentWidth;\r
         Panel p = new Panel(type + "/" + dirText + alignText + " " + w + "x" + h + cWidth, newLayout);\r
@@ -288,7 +288,7 @@ public class Ticket1878 extends Application {
                     p.addComponent(tf);\r
 \r
                     if (align) {\r
-                        ((AlignmentHandler) newLayout).setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_BOTTOM);\r
+                        ((AlignmentHandler) newLayout).setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
                     }\r
                 }\r
             }\r
index 578aa103f4ab2715f3704fb7fa4b1683c6f6378f..d340bf144ab85406d32c8b09a2707d31ca4b30ac 100644 (file)
@@ -2,8 +2,8 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.terminal.UserError;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.Window;
 
@@ -19,7 +19,7 @@ public class Ticket1916 extends Application {
         tf.setComponentError(new UserError("Error message"));
 
         test.addComponent(tf);
-        test.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER, OrderedLayout.ALIGNMENT_VERTICAL_CENTER);
+        test.setComponentAlignment(tf, Alignment.MIDDLE_CENTER);
 
         Window w = new Window("Test #1916", test);
         setMainWindow(w);
index bde7e848a8b0ea70d6b9766f9859a84f2a91c701..5cc83b10334ebfbab55ce18e6a1fca6de36a118c 100644 (file)
@@ -1,47 +1,27 @@
 package com.vaadin.tests.tickets;\r
 \r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
 import com.vaadin.Application;\r
 import com.vaadin.ui.AbstractOrderedLayout;\r
+import com.vaadin.ui.Alignment;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Layout;\r
 import com.vaadin.ui.Layout.AlignmentHandler;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1966 extends Application {\r
 \r
-    private static final int LEFT = OrderedLayout.ALIGNMENT_LEFT;\r
-    private static final int CENTER = OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER;\r
-    private static final int RIGHT = OrderedLayout.ALIGNMENT_RIGHT;\r
-    private static final int TOP = OrderedLayout.ALIGNMENT_TOP;\r
-    private static final int VCENTER = OrderedLayout.ALIGNMENT_VERTICAL_CENTER;\r
-    private static final int BOTTOM = OrderedLayout.ALIGNMENT_BOTTOM;\r
-\r
-    private static Map<Integer, String> names = new HashMap<Integer, String>();\r
-    static {\r
-        names.put(new Integer(LEFT), "Left");\r
-        names.put(new Integer(CENTER), "Center");\r
-        names.put(new Integer(RIGHT), "Right");\r
-        names.put(new Integer(BOTTOM), "Bottom");\r
-        names.put(new Integer(VCENTER), "Vcenter");\r
-        names.put(new Integer(TOP), "Top");\r
-    }\r
-\r
     @Override\r
     public void init() {\r
         Window w = new Window(getClass().getName());\r
         setMainWindow(w);\r
         // setTheme("tests-tickets");\r
-        w.setLayout(new GridLayout(2, 2));\r
+        w.setContent(new GridLayout(2, 2));\r
         // w.getLayout().setSizeFull();\r
-        createUI(w.getLayout());\r
+        createUI((Layout) w.getContent());\r
     }\r
 \r
     private void createUI(Layout layout) {\r
@@ -104,7 +84,7 @@ public class Ticket1966 extends Application {
 \r
         addButtons(ol);\r
         b = new Button("High button");\r
-        b.setHeight(200);\r
+        b.setHeight("200px");\r
         ol.addComponent(b);\r
 \r
         p.addComponent(ol);\r
@@ -112,16 +92,16 @@ public class Ticket1966 extends Application {
     }\r
 \r
     private void addButtons(Layout ol) {\r
-        ol.addComponent(getButton(ol, LEFT, TOP));\r
-        ol.addComponent(getButton(ol, CENTER, VCENTER));\r
-        ol.addComponent(getButton(ol, RIGHT, BOTTOM));\r
+        ol.addComponent(getButton(ol, Alignment.TOP_LEFT));\r
+        ol.addComponent(getButton(ol, Alignment.MIDDLE_CENTER));\r
+        ol.addComponent(getButton(ol, Alignment.BOTTOM_RIGHT));\r
 \r
     }\r
 \r
-    private Button getButton(Layout l, int hAlign, int vAlign) {\r
-        Button b = new Button("Narrow Button - " + names.get(new Integer(hAlign)) + " - " + names.get(new Integer(vAlign)));\r
+    private Button getButton(Layout l, Alignment align) {\r
+        Button b = new Button("Narrow Button - " + align.getHorizontalAlignment() + " - " + align.getVerticalAlignment());\r
         b.setWidth("100px");\r
-        ((AlignmentHandler) l).setComponentAlignment(b, hAlign, vAlign);\r
+        ((AlignmentHandler) l).setComponentAlignment(b, align);\r
 \r
         return b;\r
 \r
index af869a4071e661e3e4c4a87d38fe894e80b18d3c..ce9e936fc05340ebc775102053ab5ca92a21bd4b 100644 (file)
@@ -1,39 +1,19 @@
 package com.vaadin.tests.tickets;\r
 \r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
 import com.vaadin.Application;\r
 import com.vaadin.ui.AbstractOrderedLayout;\r
+import com.vaadin.ui.Alignment;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Layout;\r
 import com.vaadin.ui.Layout.AlignmentHandler;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1966_2 extends Application {\r
 \r
-    private static final int LEFT = OrderedLayout.ALIGNMENT_LEFT;\r
-    private static final int CENTER = OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER;\r
-    private static final int RIGHT = OrderedLayout.ALIGNMENT_RIGHT;\r
-    private static final int TOP = OrderedLayout.ALIGNMENT_TOP;\r
-    private static final int VCENTER = OrderedLayout.ALIGNMENT_VERTICAL_CENTER;\r
-    private static final int BOTTOM = OrderedLayout.ALIGNMENT_BOTTOM;\r
-\r
-    private static Map<Integer, String> names = new HashMap<Integer, String>();\r
-    static {\r
-        names.put(new Integer(LEFT), "Left");\r
-        names.put(new Integer(CENTER), "Center");\r
-        names.put(new Integer(RIGHT), "Right");\r
-        names.put(new Integer(BOTTOM), "Bottom");\r
-        names.put(new Integer(VCENTER), "Vcenter");\r
-        names.put(new Integer(TOP), "Top");\r
-    }\r
-\r
     @Override\r
     public void init() {\r
         Window w = new Window(getClass().getName());\r
@@ -170,16 +150,16 @@ public class Ticket1966_2 extends Application {
     }\r
 \r
     private void addButtons(Layout ol) {\r
-        ol.addComponent(getButton(ol, LEFT, TOP));\r
-        ol.addComponent(getButton(ol, CENTER, VCENTER));\r
-        ol.addComponent(getButton(ol, RIGHT, BOTTOM));\r
+        ol.addComponent(getButton(ol, Alignment.TOP_LEFT));\r
+        ol.addComponent(getButton(ol, Alignment.MIDDLE_CENTER));\r
+        ol.addComponent(getButton(ol, Alignment.BOTTOM_RIGHT));\r
 \r
     }\r
 \r
-    private Button getButton(Layout l, int hAlign, int vAlign) {\r
-        Button b = new Button(names.get(new Integer(hAlign)) + " - " + names.get(new Integer(vAlign)));\r
+    private Button getButton(Layout l, Alignment align) {\r
+        Button b = new Button(align.getHorizontalAlignment() + " - " + align.getVerticalAlignment());\r
         // b.setWidth("100");\r
-        ((AlignmentHandler) l).setComponentAlignment(b, hAlign, vAlign);\r
+        ((AlignmentHandler) l).setComponentAlignment(b, align);\r
 \r
         return b;\r
 \r
index c4bc05b1cbeee3c974b2232e64be33f6cf60b8ad..4a4b336eb99de7040514942448d86a5d61f70790 100644 (file)
@@ -3,8 +3,8 @@ package com.vaadin.tests.tickets;
 import com.vaadin.Application;\r
 import com.vaadin.terminal.ThemeResource;\r
 import com.vaadin.terminal.UserError;\r
+import com.vaadin.ui.Alignment;\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.VerticalLayout;\r
@@ -33,14 +33,14 @@ public class Ticket1966_3 extends Application {
         tf.setWidth("100px");\r
 \r
         ol.addComponent(tf);\r
-        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);\r
 \r
         tf = new TextField("Short caption");\r
         tf.setWidth("100px");\r
 \r
         tf.setComponentError(new UserError("error message"));\r
         ol.addComponent(tf);\r
-        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);\r
 \r
         tf = new TextField("Short caption");\r
         tf.setComponentError(new UserError("error message"));\r
@@ -49,14 +49,14 @@ public class Ticket1966_3 extends Application {
 \r
         tf.setComponentError(new UserError("error message"));\r
         ol.addComponent(tf);\r
-        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);\r
 \r
         tf = new TextField();\r
         tf.setValue("No caption");\r
         tf.setWidth("100px");\r
 \r
         ol.addComponent(tf);\r
-        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, Alignment.TOP_RIGHT);\r
 \r
         layout.addComponent(p);\r
     }\r
index e761f7e8586f7698994e64129483a3b9f107ba54..dd3912e2d09fd6fd1490c27b633b6b6cb86af33d 100644 (file)
@@ -9,7 +9,6 @@ import com.vaadin.ui.Button.ClickListener;
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.Label;\r
 import com.vaadin.ui.Layout;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.VerticalLayout;\r
@@ -21,7 +20,7 @@ public class Ticket2021 extends Application {
 \r
     private String contents = "This TextField SHOULD FILL the panel and NOT CAUSE any scrollbars to appear in the Panel. Scrollbars SHOULD appear in the TextField AND the whole scrollbars (includinc arrow down) SHOULD be visible.\n\n" + "" + "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent quis justo. Vivamus nec mi eu libero convallis auctor. Mauris et arcu. Nunc luctus justo. Aenean convallis, odio in vehicula scelerisque, est magna condimentum pede, a aliquam elit eros vitae diam. Phasellus porttitor convallis tellus. Nullam elementum, ligula nec viverra malesuada, risus tortor bibendum dui, eget hendrerit sem enim at massa. Nam eu pede sed nulla congue fermentum. Vestibulum malesuada libero non nunc. Proin rutrum. Fusce erat pede, volutpat vitae, aliquam ut, sagittis vel, augue. Fusce dui pede, convallis nec, accumsan tincidunt, consectetuer ac, purus. Nulla facilisi. Ut nisi. Sed orci risus, lacinia eu, sodales molestie, gravida quis, neque. Vestibulum pharetra ornare elit. Nulla porttitor molestie mauris. Morbi fringilla tellus sed risus. Curabitur varius massa." + "Nulla nisi. Sed blandit, ante vitae sagittis volutpat, arcu mauris vehicula risus, vitae posuere felis lectus sit amet purus. Donec nec magna et leo eleifend scelerisque. Suspendisse condimentum pharetra ligula. Curabitur lorem. Pellentesque a augue sit amet enim fermentum placerat. Phasellus ante risus, molestie at, iaculis at, pellentesque non, tellus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus non urna eget risus tempus imperdiet. Integer est diam, sagittis sit amet, posuere sit amet, bibendum sed, lacus. Aenean adipiscing cursus ipsum. Quisque at elit. Vestibulum vitae nunc. Praesent placerat metus viverra lorem. Cras nec elit congue nisi faucibus feugiat. Nam eget mi. Vestibulum condimentum. Nunc nisl ante, cursus in, dictum ac, lobortis rutrum, mi. Nulla eu nisi. In ultricies vehicula magna." + "Nunc eros dui, elementum at, ullamcorper eget, varius at, velit. Ut dictum. Cras ullamcorper ante vel tortor. Quisque viverra mauris vulputate quam. Nulla dui. Suspendisse non eros at ipsum faucibus hendrerit. Morbi dignissim pharetra tortor. Etiam malesuada. Mauris lacinia elementum erat. Duis mollis placerat metus. Nunc risus felis, cursus ac, cursus vel, convallis vel, metus. Ut vehicula nibh et nulla. Vivamus id pede. Quisque egestas arcu a ligula. Maecenas vehicula. Quisque sed ligula quis tellus tempus rutrum. Curabitur vel augue sed orci egestas pharetra. Duis pharetra.";\r
 \r
-    private OrderedLayout orderedLayout;\r
+    private AbstractOrderedLayout orderedLayout;\r
 \r
     @Override\r
     public void init() {\r
@@ -54,7 +53,7 @@ public class Ticket2021 extends Application {
         p2.setCaption("OrderedLayout");\r
         p2.setWidth("500px");\r
         p2.setHeight("500px");\r
-        p2.setContent(new OrderedLayout());\r
+        p2.setContent(new VerticalLayout());\r
         p2.getContent().setSizeFull();\r
 \r
         w.getContent().addComponent(p2);\r
index 9bf975f2baaf581eeb799fcdd3ea79c87e92823c..e79db104ad0a910b0a1ce93554dd2ff894cba896 100644 (file)
@@ -6,10 +6,10 @@ import com.vaadin.Application;
 import com.vaadin.data.Property.ValueChangeEvent;\r
 import com.vaadin.data.Property.ValueChangeListener;\r
 import com.vaadin.terminal.UserError;\r
+import com.vaadin.ui.Alignment;\r
 import com.vaadin.ui.Component;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.HorizontalLayout;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.VerticalLayout;\r
@@ -57,7 +57,7 @@ public class Ticket2029 extends Application {
                 tf.setComponentError(new UserError("Error"));\r
             }\r
             tf.setWidth("100%");\r
-            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);\r
+            layout.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
             p.addComponent(tf);\r
 \r
         }\r
@@ -95,7 +95,7 @@ public class Ticket2029 extends Application {
                 tf.setComponentError(new UserError("Error"));\r
             }\r
             tf.setWidth("100%");\r
-            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_VERTICAL_CENTER);\r
+            layout.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);\r
             p.addComponent(tf);\r
 \r
         }\r
@@ -127,7 +127,7 @@ public class Ticket2029 extends Application {
             tf.setRows(2);\r
             tf.setSizeFull();\r
 \r
-            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);\r
+            layout.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
             p.addComponent(tf);\r
 \r
         }\r
index f553a68d2b3395e7d728bae66d2a1160ae2a1a57..bd523c0a7cd65acbcd43d0ec251a9b4072458fec 100644 (file)
@@ -5,11 +5,11 @@ import com.vaadin.data.Item;
 import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.data.Property.ValueChangeListener;
 import com.vaadin.data.util.HierarchicalContainer;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.TabSheet;
@@ -29,7 +29,7 @@ public class Ticket2061b extends Application implements SelectedTabChangeListene
     public void init() {
         mainWindow = new Window("Ticket 2061b");
         mainWindow.setSizeFull();
-        OrderedLayout mainLayout = (OrderedLayout) mainWindow.getLayout();
+        AbstractOrderedLayout mainLayout = (AbstractOrderedLayout) mainWindow.getContent();
         mainLayout.setSizeFull();
         mainLayout.setMargin(false);
         setMainWindow(mainWindow);
index fad246399f8c429707843e64d0b8d3240605f84c..5f6f7d80d57362a4f6f27ca89268390aa2e74039 100644 (file)
@@ -2,10 +2,10 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.data.util.ObjectProperty;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2151 extends Application {
@@ -17,10 +17,10 @@ public class Ticket2151 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         Button b = new Button("This is a button");
         CheckBox cb = new CheckBox("This is a checkbox");
         cb.setImmediate(true);
index 302f01e0b896d97dad84e10716b7ca73185f77f5..25a4db403133718cb61dafe7d9c690fb33260610 100644 (file)
@@ -1,8 +1,8 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.ComboBox;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
@@ -14,10 +14,10 @@ public class Ticket2157 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         VerticalLayout ol;
         Panel p;
         ComboBox cb;
index 4c803bba5a0e78e4170066ba8b07c6251f6f950d..15722f49c457c7226eb4f936b4dd4f7845b297c3 100644 (file)
@@ -1,8 +1,8 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.ComboBox;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
@@ -14,10 +14,10 @@ public class Ticket2178 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         VerticalLayout ol;
         Panel p;
         ComboBox cb;
index 59a88fe182c9b730ff77ea516ccf8ed94cb33cec..d9fd82f197459e46d04d886b30bb2bc7dcdc7242 100644 (file)
@@ -10,6 +10,7 @@ import com.vaadin.data.Container;
 import com.vaadin.data.Item;
 import com.vaadin.data.Property;
 import com.vaadin.data.util.BeanItem;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
@@ -22,7 +23,6 @@ import com.vaadin.ui.Form;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.RichTextArea;
 import com.vaadin.ui.SplitPanel;
@@ -40,7 +40,7 @@ public class Ticket2204 extends Application {
 
     @Override
     public void init() {
-        classes.add(OrderedLayout.class);
+        classes.add(AbstractOrderedLayout.class);
         classes.add(GridLayout.class);
         classes.add(Accordion.class);
         classes.add(TabSheet.class);
@@ -51,10 +51,10 @@ public class Ticket2204 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         ts = new TabSheet();
         layout.addComponent(ts);
 
index c12afec884198ced95f7a663e1e8c0ce179a7e51..a7d3da4e352b6acdf1406b45d0de8e8ac45b68c9 100644 (file)
@@ -1,13 +1,13 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+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.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
@@ -20,10 +20,10 @@ public class Ticket2221 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         layout.setSizeFull();
         layout.addComponent(new Invoice());
     }
index 53001f0048a8c4ebb690c7ce7dd52b0e44b2d4fd..f44d15e8dac97e458b60aa7a9ced6ad45d9fec1a 100644 (file)
@@ -1,10 +1,10 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
@@ -15,10 +15,10 @@ public class Ticket2222 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         HorizontalLayout horiz = new HorizontalLayout();
         horiz.setSpacing(true);
         horiz.setMargin(true);
index 5edf4c0f131af21e936d73f99c7a493855690b84..c93b26bec22702bfbf0c352be8783ea07e191e33 100644 (file)
@@ -4,7 +4,7 @@ import com.vaadin.Application;
 import com.vaadin.data.Item;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.Layout;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
@@ -19,7 +19,7 @@ public class Ticket2227OrderedlayoutInTable extends Application {
         t.setHeight("200px");
         t.addContainerProperty("pno", String.class, "");
         t.addContainerProperty("testi", String.class, "");
-        t.addContainerProperty("testi2", OrderedLayout.class, null);
+        t.addContainerProperty("testi2", Layout.class, null);
         t.addContainerProperty("komponentti", Component.class, null);
         t.addContainerProperty("nimi", String.class, "");
         t.setVisibleColumns(new Object[] { "pno", "testi", "testi2", "nimi" });
index c9f773a4a4cac284699e07977a882d20e46d9561..acb86baadb47694aa38a1c7119f531108b1ee73b 100644 (file)
@@ -1,8 +1,8 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2231 extends Application {
@@ -12,10 +12,10 @@ public class Ticket2231 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         layout.setSizeUndefined();
         layout.setMargin(false);
         layout.setStyleName("borders");
index 25d74e85745df6336190fb457a5436626499e8ef..2113c02712fbfbdad60f3373632aa170932f72c5 100644 (file)
@@ -2,8 +2,8 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.data.Item;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.ComboBox;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2234 extends Application {
@@ -13,10 +13,10 @@ public class Ticket2234 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         ComboBox combo = new ComboBox("Combobox caption");
         combo.addContainerProperty("blah", String.class, "");
         combo.setItemCaptionPropertyId("blah");
index 98c618453d4181900118d58a232acefafe7ab3c2..ed1ad673867428a9be9adcbe8a20ad746f3aff5a 100644 (file)
@@ -1,7 +1,7 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.Window;
 
@@ -12,10 +12,10 @@ public class Ticket2235 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         layout.setSizeFull();
 
         TextField tf = new TextField();
index 6aa1659568574fee28af01485206ff3272ab4959..f23e01236913c99f6c6e4851ff161cba215be02d 100644 (file)
@@ -1,8 +1,8 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.Window;
 
@@ -15,10 +15,10 @@ public class Ticket2240 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         layout.setHeight(null);
         layout.setStyleName("borders");
         // layout.setSizeFull();
index 75f8506aabf70c90be650a3cd7373fad68a4942e..eb5ea98517fc0eea9dd521a7a34eef6212aa7ff9 100644 (file)
@@ -6,10 +6,10 @@ import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.data.Property.ValueChangeListener;
 import com.vaadin.data.util.IndexedContainer;
 import com.vaadin.data.util.ObjectProperty;
+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.OrderedLayout;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Window;
 
@@ -25,10 +25,10 @@ public class Ticket2242 extends Application implements ValueChangeListener {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         Button b = new Button("Change container datasource", new ClickListener() {
 
             public void buttonClick(ClickEvent event) {
index 50a5466645270a695f3a67a366b27e3a5db09bfd..34b4e36c4931eb94f37a8e61541acd32d40f3339 100644 (file)
@@ -1,9 +1,9 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.ComboBox;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
@@ -14,10 +14,10 @@ public class Ticket2271 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
 
         VerticalLayout ol = new VerticalLayout();
         ol.setWidth(null);
index ba9c4fb9f136b033ddf889faf113b72850b84f67..b40ce597cddc763620bf433d8a00b5f0b058cd8a 100644 (file)
@@ -1,9 +1,9 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout.AlignmentHandler;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2294 extends Application {
@@ -13,10 +13,10 @@ public class Ticket2294 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((OrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getLayout());
     }
 
-    private void createUI(OrderedLayout layout) {
+    private void createUI(AbstractOrderedLayout layout) {
         Label label1 = new Label();
         Label label2 = null;
         Label label3 = new Label();
index 6999d38e3eb22412c14409270deab15130cef701..8c41ea12f04a08b47ceedcab24cd77c513c4cae3 100644 (file)
@@ -36,7 +36,6 @@ import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Link;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.TabSheet;
@@ -68,21 +67,18 @@ public class RandomComponents {
 
         case 0:
             result = new HorizontalLayout();
-            ((OrderedLayout) result).setCaption("OrderedLayout_horizontal_"
-                    + caption);
+            ((HorizontalLayout) result).setCaption("OrderedLayout_horizontal_" + caption);
             break;
         case 1:
             result = new VerticalLayout();
-            ((OrderedLayout) result).setCaption("OrderedLayout_vertical_"
-                    + caption);
+            ((VerticalLayout) result).setCaption("OrderedLayout_vertical_" + caption);
             break;
         case 2:
             GridLayout gl;
             if (seededRandom.nextInt(1) > 0) {
                 gl = new GridLayout();
             } else {
-                gl = new GridLayout(seededRandom.nextInt(3) + 1,
-                        seededRandom.nextInt(3) + 1);
+                gl = new GridLayout(seededRandom.nextInt(3) + 1, seededRandom.nextInt(3) + 1);
             }
             gl.setCaption("GridLayout_" + caption);
             gl.setDescription(gl.getCaption());
@@ -110,7 +106,7 @@ public class RandomComponents {
                 if (selectedTab == i) {
                     tabCaption = "tabX";
                 }
-                tabs.add(new OrderedLayout());
+                tabs.add(new VerticalLayout());
                 ts.addTab(tabs.get(tabs.size() - 1), tabCaption, null);
             }
             ts.setSelectedTab(tabs.get(selectedTab));
@@ -170,12 +166,7 @@ public class RandomComponents {
             // Link
             result = new Panel();
             result.setCaption("Panel component " + caption);
-            ((Panel) result)
-                    .addComponent(new Label(
-                            "Panel is a container for other components, by default it draws a frame around it's "
-                                    + "extremities and may have a caption to clarify the nature of the contained components' purpose."
-                                    + " Panel contains an layout where the actual contained components are added, "
-                                    + "this layout may be switched on the fly."));
+            ((Panel) result).addComponent(new Label("Panel is a container for other components, by default it draws a frame around it's " + "extremities and may have a caption to clarify the nature of the contained components' purpose." + " Panel contains an layout where the actual contained components are added, " + "this layout may be switched on the fly."));
             ((Panel) result).setWidth(250);
             break;
         case 6:
@@ -193,65 +184,64 @@ public class RandomComponents {
             break;
         case 8:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new ButtonExample());
+            ((VerticalLayout) result).addComponent(new ButtonExample());
             break;
         case 9:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new ClientCachingExample());
+            ((VerticalLayout) result).addComponent(new ClientCachingExample());
             break;
         case 10:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new ComboBoxExample());
+            ((VerticalLayout) result).addComponent(new ComboBoxExample());
             break;
         case 11:
             result = new VerticalLayout();
             // TODO: disabled gwt bug with mixed up iframe's
-            ((OrderedLayout) result).addComponent(new EmbeddedBrowserExample());
+            ((VerticalLayout) result).addComponent(new EmbeddedBrowserExample());
             break;
         case 12:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new JavaScriptAPIExample());
+            ((VerticalLayout) result).addComponent(new JavaScriptAPIExample());
             break;
         case 13:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new LabelExample());
+            ((VerticalLayout) result).addComponent(new LabelExample());
             break;
         case 14:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new LayoutExample());
+            ((VerticalLayout) result).addComponent(new LayoutExample());
             break;
         case 15:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new NotificationExample());
+            ((VerticalLayout) result).addComponent(new NotificationExample());
             break;
         case 16:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new RichTextExample());
+            ((VerticalLayout) result).addComponent(new RichTextExample());
             break;
         case 17:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new SelectExample());
+            ((VerticalLayout) result).addComponent(new SelectExample());
             break;
         case 18:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new ValueInputExample());
+            ((VerticalLayout) result).addComponent(new ValueInputExample());
             break;
         case 19:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new WindowingExample());
+            ((VerticalLayout) result).addComponent(new WindowingExample());
             break;
         case 20:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new TreeExample());
+            ((VerticalLayout) result).addComponent(new TreeExample());
             break;
         case 21:
             result = new VerticalLayout();
-            ((OrderedLayout) result).addComponent(new TableExample());
+            ((VerticalLayout) result).addComponent(new TableExample());
             break;
         case 22:
             result = new VerticalLayout();
-            ((OrderedLayout) result)
-                    .addComponent(new StressComponentsInTable());
+            ((VerticalLayout) result).addComponent(new StressComponentsInTable());
             break;
         }
 
@@ -275,23 +265,18 @@ public class RandomComponents {
         return em;
     }
 
-    public class MultiListener implements Button.ClickListener,
-            PropertySetChangeListener, ItemSetChangeListener,
-            ValueChangeListener {
+    public class MultiListener implements Button.ClickListener, PropertySetChangeListener, ItemSetChangeListener, ValueChangeListener {
 
         public void buttonClick(ClickEvent event) {
-            System.out.println("ClickEvent from "
-                    + event.getButton().getCaption());
+            System.out.println("ClickEvent from " + event.getButton().getCaption());
         }
 
         public void containerPropertySetChange(PropertySetChangeEvent event) {
-            System.out.println("containerPropertySetChange from "
-                    + event.getContainer());
+            System.out.println("containerPropertySetChange from " + event.getContainer());
         }
 
         public void containerItemSetChange(ItemSetChangeEvent event) {
-            System.out.println("containerItemSetChange from "
-                    + event.getContainer());
+            System.out.println("containerItemSetChange from " + event.getContainer());
         }
 
         public void valueChange(ValueChangeEvent event) {