]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed use of deprecated alignment method and theme constants (#5749)
authorArtur Signell <artur.signell@itmill.com>
Thu, 7 Oct 2010 07:14:25 +0000 (07:14 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 7 Oct 2010 07:14:25 +0000 (07:14 +0000)
svn changeset:15433/svn branch:6.5

71 files changed:
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
src/com/vaadin/terminal/gwt/client/ui/ShortcutActionHandler.java
src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
tests/src/com/vaadin/tests/TestBench.java
tests/src/com/vaadin/tests/TestContainerChanges.java
tests/src/com/vaadin/tests/TestForBasicApplicationLayout.java
tests/src/com/vaadin/tests/TestForPreconfiguredComponents.java
tests/src/com/vaadin/tests/components/form/UndefinedWideFormWithRelativeWideFooter.java
tests/src/com/vaadin/tests/components/table/TableRowHeight2.java
tests/src/com/vaadin/tests/components/table/TableRowHeight3.java
tests/src/com/vaadin/tests/components/tabsheet/TabSheetCaptions.java
tests/src/com/vaadin/tests/components/window/CenteredWindowWithUndefinedSize.java
tests/src/com/vaadin/tests/components/window/WindowResizeListener.java
tests/src/com/vaadin/tests/featurebrowser/PropertyPanel.java
tests/src/com/vaadin/tests/layouts/DeepComponentTrees.java
tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java
tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel2.java
tests/src/com/vaadin/tests/layouts/OrderedLayoutBasics.java
tests/src/com/vaadin/tests/layouts/TestAbsoluteLayout.java
tests/src/com/vaadin/tests/layouts/VerticalLayoutWithRelativeSizeComponents.java
tests/src/com/vaadin/tests/robustness/Robustness.java
tests/src/com/vaadin/tests/tickets/Ticket1245.java
tests/src/com/vaadin/tests/tickets/Ticket1362Login.java
tests/src/com/vaadin/tests/tickets/Ticket1435.java
tests/src/com/vaadin/tests/tickets/Ticket1805.java
tests/src/com/vaadin/tests/tickets/Ticket1878.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/Ticket1969.java
tests/src/com/vaadin/tests/tickets/Ticket2024.java
tests/src/com/vaadin/tests/tickets/Ticket2029.java
tests/src/com/vaadin/tests/tickets/Ticket2040.java
tests/src/com/vaadin/tests/tickets/Ticket2048.java
tests/src/com/vaadin/tests/tickets/Ticket2061.java
tests/src/com/vaadin/tests/tickets/Ticket2083.java
tests/src/com/vaadin/tests/tickets/Ticket2095.java
tests/src/com/vaadin/tests/tickets/Ticket2101.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/Ticket2209OL.java
tests/src/com/vaadin/tests/tickets/Ticket2209OL2.java
tests/src/com/vaadin/tests/tickets/Ticket2215.java
tests/src/com/vaadin/tests/tickets/Ticket2221.java
tests/src/com/vaadin/tests/tickets/Ticket2222.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/Ticket2245.java
tests/src/com/vaadin/tests/tickets/Ticket2271.java
tests/src/com/vaadin/tests/tickets/Ticket2279.java
tests/src/com/vaadin/tests/tickets/Ticket2282.java
tests/src/com/vaadin/tests/tickets/Ticket2283.java
tests/src/com/vaadin/tests/tickets/Ticket2294.java
tests/src/com/vaadin/tests/tickets/Ticket2304.java
tests/src/com/vaadin/tests/tickets/Ticket2310.java
tests/src/com/vaadin/tests/tickets/Ticket2323.java
tests/src/com/vaadin/tests/tickets/Ticket2329.java
tests/src/com/vaadin/tests/tickets/Ticket2341.java
tests/src/com/vaadin/tests/tickets/Ticket2344.java
tests/src/com/vaadin/tests/tickets/Ticket2347.java
tests/src/com/vaadin/tests/tickets/Ticket2365.java
tests/src/com/vaadin/tests/tickets/Ticket2405.java
tests/src/com/vaadin/tests/tickets/Ticket2406.java
tests/src/com/vaadin/tests/tickets/Ticket2432.java
tests/src/com/vaadin/tests/tickets/Ticket2998.java
tests/src/com/vaadin/tests/tickets/Ticket34.java
tests/src/com/vaadin/tests/validation/EmptyFieldErrorIndicators.java

index 9cf14b4ec0f8c3cd2640e9150f8569f790cc964d..3643aa2e6780096b844975cebef131c2470e429e 100755 (executable)
@@ -221,7 +221,6 @@ public class ApplicationConnection {
     /**
      * Helper for tt initialization
      */
-    @SuppressWarnings("unused")
     private JavaScriptObject getVersionInfo() {
         return configuration.getVersionInfoJSObject();
     }
index 34a2a645be4cc427276d4f470737e87e5cc41364..814929de4a513adb2a80d7c440050a16376039b8 100644 (file)
@@ -21,6 +21,7 @@ import com.vaadin.terminal.gwt.client.BrowserInfo;
 import com.vaadin.terminal.gwt.client.Paintable;
 import com.vaadin.terminal.gwt.client.UIDL;
 import com.vaadin.terminal.gwt.client.Util;
+import com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea;
 
 /**
  * A helper class to implement keyboard shorcut handling. Keeps a list of owners
index c9c99958f80d19a817b88698dda2d8b47a1776f4..7f5a705e79c7ff0ce314ed53fbabe58dc7896997 100644 (file)
@@ -52,6 +52,8 @@ import com.vaadin.Application.SystemMessages;
 import com.vaadin.external.org.apache.commons.fileupload.portlet.PortletFileUpload;
 import com.vaadin.terminal.DownloadStream;
 import com.vaadin.terminal.Terminal;
+import com.vaadin.terminal.gwt.client.ApplicationConfiguration;
+import com.vaadin.terminal.gwt.client.ApplicationConnection;
 import com.vaadin.ui.Window;
 
 /**
index e3eb59291647e0a672fef1aa44aeeb135cc61998..e5d34e4a6c54ceee9491ed2888d30e31b7905ee3 100644 (file)
@@ -208,7 +208,7 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
         try {
             final Application app = (Application) c.newInstance();
             app.init();
-            Layout lo = app.getMainWindow().getLayout();
+            Layout lo = (Layout) app.getMainWindow().getContent();
             lo.setParent(null);
             return lo;
         } catch (final Exception e) {
index 44ce5be1bf2bbdf7aa4476dfcb2a620f5eab5d98..4381c4df42710e56ee5ebffb2284c034c5753649 100644 (file)
@@ -19,6 +19,7 @@ import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;\r
 import com.vaadin.ui.Tree;\r
 import com.vaadin.ui.VerticalLayout;\r
+import com.vaadin.ui.themes.Reindeer;\r
 \r
 /**\r
  * @author marc\r
@@ -157,7 +158,7 @@ public class TestContainerChanges extends CustomComponent {
         buttons.addComponent(b);\r
 \r
         Panel p = new Panel("Tree");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
+        p.setStyleName(Reindeer.PANEL_LIGHT);\r
         h.addComponent(p);\r
         Tree tree = new Tree("ITEM_CAPTION_MODE_PROPERTY");\r
         tree.setContainerDataSource(ordered);\r
@@ -171,7 +172,7 @@ public class TestContainerChanges extends CustomComponent {
         p.addComponent(tree);\r
 \r
         p = new Panel("ComboBox");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
+        p.setStyleName(Reindeer.PANEL_LIGHT);\r
         h.addComponent(p);\r
         ComboBox c = new ComboBox("ITEM_CAPTION_MODE_PROPERTY");\r
         c.setImmediate(true);\r
@@ -186,7 +187,7 @@ public class TestContainerChanges extends CustomComponent {
         p.addComponent(c);\r
 \r
         p = new Panel("ListBox");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
+        p.setStyleName(Reindeer.PANEL_LIGHT);\r
         h.addComponent(p);\r
         ListSelect l = new ListSelect("ITEM_CAPTION_MODE_PROPERTY");\r
         l.setContainerDataSource(cont);\r
index ae4f641857627684be4e142e2b12f699dcfbac40..3ab3c89fe4700524abf36990ad2d476e02be9c50 100644 (file)
@@ -17,6 +17,7 @@ import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.TabSheet;\r
 import com.vaadin.ui.Table;\r
 import com.vaadin.ui.VerticalLayout;\r
+import com.vaadin.ui.themes.Reindeer;\r
 \r
 public class TestForBasicApplicationLayout extends CustomComponent {\r
 \r
@@ -66,7 +67,7 @@ public class TestForBasicApplicationLayout extends CustomComponent {
         cal.setLocale(new Locale("en", "US"));\r
         report.addComponent(cal);\r
         ((VerticalLayout) report.getContent()).setExpandRatio(controls, 1);\r
-        report.addStyleName(Panel.STYLE_LIGHT);\r
+        report.addStyleName(Reindeer.PANEL_LIGHT);\r
         report.setHeight(100, SplitPanel.UNITS_PERCENTAGE);\r
 \r
         sp2.setFirstComponent(report);\r
index 19ae601d36e24432fae8661f8150cec7721ef919..09af0558a60fde57e0b871beb24f9a889bfffb1d 100644 (file)
@@ -17,7 +17,6 @@ import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.NativeSelect;
 import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.TwinColSelect;
index 4c47c8a58dd7da215083a5e11dd95ee6b1ef558f..cb616d4548ef04cd79b47baa355bf7b378edd0a8 100644 (file)
@@ -1,6 +1,7 @@
 package com.vaadin.tests.components.form;
 
 import com.vaadin.Application;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.HorizontalLayout;
@@ -29,7 +30,7 @@ public class UndefinedWideFormWithRelativeWideFooter extends Application {
         hl.setWidth("100%");
         Button b = new Button("right aligned");
         hl.addComponent(b);
-        hl.setComponentAlignment(b, "r");
+        hl.setComponentAlignment(b, Alignment.TOP_RIGHT);
         f.setFooter(hl);
     }
 }
index 7dcc6f17d2a89fd232c7d1b15dad3a4007227fca..f79b834fb1e7b2f512aeca4e77ea74eddc52f53b 100644 (file)
@@ -5,6 +5,7 @@ import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.themes.BaseTheme;
 
 public class TableRowHeight2 extends TestBase {
 
@@ -44,7 +45,7 @@ public class TableRowHeight2 extends TestBase {
 
             Button b = new Button();
             b.setWidth("100%");
-            b.setStyleName(Button.STYLE_LINK);
+            b.setStyleName(BaseTheme.BUTTON_LINK);
             b.addStyleName("nowraplink");
 
             b.setCaption("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");
index d7af76478837c5c0279b2a6354061cecd072f18d..c31b87f9dab04ec95fcb2766d39b6386f037bce8 100644 (file)
@@ -5,6 +5,7 @@ import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.themes.BaseTheme;
 
 public class TableRowHeight3 extends TestBase {
 
@@ -36,7 +37,7 @@ public class TableRowHeight3 extends TestBase {
 
             Button b = new Button();
             b.setWidth("100%");
-            b.setStyleName(Button.STYLE_LINK);
+            b.setStyleName(BaseTheme.BUTTON_LINK);
             b.addStyleName("nowraplink");
             if (i < 2) {
                 b.setCaption("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper, elit quis elementum iaculis, dui est rutrum risus, at cursus sem leo eget arcu. Proin vel eros ut tortor luctus pretium. Nulla facilisi. Donec in dui. Proin ac diam vitae massa tempus faucibus. Fusce eu risus. Nunc ac risus. Cras libero.");
index 3d624df709d985347fc221aecc2099fb5ed46d46..4a6dc0e06179dbe4a4b4b626f34d7e65655433c7 100644 (file)
@@ -36,7 +36,7 @@ public class TabSheetCaptions extends TestBase {
 \r
         panel1 = new Panel("Panel initial caption (should also be tab caption)");\r
         panel1.setSizeFull();\r
-        panel1.getLayout().setSizeFull();\r
+        panel1.getContent().setSizeFull();\r
         panel1.addComponent(new Label("This is a panel"));\r
         tabSheet.addTab(panel1);\r
 \r
index 51b6568f94523094bf7a2e6f670d2dc76e1a66b7..a7fcda3cf1d920545af260efc062b9f144e669c7 100644 (file)
@@ -20,7 +20,7 @@ public class CenteredWindowWithUndefinedSize extends TestBase {
     protected void setup() {
         Window centered = new Window("A window");
         centered.setSizeUndefined();
-        centered.getLayout().setSizeFull();
+        centered.getContent().setSizeFull();
         centered.center();
 
         Label l = new Label("This window should be centered");
index a6c4b21b706db8e0bcb3e51445b3c2e3bbdbcf10..f8a6f2db4eaed0c698ef2b78beb6fa85b9c59bf9 100644 (file)
@@ -15,9 +15,7 @@ public class WindowResizeListener extends TestBase {
 
     @Override
     protected String getDescription() {
-        return "Size changes from windows (both sub "
-                + "and browsers level) should get back to server."
-                + " If size changes, a separate server side event should occur.";
+        return "Size changes from windows (both sub " + "and browsers level) should get back to server." + " If size changes, a separate server side event should occur.";
     }
 
     @Override
@@ -35,9 +33,7 @@ public class WindowResizeListener extends TestBase {
 
         getMainWindow().addListener(new ResizeListener() {
             public void windowResized(ResizeEvent e) {
-                l.setValue("Current main window size: "
-                        + getMainWindow().getWidth() + " x "
-                        + getMainWindow().getHeight());
+                l.setValue("Current main window size: " + getMainWindow().getWidth() + " x " + getMainWindow().getHeight());
             }
         });
 
@@ -80,7 +76,7 @@ class ResizeListenerWindow extends Window {
         super("Subwindow");
         setWidth("400px");
 
-        Layout hl = getLayout();
+        Layout hl = (Layout) getContent();
         hl.addComponent(new Label("Current size: "));
         hl.addComponent(sizeLabel);
 
@@ -94,9 +90,6 @@ class ResizeListenerWindow extends Window {
     }
 
     public void updateLabel() {
-        sizeLabel
-                .setValue(getWidth() + Sizeable.UNIT_SYMBOLS[getWidthUnits()]
-                        + " x " + getHeight()
-                        + Sizeable.UNIT_SYMBOLS[getHeightUnits()]);
+        sizeLabel.setValue(getWidth() + Sizeable.UNIT_SYMBOLS[getWidthUnits()] + " x " + getHeight() + Sizeable.UNIT_SYMBOLS[getHeightUnits()]);
     }
 }
index cc70330d524c709148d58da7949539a3fb74ec2a..1b04bafae9511cdc26de38605d15b1f97f394e48 100644 (file)
@@ -28,6 +28,7 @@ import com.vaadin.ui.DateField;
 import com.vaadin.ui.Field;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Layout;
 import com.vaadin.ui.OptionGroup;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
@@ -36,6 +37,7 @@ import com.vaadin.ui.TextField;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
+import com.vaadin.ui.themes.Reindeer;
 
 public class PropertyPanel extends Panel implements Button.ClickListener, Property.ValueChangeListener {
 
@@ -60,7 +62,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
     /** Contruct new property panel for configuring given object. */
     public PropertyPanel(Object objectToConfigure) {
         super();
-        getLayout().setMargin(false);
+        ((Layout) getContent()).setMargin(false);
 
         // Layout
         setCaption("Properties");
@@ -110,7 +112,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
         // Create new panel containing the form
         final Panel p = new Panel();
         p.setCaption(propertySetCaption);
-        p.setStyleName(Panel.STYLE_LIGHT);
+        p.setStyleName(Reindeer.PANEL_LIGHT);
         p.addComponent(properties);
         formsLayout.addComponent(p);
 
index 002ecfa56153cd5cc557f7a73b2d8000908a632c..3a6414cff54d13e0796ab8dc75fc7039d8049241 100644 (file)
@@ -33,7 +33,7 @@ public class DeepComponentTrees extends TestBase {
     protected void setup() {\r
         Layout main = getLayout();\r
         main.setSizeUndefined();\r
-        getMainWindow().getLayout().setHeight(null);\r
+        getMainWindow().getContent().setHeight(null);\r
 \r
         Label l = new Label(\r
                 "This is a nice game to guess how many Layouts your FF2 (or any other browser) can deal with. Due to the worldwide attempt to decrease energy consumption, playing this game is only allowed above 60° longitude betwheen August and May (as excess energy consumed by you CPU is used to heat your room). It is considered wise to save all your work before starting the game.");\r
index bc2e8c01cb3c480b122484f7ddf926995a8cb6ff..281cc34920c08765a2fbab13e1d28639d1f09e69 100644 (file)
@@ -3,6 +3,7 @@ package com.vaadin.tests.layouts;
 import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
+import com.vaadin.ui.Layout;
 import com.vaadin.ui.Panel;
 
 public class GridLayoutInsidePanel extends TestBase {
@@ -22,13 +23,12 @@ public class GridLayoutInsidePanel extends TestBase {
         {
             GridLayout gl = new GridLayout(1, 1);
             gl.setSizeUndefined();
-            gl.addComponent(new Label(
-                    "A label which defines the size of the GL"));
+            gl.addComponent(new Label("A label which defines the size of the GL"));
 
             Panel p = new Panel("Panel 1");
-            p.getLayout().setMargin(false);
+            ((Layout) p.getContent()).setMargin(false);
             p.setSizeUndefined();
-            p.getLayout().setSizeUndefined();
+            p.getContent().setSizeUndefined();
 
             p.addComponent(gl);
             addComponent(p);
@@ -36,13 +36,12 @@ public class GridLayoutInsidePanel extends TestBase {
         {
             GridLayout gl = new GridLayout(1, 1);
             gl.setSizeUndefined();
-            gl.addComponent(new Label(
-                    "A label which defines the size of the GL"));
+            gl.addComponent(new Label("A label which defines the size of the GL"));
 
             Panel p = new Panel("Panel 2", gl);
-            p.getLayout().setMargin(false);
+            ((Layout) p.getContent()).setMargin(false);
             p.setSizeUndefined();
-            p.getLayout().setSizeUndefined();
+            p.getContent().setSizeUndefined();
 
             addComponent(p);
         }
index 22fabab4d7e20b63a3db841fca4e0894d2408b32..8fb42948fce3a6663fb128f5dba17fdb4548fece 100644 (file)
@@ -14,7 +14,7 @@ public class GridLayoutInsidePanel2 extends Application {
     public void init() {
         Window w = new Window("Main");
         setMainWindow(w);
-        layout = w.getLayout();
+        layout = (Layout) w.getContent();
         GridLayout gl = new GridLayout(1, 1);
         gl.setSizeUndefined();
         Label l = new Label("This should be visible");
index 668588ee3900eea77f2e6a365bf71015660f7230..bfc8a8e5420ae63c859664135fffde43916ea96e 100644 (file)
@@ -16,7 +16,6 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Label;\r
 import com.vaadin.ui.Layout;\r
-import com.vaadin.ui.Layout.AlignmentHandler;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.Select;\r
 import com.vaadin.ui.TextField;\r
@@ -25,7 +24,6 @@ import com.vaadin.ui.VerticalLayout;
 public class OrderedLayoutBasics extends TestBase {\r
 \r
     String valignName[] = new String[] { "top", "middle", "bottom" };\r
-    int valign[] = new int[] { AlignmentHandler.ALIGNMENT_TOP, AlignmentHandler.ALIGNMENT_VERTICAL_CENTER, AlignmentHandler.ALIGNMENT_BOTTOM };\r
 \r
     Set<AbstractOrderedLayout> layouts = new HashSet<AbstractOrderedLayout>();\r
     private AbstractOrderedLayout layoutContainer;\r
@@ -43,7 +41,7 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     @Override\r
     public void setup() {\r
-        getMainWindow().getLayout().setHeight(null);\r
+        getMainWindow().getContent().setHeight(null);\r
 \r
         layoutContainer = new VerticalLayout();\r
         createUI(layoutContainer);\r
@@ -104,6 +102,7 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     /* LAYOUTS */\r
 \r
+    @SuppressWarnings("unused")\r
     private Layout layout1() {\r
         HorizontalLayout ol = new HorizontalLayout();\r
         ol.setHeight("200px");\r
@@ -144,6 +143,7 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
+    @SuppressWarnings("unused")\r
     private Layout layout2() {\r
         HorizontalLayout ol = new HorizontalLayout();\r
         ol.setHeight("70px");\r
@@ -187,6 +187,7 @@ public class OrderedLayoutBasics extends TestBase {
         return ol;\r
     }\r
 \r
+    @SuppressWarnings("unused")\r
     private Layout layout3() {\r
         HorizontalLayout ol = new HorizontalLayout();\r
         ol.setHeight("");\r
@@ -237,6 +238,7 @@ public class OrderedLayoutBasics extends TestBase {
         return ol;\r
     }\r
 \r
+    @SuppressWarnings("unused")\r
     private Layout layout3New() {\r
         HorizontalLayout ol = new HorizontalLayout();\r
         ol.setHeight("300px");\r
@@ -288,6 +290,7 @@ public class OrderedLayoutBasics extends TestBase {
         return ol;\r
     }\r
 \r
+    @SuppressWarnings("unused")\r
     private Layout layout4(AbstractOrderedLayout ol) {\r
         // ol.setHeight("300px");\r
         // ol.setWidth("500px");\r
@@ -323,7 +326,13 @@ public class OrderedLayoutBasics extends TestBase {
             tf.setWidth(w + "px");\r
             tf.setHeight(w + "px");\r
             ol.addComponent(tf);\r
-            ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT, valign[i % 3]);\r
+            if (i % 3 == 0) {\r
+                ol.setComponentAlignment(tf, Alignment.TOP_LEFT);\r
+            } else if (i % 3 == 1) {\r
+                ol.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);\r
+            } else {\r
+                ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
+            }\r
 \r
         }\r
 \r
@@ -396,7 +405,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.TOP_LEFT);\r
 \r
-        Button b;\r
+        // Button b;\r
         // b = new Button("This is a 100%x50% valign middle button");\r
         // b.setSizeFull();\r
         // b.setHeight("50%");\r
@@ -560,7 +569,7 @@ public class OrderedLayoutBasics extends TestBase {
         tf.setRequired(true);\r
         ol.addComponent(tf);\r
         ol.setExpandRatio(tf, 1f);\r
-        ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_VERTICAL_CENTER);\r
+        ol.setComponentAlignment(tf, Alignment.MIDDLE_LEFT);\r
         // tf.setComponentError(new UserError("It's broken!"));\r
 \r
         // tf.setHeight("100%");\r
@@ -1069,6 +1078,7 @@ public class OrderedLayoutBasics extends TestBase {
         return ol;\r
     }\r
 \r
+    @SuppressWarnings("unused")\r
     private Layout layout_pctFilled2(AbstractOrderedLayout ol) {\r
         ol.setHeight("600px");\r
         ol.setWidth("600px");\r
index f2d653e43813d4e0da3541749828c898aad881cd..25df5307ee1d191c217b6eec904835fd7b0f9bca 100644 (file)
@@ -133,7 +133,7 @@ public class TestAbsoluteLayout extends TestBase {
             componentChooser.addListener(new Button.ClickListener() {\r
                 public void buttonClick(ClickEvent event) {\r
                     final Window chooser = new Window("Choose component");\r
-                    chooser.getLayout().setSizeUndefined();\r
+                    chooser.getContent().setSizeUndefined();\r
                     chooser.setModal(true);\r
 \r
                     NativeSelect select = new NativeSelect(\r
@@ -188,7 +188,7 @@ public class TestAbsoluteLayout extends TestBase {
                 public void buttonClick(ClickEvent event) {\r
                     final Window chooser = new Window(\r
                             "Choose component type to add");\r
-                    chooser.getLayout().setSizeUndefined();\r
+                    chooser.getContent().setSizeUndefined();\r
                     chooser.setModal(true);\r
 \r
                     NativeSelect select = new NativeSelect(\r
index 8ff742c1794ad9f297b09dd03952c570a2a203f6..361707a86c01000c752618885c1ea818750dd958 100644 (file)
@@ -19,7 +19,7 @@ public class VerticalLayoutWithRelativeSizeComponents extends TestBase {
     @Override\r
     protected void setup() {\r
         getLayout().setSizeUndefined();\r
-        getMainWindow().getLayout().setHeight(null);\r
+        getMainWindow().getContent().setHeight(null);\r
 \r
         Label l = new Label(\r
                 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc condimentum urna quis leo. In hac habitasse platea dictumst. Pellentesque tincidunt. Sed libero nisl, faucibus in, laoreet pellentesque, consectetur non, dolor. Sed tortor. Ut pretium sapien. Cras elementum enim non lacus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nulla velit est, aliquam a, pellentesque a, iaculis nec, sapien. Ut ultrices ligula vitae nulla. Morbi sem pede, iaculis ac, condimentum a, ornare eget, nisi. Aliquam hendrerit pulvinar massa. Vestibulum pretium purus eu augue. Sed posuere elit ut magna. Cras consequat faucibus nunc. Vestibulum quis diam.");\r
index 8ee06ec4e09f516c634e0f4a6f2302b37f7da8ce..52cc5b789d1651f5e9e90987282a40df053a551c 100644 (file)
@@ -68,7 +68,7 @@ public abstract class Robustness extends com.vaadin.Application implements
             create = null;
             label = null;
             stressLayout = null;
-            System.out.println("main.getLayout()=" + main.getLayout());
+            System.out.println("main.getLayout()=" + main.getContent());
             System.out.println(getMemoryStatistics());
         } else if (event.getButton() == close) {
             System.out.println("Before close, memory statistics:");
index aa5ce8d8a234602add3fb49626103d642a0ec441..3a2fd78ce88290f359a938ae0f8f16b4d632a01e 100644 (file)
@@ -5,11 +5,11 @@ import com.vaadin.data.Property;
 import com.vaadin.ui.AbstractSelect;\r
 import com.vaadin.ui.CustomComponent;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.Tree;\r
 import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
+import com.vaadin.ui.themes.Reindeer;\r
 \r
 public class Ticket1245 extends com.vaadin.Application {\r
 \r
@@ -38,7 +38,7 @@ class TreeExample extends CustomComponent {
         setCompositionRoot(main);\r
 \r
         // Panel w/ Tree\r
-        main.setStyleName(Panel.STYLE_LIGHT);\r
+        main.setStyleName(Reindeer.PANEL_LIGHT);\r
         main.setWidth(200);\r
         // // Description, this is needed. Works in first slot\r
         main.addComponent(new Label(desc));\r
index ff21ce479d37dfdeb61475185df09f5f754ba51b..2a4b0014f2a6d23f64a96e951f2c550400e50f9f 100644 (file)
@@ -237,7 +237,7 @@ public class Ticket1362Login extends Application {
                     setUser(username);
                     currentUser.setValue(username);
                     currentUser.getWindow().showNotification("Logged in user: " + username);
-                    getMainWindow().getLayout().replaceComponent(loginBox, mainPanel);
+                    getMainWindow().getContent().replaceComponent(loginBox, mainPanel);
                     el.setExpandRatio(mainPanel, 1);
                 } else {
                     getMainWindow().showNotification("Wrong password. Hint, try '1234' ", Notification.TYPE_WARNING_MESSAGE);
index 8ca9292fcb494c1db31a8c0fd8db69a4f6a72375..16445805a14a4d08fd863a78361d9695d75f84a5 100644 (file)
@@ -24,7 +24,7 @@ public class Ticket1435 extends Application {
 
         final Window mainWin = new Window("ButtonPanel containing a table test");
         setMainWindow(mainWin);
-        ((AbstractOrderedLayout) mainWin.getLayout()).setSpacing(true);
+        ((AbstractOrderedLayout) mainWin.getContent()).setSpacing(true);
 
         ButtonPanel dataCardView1 = buildButtonPanel("My Tickets");
         ButtonPanel dataCardView2 = buildButtonPanel("My Tickets 2");
@@ -155,10 +155,10 @@ public class Ticket1435 extends Application {
         private void initContainer() {
             container.setStyleName("custompanel");
             container.setSizeFull();
-            container.getLayout().setMargin(false);
-            container.getLayout().setSizeFull();
+            ((Layout) container.getContent()).setMargin(false);
+            container.getContent().setSizeFull();
             root.addComponent(container);
-            root.setExpandRatio(container,1);
+            root.setExpandRatio(container, 1);
         }
 
         public void setHeight(int height, int unit) {
index b324321e8e4f9bcadff3cf044c239569a6826103..d10106f49902c50e08812c25e285a10eefea387d 100644 (file)
@@ -6,6 +6,7 @@ import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.Label;\r
+import com.vaadin.ui.Layout;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.Window;\r
 \r
@@ -15,7 +16,7 @@ public class Ticket1805 extends com.vaadin.Application {
     public void init() {\r
         final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
-        main.getLayout().setMargin(false);\r
+        ((Layout) main.getContent()).setMargin(false);\r
 \r
         Label description = new Label("GridLayout with 100% (no height), is wanted to " + "share all available width with columns " + "relatively to their natural width. And it " + "should still work with margins and spacings");\r
         main.addComponent(description);\r
index 549ab2126d4032ab09de2d39e1438540e29e7bed..2e71aa541761ab2092b2cc8d6fdbd1790d56b735 100644 (file)
@@ -216,7 +216,7 @@ public class Ticket1878 extends Application {
         p.setWidth(w);\r
         p.setHeight(h);\r
 \r
-        p.getLayout().setSizeFull();\r
+        p.getContent().setSizeFull();\r
 \r
         parentLayout.addComponent(p);\r
         p.addComponent(form);\r
index 2c639f73b6f270df439a84c2a0cd18a409bc260a..ae0b99ba6bd7d72ed35799fdf1e5182895f7ff58 100644 (file)
@@ -39,7 +39,7 @@ public class Ticket1966_2 extends Application {
         // p.addComponent(gl);\r
 \r
         // w.getLayout().addComponent(p);\r
-        createUI(w.getLayout());\r
+        createUI((Layout) w.getContent());\r
     }\r
 \r
     private void createUI(Layout layout) {\r
@@ -52,7 +52,7 @@ public class Ticket1966_2 extends Application {
         Panel p = new Panel("GridLayout");\r
         p.setWidth(500);\r
         p.setHeight(500);\r
-        p.getLayout().setSizeFull();\r
+        p.getContent().setSizeFull();\r
         layout.addComponent(p);\r
 \r
         GridLayout gl = new GridLayout(1, 4);\r
@@ -88,7 +88,7 @@ public class Ticket1966_2 extends Application {
         Panel p = new Panel("OrderedLayout");\r
         p.setWidth(500);\r
         p.setHeight(500);\r
-        p.getLayout().setWidth("100%");\r
+        p.getContent().setWidth("100%");\r
         layout.addComponent(p);\r
 \r
         AbstractOrderedLayout ol = new VerticalLayout();\r
@@ -113,8 +113,8 @@ public class Ticket1966_2 extends Application {
     private void expandLayout(Layout layout) {\r
         Panel p = new Panel("ExpandLayout");\r
         layout.addComponent(p);\r
-        p.getLayout().setWidth("500");\r
-        p.getLayout().setHeight("400");\r
+        p.getContent().setWidth("500");\r
+        p.getContent().setHeight("400");\r
 \r
         AbstractOrderedLayout el = new VerticalLayout();\r
         // el.setCaption("Horizontal");\r
index e8a2c2bc3cd057f4ed75f60a302514dd048e0c2a..e4f99b902321975fdd3b6a30b20dab67de29528d 100644 (file)
@@ -27,7 +27,7 @@ public class Ticket1966_3 extends Application {
         Panel p = new Panel(ol);\r
         p.setWidth("300px");\r
         p.setHeight("300px");\r
-        p.getLayout().setSizeFull();\r
+        p.getContent().setSizeFull();\r
 \r
         TextField tf = new TextField("Long caption, longer than 100 pixels");\r
         tf.setWidth("100px");\r
index 6b8c84d8c4a11739c04b340ec499e68dd33b3df0..85eba7c8dbb930ff02c1d53cc6cd817f0af619a3 100644 (file)
@@ -17,7 +17,7 @@ public class Ticket1969 extends com.vaadin.Application {
         final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
-        main.getLayout().setSizeFull();\r
+        main.getContent().setSizeFull();\r
 \r
         TabSheet ts = new TabSheet();\r
         ts.setSizeFull();\r
index b07a1a0c3d4e2a2d4debffcc09f17e8dd3888dc6..d6a75bf03c03edd23a613ea53c3430ba225dc57d 100644 (file)
@@ -17,9 +17,9 @@ public class Ticket2024 extends Application {
         GridLayout layout = new GridLayout(2, 2);\r
         layout.setHeight("100%");\r
         layout.setWidth("700");\r
-        w.getLayout().setSizeFull();\r
-        w.getLayout().setHeight("2000");\r
-        w.getLayout().addComponent(layout);\r
+        w.getContent().setSizeFull();\r
+        w.getContent().setHeight("2000");\r
+        w.getContent().addComponent(layout);\r
 \r
         layout.addComponent(new Label("This should NOT get stuck when scrolling down"));\r
         layout.addComponent(new TextField("This should not get stuck either..."));\r
@@ -27,7 +27,7 @@ public class Ticket2024 extends Application {
         VerticalLayout ol = new VerticalLayout();\r
         ol.setHeight("1000");\r
         ol.setWidth("200");\r
-        w.getLayout().addComponent(ol);\r
+        w.getContent().addComponent(ol);\r
         ol.addComponent(new Label("Just a label to enable the scrollbar"));\r
 \r
     }\r
index 4e2dee51914a88a7ca124736ca7520cbf288db04..5e85d2c595491a6e7d4c463fe103e2af2d7d4cc7 100644 (file)
@@ -31,9 +31,9 @@ public class Ticket2029 extends Application {
         setMainWindow(w);\r
         // setTheme("tests-tickets");\r
         Panel p = createPanel();\r
-        w.getLayout().addComponent(p);\r
+        w.getContent().addComponent(p);\r
         // w.getLayout().addComponent(createGLPanel());\r
-        w.getLayout().addComponent(createPanelV());\r
+        w.getContent().addComponent(createPanelV());\r
     }\r
 \r
     private Panel createPanel() {\r
@@ -43,7 +43,7 @@ public class Ticket2029 extends Application {
 \r
         HorizontalLayout layout = new HorizontalLayout();\r
         p.setContent(layout);\r
-        p.getLayout().setSizeFull();\r
+        p.getContent().setSizeFull();\r
 \r
         for (int i = 0; i < COMPONENTS; i++) {\r
             TextField tf = new TextField();\r
@@ -72,7 +72,7 @@ public class Ticket2029 extends Application {
 \r
         GridLayout layout = new GridLayout(COMPONENTS, 1);\r
         p.setContent(layout);\r
-        p.getLayout().setSizeFull();\r
+        p.getContent().setSizeFull();\r
 \r
         for (int i = 0; i < COMPONENTS; i++) {\r
             TextField tf = new TextField();\r
@@ -110,7 +110,7 @@ public class Ticket2029 extends Application {
 \r
         VerticalLayout layout = new VerticalLayout();\r
         p.setContent(layout);\r
-        p.getLayout().setSizeFull();\r
+        p.getContent().setSizeFull();\r
 \r
         for (int i = 0; i < COMPONENTS; i++) {\r
             TextField tf = new TextField();\r
index 9bea084de2912e90c2edec75175fff9bfaf4d09a..6203c198d5ab45c527e62ca962b7501ff8ed3bb9 100644 (file)
@@ -2,6 +2,7 @@ package com.vaadin.tests.tickets;
 \r
 import com.vaadin.ui.Accordion;\r
 import com.vaadin.ui.Label;\r
+import com.vaadin.ui.Layout;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.Window;\r
 \r
@@ -14,8 +15,8 @@ public class Ticket2040 extends com.vaadin.Application {
         Window main = new Window();\r
         setMainWindow(main);\r
 \r
-        main.getLayout().setSizeFull();\r
-        main.getLayout().setMargin(true);\r
+        main.getContent().setSizeFull();\r
+        ((Layout) main.getContent()).setMargin(true);\r
 \r
         setTheme("tests-tickets");\r
 \r
index 0c411530013b7a125d289be42447fdf5765970dc..6bc928ba40c84d19a99e11d28f1eab03a2d5c272 100644 (file)
@@ -38,7 +38,7 @@ public class Ticket2048 extends Application {
         getMainWindow().setContent(orderedLayout);\r
         // getMainWindow().setContent(new GridLayout(1, 1));\r
         getMainWindow().setSizeFull();\r
-        getMainWindow().getLayout().setSizeFull();\r
+        getMainWindow().getContent().setSizeFull();\r
 \r
         createUI(orderedLayout);\r
         // createUI(gridLayout);\r
@@ -73,7 +73,7 @@ public class Ticket2048 extends Application {
 \r
             public void buttonClick(ClickEvent event) {\r
                 Embedded newEmbedded = new Embedded(null, new ThemeResource("icons/64/folder-add.png"));\r
-                getMainWindow().getLayout().replaceComponent(embedded, newEmbedded);\r
+                getMainWindow().getContent().replaceComponent(embedded, newEmbedded);\r
                 embedded = newEmbedded;\r
 \r
             }\r
index a8d33b6f343883b5a239f1d484ea0cdd60433ccf..0594eace029ececeeaf5ce2e846e8f5e34711b58 100644 (file)
@@ -21,7 +21,7 @@ public class Ticket2061 extends Application {
     public void init() {
         mainWindow = new Window("Ticket 2061");
         mainWindow.setSizeFull();
-        mainWindow.getLayout().setSizeFull();
+        mainWindow.getContent().setSizeFull();
         setMainWindow(mainWindow);
 
         MyTable table1 = new MyTable(24, "table1");
index 2eae3aa0ed6cc7bd34afe9ef4337bdddf9032694..aaef03595fa03abb720d3ebd255b4f38fba4f75b 100644 (file)
@@ -21,7 +21,7 @@ public class Ticket2083 extends Application {
     private void createUI(GridLayout layout) {\r
         Panel p = new Panel("This is a panel with a longer caption than it should have");\r
         p.setWidth("100px");\r
-        p.getLayout().addComponent(new Label("Contents"));\r
+        p.getContent().addComponent(new Label("Contents"));\r
         layout.addComponent(p);\r
     }\r
 }\r
index 240d21facdd4ca893f6fcff6db78e03cdee146ab..0911cb68304801eb097c1c4e136a63425790d235 100644 (file)
@@ -14,7 +14,7 @@ public class Ticket2095 extends Application {
 \r
         // uncomment to workaround iorderedlayout bug in current trunk\r
         // w.setContent(new ExpandLayout());\r
-        w.getLayout().setSizeFull();\r
+        w.getContent().setSizeFull();\r
 \r
         Embedded em = new Embedded();\r
         em.setType(Embedded.TYPE_BROWSER);\r
index 7f59d899c47b0512651ded642f0925cb91f1db95..5d0d12d0386166e374ad1b42cb022d84007e0140 100644 (file)
@@ -14,7 +14,7 @@ public class Ticket2101 extends Application {
         Button b = new Button("Button with a long text which will not fit on 50 pixels");\r
         b.setWidth("50px");\r
 \r
-        w.getLayout().addComponent(b);\r
+        w.getContent().addComponent(b);\r
     }\r
 \r
 }\r
index 5f6f7d80d57362a4f6f27ca89268390aa2e74039..da69b1f1c333d21d5060effd0311c21faa038734 100644 (file)
@@ -17,7 +17,7 @@ public class Ticket2151 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index 25a4db403133718cb61dafe7d9c690fb33260610..3d90907e507d2e2aea934699545d637c7167f362 100644 (file)
@@ -14,7 +14,7 @@ public class Ticket2157 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index 15722f49c457c7226eb4f936b4dd4f7845b297c3..a3461dd8b650c5ce46cf312f77d938945a77abe3 100644 (file)
@@ -14,7 +14,7 @@ public class Ticket2178 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index d9fd82f197459e46d04d886b30bb2bc7dcdc7242..ef378e87f80c0f0862ed7f0099b177b3b6afa40c 100644 (file)
@@ -51,7 +51,7 @@ public class Ticket2204 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
@@ -174,7 +174,7 @@ public class Ticket2204 extends Application {
             textArea.setSizeFull();
         }
         if (c == Panel.class) {
-            Layout layout = ((Panel) cc).getLayout();
+            Layout layout = (Layout) ((Panel) cc).getContent();
             containerToComponent.put(cc, layout);
             layout.setVisible(false);
             textArea.setVisible(true);
index 1234175fc8e459556bbf24616464cc57094a7ca1..629ca49db0cca91fc3ef15633f7c69f1159c6ebe 100644 (file)
@@ -18,7 +18,7 @@ public class Ticket2209OL extends Application {
     @Override\r
     public void init() {\r
         setMainWindow(new Window());\r
-        getMainWindow().getLayout().setWidth("250px");\r
+        getMainWindow().getContent().setWidth("250px");\r
         gl = new VerticalLayout();\r
         gl.setStyleName("borders");\r
         getMainWindow().addComponent(gl);\r
index 3f2531b80d662374a993b33dbd23f8c29c3fb69e..12899e881484d86c7c840c256be40f86ebd9cf39 100644 (file)
@@ -18,7 +18,7 @@ public class Ticket2209OL2 extends Application {
     @Override\r
     public void init() {\r
         setMainWindow(new Window());\r
-        getMainWindow().getLayout().setWidth("250px");\r
+        getMainWindow().getContent().setWidth("250px");\r
         gl = new VerticalLayout();\r
         gl.setSizeUndefined();\r
         gl.setStyleName("borders");\r
index 700422910b5143969b49f42bcd633948a839b733..221f84f86f4fd2845eeb587bd88bb30300e51177 100644 (file)
@@ -5,6 +5,7 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
+import com.vaadin.ui.themes.Reindeer;\r
 \r
 public class Ticket2215 extends Application {\r
 \r
@@ -17,7 +18,7 @@ public class Ticket2215 extends Application {
         p.addComponent(new Label("Panel1"));\r
         p.setHeight("500px");\r
         p.setWidth("500px");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
+        p.setStyleName(Reindeer.PANEL_LIGHT);\r
         ol.addComponent(p);\r
         ol.addComponent(new Label("NextComponent"));\r
 \r
index a7d3da4e352b6acdf1406b45d0de8e8ac45b68c9..4f31bdef6660504f77a1c372d8cda4afa19e5b11 100644 (file)
@@ -20,7 +20,7 @@ public class Ticket2221 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
@@ -71,7 +71,7 @@ public class Ticket2221 extends Application {
             outerPanel.setHeight("1000px");
             outerPanel.setWidth("1000px");
 
-            outerPanel.getLayout().setSizeFull();
+            outerPanel.getContent().setSizeFull();
             Panel innerPanel = new Panel("Inner panel");
             innerPanel.setSizeFull();
             outerPanel.addComponent(innerPanel);
index f44d15e8dac97e458b60aa7a9ced6ad45d9fec1a..86dccede6945bb3df67e82663e921449c05a722e 100644 (file)
@@ -15,7 +15,7 @@ public class Ticket2222 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index acb86baadb47694aa38a1c7119f531108b1ee73b..ba12dd7abc3dd104ca70ecc4af6423a6c7b4dd4a 100644 (file)
@@ -12,7 +12,7 @@ public class Ticket2231 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index 2113c02712fbfbdad60f3373632aa170932f72c5..5c6167fbfe088a21a9df4e2bda84bf4d591ba536 100644 (file)
@@ -13,7 +13,7 @@ public class Ticket2234 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index ed1ad673867428a9be9adcbe8a20ad746f3aff5a..24d12354347a7d30131c03102d8c743d0bfaf53c 100644 (file)
@@ -12,7 +12,7 @@ public class Ticket2235 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index f23e01236913c99f6c6e4851ff161cba215be02d..d595000be0bddb4e89bce808e146ea978c7835f6 100644 (file)
@@ -15,7 +15,7 @@ public class Ticket2240 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index eb5ea98517fc0eea9dd521a7a34eef6212aa7ff9..8e6a96d2873e83e31340222a23a2dc80c9716af6 100644 (file)
@@ -25,7 +25,7 @@ public class Ticket2242 extends Application implements ValueChangeListener {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index 8232b7bc3834182b7b0136090b5d161a9a9503dd..d7c0994bbb8c80706b79ee6029e64fcbd32f2cda 100644 (file)
@@ -9,7 +9,7 @@ public class Ticket2245 extends Application {
     @Override
     public void init() {
         Window main = new Window("The Main Window");
-        main.getLayout().setSizeFull();
+        main.getContent().setSizeFull();
         setMainWindow(main);
         SplitPanel sp = new SplitPanel(SplitPanel.ORIENTATION_VERTICAL);
         main.addComponent(sp);
index 34b4e36c4931eb94f37a8e61541acd32d40f3339..50a99edb7ad952be7a04fd6717f4c8e89dcbf52d 100644 (file)
@@ -14,7 +14,7 @@ public class Ticket2271 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
index 4ef5c31cca24c9bb7f27f2bfab29dff2d3ccaa55..62bdcb52d46d000ec77008ae7c5cf72f378a1733 100644 (file)
@@ -15,6 +15,8 @@ import com.vaadin.ui.Layout.AlignmentHandler;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
+// This tests the deprecated setComponentAlignment(Component,String) API
+@SuppressWarnings("deprecation")
 public class Ticket2279 extends Application {
 
     private Label label;
@@ -62,7 +64,7 @@ public class Ticket2279 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        AbstractOrderedLayout layout = (AbstractOrderedLayout) w.getLayout();
+        AbstractOrderedLayout layout = (AbstractOrderedLayout) w.getContent();
 
         createUI(layout);
     }
index 92156edb7671b449889c7da60f63a4b4353db89e..8cee57f1bded1ddfbc44a0f802e76b40bd3630fd 100644 (file)
@@ -17,7 +17,7 @@ public class Ticket2282 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        w.getLayout().setSizeUndefined();
+        w.getContent().setSizeUndefined();
 
         layout1 = new FormLayout();
         layout1.setSizeUndefined();
index 7a7892816161e3e7584f4b07af730ec8bcd48fc0..d016e1726489d9eedd6efbcdd56bb1ab3c86bf71 100644 (file)
@@ -1,9 +1,9 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.Layout.AlignmentHandler;
 import com.vaadin.ui.Window;
 
 public class Ticket2283 extends Application {
@@ -20,7 +20,7 @@ public class Ticket2283 extends Application {
         gl.addComponent(new Label("Label 2 abc abc abc "));
         Label l = new Label("Colspan2, align right");
         gl.addComponent(l, 0, 1, 1, 1);
-        gl.setComponentAlignment(l, AlignmentHandler.ALIGNMENT_RIGHT, AlignmentHandler.ALIGNMENT_TOP);
+        gl.setComponentAlignment(l, Alignment.TOP_RIGHT);
         w.setContent(gl);
 
     }
index b40ce597cddc763620bf433d8a00b5f0b058cd8a..e763ae5cdecb21f5f2edc41a65c7d38a550d14dc 100644 (file)
@@ -2,8 +2,8 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.ui.AbstractOrderedLayout;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.Layout.AlignmentHandler;
 import com.vaadin.ui.Window;
 
 public class Ticket2294 extends Application {
@@ -13,7 +13,7 @@ public class Ticket2294 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((AbstractOrderedLayout) w.getLayout());
+        createUI((AbstractOrderedLayout) w.getContent());
     }
 
     private void createUI(AbstractOrderedLayout layout) {
@@ -26,14 +26,14 @@ public class Ticket2294 extends Application {
 
         layout.addComponent(label1);
         try {
-            layout.setComponentAlignment(label1, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
+            layout.setComponentAlignment(label1, Alignment.BOTTOM_LEFT);
             result1 = "OK";
         } catch (Exception e) {
             result1 = "FAILED: " + e.getMessage();
         }
 
         try {
-            layout.setComponentAlignment(label2, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
+            layout.setComponentAlignment(label2, Alignment.BOTTOM_LEFT);
             result2 = "FAILED, no exception";
         } catch (IllegalArgumentException e) {
             result2 = "OK";
@@ -42,7 +42,7 @@ public class Ticket2294 extends Application {
         }
 
         try {
-            layout.setComponentAlignment(label3, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
+            layout.setComponentAlignment(label3, Alignment.BOTTOM_LEFT);
             result3 = "FAILED, no exception";
         } catch (IllegalArgumentException e) {
             result3 = "OK";
index b68b7f8295ce1990ddc3c8b07649a3cf9d2854b3..4a5318258b5d2f7fe2ed975f92ac1fcdc6f62dd7 100644 (file)
@@ -4,6 +4,7 @@ import com.vaadin.Application;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Window;
+import com.vaadin.ui.themes.Reindeer;
 
 public class Ticket2304 extends Application {
 
@@ -13,7 +14,7 @@ public class Ticket2304 extends Application {
         setMainWindow(main);
 
         Panel p = new Panel();
-        p.setStyleName(Panel.STYLE_LIGHT);
+        p.setStyleName(Reindeer.PANEL_LIGHT);
         main.addComponent(p);
         p.setHeight("100px");
 
index 0bb594b1b8ce4262fd41c09966ab8636d435ec06..8d916d156b565a6f5983ff277c7867f952f5c825 100644 (file)
@@ -6,6 +6,7 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Window;
+import com.vaadin.ui.themes.Reindeer;
 
 public class Ticket2310 extends Application {
 
@@ -17,7 +18,7 @@ public class Ticket2310 extends Application {
         main.addComponent(new Label("Instructions: change label when panel is " + "invisible -> invalid change (with disabled " + "flag) is sent to client. Label is grey when panel is shown."));
 
         final Panel p = new Panel();
-        p.setStyleName(Panel.STYLE_LIGHT);
+        p.setStyleName(Reindeer.PANEL_LIGHT);
         main.addComponent(p);
         p.setHeight("100px");
 
index 4def8571122da3f83b0b6d5aa28d127fb8d6224d..503878ecad5baa063b49975ecaa816abfb57b156 100644 (file)
@@ -13,7 +13,7 @@ public class Ticket2323 extends Application {
 
         Window subWindow = new Window("");
         subWindow.setSizeUndefined();
-        subWindow.getLayout().setSizeUndefined();
+        subWindow.getContent().setSizeUndefined();
         subWindow.center();
         subWindow.addComponent(new RichTextArea());
         w.addWindow(subWindow);
index 07242770c9593c3a2be7aed36014e74025f30569..27a6376961072c9648e37048d86d195a4cec95e8 100644 (file)
@@ -16,7 +16,7 @@ public class Ticket2329 extends Application {
     public void init() {
         Window mainw = new Window();
         setMainWindow(mainw);
-        mainLo = (VerticalLayout) mainw.getLayout();
+        mainLo = (VerticalLayout) mainw.getContent();
         table = new Table();
         for (int i = 0; i < 10000; i++) {
             table.addItem(i);
index b6dd4cc1f08a87fc44fd18d3ad771615f4f67a07..d7fbccfa4eeaf824662989a1254a6603ca74fb59 100644 (file)
@@ -11,7 +11,7 @@ public class Ticket2341 extends com.vaadin.Application {
     public void init() {
         Window main = new Window();
         setMainWindow(main);
-        constructTables(main.getLayout());
+        constructTables((Layout) main.getContent());
     }
 
     private void constructTables(Layout layout) {
index 6e4a427db7727285501647b79fa2c14a443df063..b023ed2c142036a0f9b9dd1112a11d21fbae7418 100644 (file)
@@ -8,6 +8,7 @@ import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
+import com.vaadin.ui.themes.BaseTheme;
 
 public class Ticket2344 extends Application {
 
@@ -41,7 +42,7 @@ public class Ticket2344 extends Application {
             VerticalLayout vl = new VerticalLayout();
             // vl.setWidth(null);
             Button b = new Button("String 1 2 3");
-            b.setStyleName(Button.STYLE_LINK);
+            b.setStyleName(BaseTheme.BUTTON_LINK);
             vl.addComponent(b);
             t.addItem(new Object[] { vl, "String 2", "String 3", "String 4",
 
index c591fb8f6a74b4388a83aee502753921e764423f..76e59146db04f9b091acaa92f29d8f5093c619dc 100644 (file)
@@ -17,7 +17,7 @@ public class Ticket2347 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         setTheme("tests-tickets");
-        createUI((VerticalLayout) w.getLayout());
+        createUI((VerticalLayout) w.getContent());
     }
 
     private void createUI(VerticalLayout layout) {
index 2d82d056f48af3c3fe602fba31cd0d8adb746989..0c8a095ec9be3b88fc67ae8e87b66690b3a76189 100644 (file)
@@ -43,10 +43,10 @@ public class Ticket2365 extends Application {
         if (panel == null) {
             panel = new Panel("Panel level " + i);
             panel.setSizeFull();
-            panel.getLayout().setSizeFull();
+            panel.getContent().setSizeFull();
         }
         Panel p = new Panel("Panel level " + i--);
-        p.getLayout().setSizeFull();
+        p.getContent().setSizeFull();
         p.setSizeFull();
         panel.addComponent(p);
         if (i > 0) {
index 633827ba774166ca63bf0ef1996a6db9d5194f56..e98613dff233142c88c5119ff560cfd536a552fb 100644 (file)
@@ -2,10 +2,12 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.terminal.ExternalResource;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Embedded;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
+import com.vaadin.ui.Layout;
 import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
@@ -29,8 +31,8 @@ public class Ticket2405 extends Application {
         // browser.addWindow(root);
         setMainWindow(root);
 
-        root.getLayout().setSizeFull();
-        root.getLayout().setMargin(false);
+        root.getContent().setSizeFull();
+        ((Layout) root.getContent()).setMargin(false);
 
         // Top area, containing playback and volume controls, play status, view
         // modes and search
@@ -51,14 +53,14 @@ public class Ticket2405 extends Application {
         Embedded image = new Embedded("An image", new ExternalResource("http://dev.itmill.com/chrome/site/toolkit-logo.png"));
         image.setWidth("100%");
         root.addComponent(split);
-        ((VerticalLayout) root.getLayout()).setExpandRatio(split, 1.0f);
+        ((VerticalLayout) root.getContent()).setExpandRatio(split, 1.0f);
         VerticalLayout vl = new VerticalLayout();
         split.addComponent(vl);
 
         vl.addComponent(new TextField("abc"));
         vl.addComponent(image);
         vl.setExpandRatio(image, 1.0f);
-        vl.setComponentAlignment(image, "bottom center");
+        vl.setComponentAlignment(image, Alignment.BOTTOM_CENTER);
         vl.setHeight("100%");
         // We'll need one splitpanel to separate the sidebar and track listing
         Button bottomButton = new Button("Filler");
@@ -67,7 +69,7 @@ public class Ticket2405 extends Application {
 
         // The splitpanel is by default 100% x 100%, but we'll need to adjust
         // our main window layout to accomodate the height
-        root.getLayout().setHeight("100%");
+        root.getContent().setHeight("100%");
         // ((VerticalLayout) root.getLayout()).setExpandRatio(bottomButton,
         // 1.0F);
 
index 78ffa8a231739856d8087c8fc16df71fc19cb954..b7c9f902d223199d4e2708dd0b347c52d5e26467 100644 (file)
@@ -16,7 +16,7 @@ public class Ticket2406 extends Application {
         Window w = new Window(getClass().getSimpleName());
         setMainWindow(w);
         // setTheme("tests-tickets");
-        createUI((VerticalLayout) w.getLayout());
+        createUI((VerticalLayout) w.getContent());
     }
 
     private void createUI(VerticalLayout layout) {
index 398b72e16311b25110e0e203983e0e5195018050..26bb18faf5772ca83d6fc5346cccc122d4965823 100644 (file)
@@ -17,8 +17,8 @@ public class Ticket2432 extends Application {
 
         Window w = new Window();
         setMainWindow(w);
-        w.getLayout().setSizeFull();
-        ((SpacingHandler) w.getLayout()).setSpacing(true);
+        w.getContent().setSizeFull();
+        ((SpacingHandler) w.getContent()).setSpacing(true);
 
         Layout layout = new GridLayout(3, 3);
         populateLayout(layout);
index 958b4c51ed26a518ad65ac5251661f996ace38d8..ea535009590ec18df693d195f2084c47af3b9f44 100644 (file)
@@ -25,6 +25,7 @@ import com.vaadin.ui.Table;
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
+import com.vaadin.ui.themes.Reindeer;\r
 \r
 /**\r
  * Table layout is very slow in Firefox 3.0.10 when the table contains\r
@@ -113,7 +114,7 @@ public class Ticket2998 extends Application {
             Layout main = new VerticalLayout();\r
             setLayout(main);\r
             main.setSizeUndefined();\r
-            main.setStyleName(Panel.STYLE_LIGHT);\r
+            main.setStyleName(Reindeer.PANEL_LIGHT);\r
 \r
             FormLayout form = new FormLayout();\r
             form.setSizeUndefined();\r
@@ -255,11 +256,11 @@ public class Ticket2998 extends Application {
 \r
         // set theme and some layout stuff\r
         setMainWindow(w);\r
-        w.getLayout().setSizeFull();\r
-        w.getLayout().setMargin(false);\r
+        w.getContent().setSizeFull();\r
+        ((Layout) w.getContent()).setMargin(false);\r
 \r
         Panel p = new Panel("Workout Log");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
+        p.setStyleName(Reindeer.PANEL_LIGHT);\r
         w.addComponent(p);\r
         mainLayout = new VerticalLayout();\r
         p.setContent(mainLayout);\r
index 34bff6ca01a8ddbba48d8ed5d90f5ec78bc7b983..cea5fa66082e9fc9f7c4c51c6349485a90e93acf 100644 (file)
@@ -70,7 +70,7 @@ public class Ticket34 extends Application {
         for (String string : strings) {
             Panel p = new Panel(string);
             p.setSizeFull();
-            ((VerticalLayout) p.getLayout()).setSpacing(true);
+            ((VerticalLayout) p.getContent()).setSpacing(true);
             p.addComponent(new Label("This is a simple test case for " + "UriFragmentReader that can be used for" + " adding linking, back/forward button " + "and history support for ajax application. "));
             StringBuffer sb = new StringBuffer();
             sb.append("Available views : ");
index c8d79ecca023637c020938a774c179ab94531d6c..b1d6a8f0680c567c15e9e6fa3fb54027fa70932d 100644 (file)
@@ -19,6 +19,7 @@ import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;\r
 import com.vaadin.ui.TextField;\r
 import com.vaadin.ui.VerticalLayout;\r
+import com.vaadin.ui.themes.Reindeer;\r
 \r
 public class EmptyFieldErrorIndicators extends TestBase {\r
 \r
@@ -42,7 +43,7 @@ public class EmptyFieldErrorIndicators extends TestBase {
 \r
         Panel panel = new Panel();\r
         panel.setSizeFull();\r
-        panel.setStyleName(Panel.STYLE_LIGHT);\r
+        panel.setStyleName(Reindeer.PANEL_LIGHT);\r
         panel.addComponent(hl);\r
         panel.setScrollable(true);\r
         addComponent(panel);\r