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

220 files changed:
tests/src/com/vaadin/tests/BasicRandomTest.java
tests/src/com/vaadin/tests/CustomLayoutDemo.java
tests/src/com/vaadin/tests/LayoutDemo.java
tests/src/com/vaadin/tests/ListenerOrder.java
tests/src/com/vaadin/tests/ModalWindow.java
tests/src/com/vaadin/tests/NativeWindowing.java
tests/src/com/vaadin/tests/OrderedLayoutSwapComponents.java
tests/src/com/vaadin/tests/Parameters.java
tests/src/com/vaadin/tests/PerformanceTestBasicComponentRendering.java
tests/src/com/vaadin/tests/PerformanceTestLabelsAndOrderedLayouts.java
tests/src/com/vaadin/tests/PerformanceTestSubTreeCaching.java
tests/src/com/vaadin/tests/RandomLayoutStress.java
tests/src/com/vaadin/tests/ScrollbarStressTest.java
tests/src/com/vaadin/tests/StressComponentsInTable.java
tests/src/com/vaadin/tests/TableChangingDatasource.java
tests/src/com/vaadin/tests/TableSelectTest.java
tests/src/com/vaadin/tests/TestBench.java
tests/src/com/vaadin/tests/TestCaptionWrapper.java
tests/src/com/vaadin/tests/TestComponentAddAndRecursion.java
tests/src/com/vaadin/tests/TestContainerChanges.java
tests/src/com/vaadin/tests/TestDateField.java
tests/src/com/vaadin/tests/TestForAlignments.java
tests/src/com/vaadin/tests/TestForApplicationLayoutThatUsesWholeBrosersSpace.java
tests/src/com/vaadin/tests/TestForBasicApplicationLayout.java
tests/src/com/vaadin/tests/TestForChildComponentRendering.java
tests/src/com/vaadin/tests/TestForContainerFilterable.java
tests/src/com/vaadin/tests/TestForGridLayoutChildComponentRendering.java
tests/src/com/vaadin/tests/TestForMultipleStyleNames.java
tests/src/com/vaadin/tests/TestForNativeWindowing.java
tests/src/com/vaadin/tests/TestForPreconfiguredComponents.java
tests/src/com/vaadin/tests/TestForRichTextEditor.java
tests/src/com/vaadin/tests/TestForStyledUpload.java
tests/src/com/vaadin/tests/TestForTabSheet.java
tests/src/com/vaadin/tests/TestForTablesInitialColumnWidthLogicRendering.java
tests/src/com/vaadin/tests/TestForTrees.java
tests/src/com/vaadin/tests/TestForUpload.java
tests/src/com/vaadin/tests/TestForWindowOpen.java
tests/src/com/vaadin/tests/TestForWindowing.java
tests/src/com/vaadin/tests/TestIFrames.java
tests/src/com/vaadin/tests/TestMethodProperty.java
tests/src/com/vaadin/tests/TestSelectAndDatefieldInDeepLayouts.java
tests/src/com/vaadin/tests/TestSetVisibleAndCaching.java
tests/src/com/vaadin/tests/TestSizeableIncomponents.java
tests/src/com/vaadin/tests/TreeFilesystem.java
tests/src/com/vaadin/tests/TreeFilesystemContainer.java
tests/src/com/vaadin/tests/UpgradingSample.java
tests/src/com/vaadin/tests/UsingCustomNewItemHandlerInSelect.java
tests/src/com/vaadin/tests/UsingObjectsInSelect.java
tests/src/com/vaadin/tests/featurebrowser/Feature.java
tests/src/com/vaadin/tests/featurebrowser/FeatureBuffering.java
tests/src/com/vaadin/tests/featurebrowser/FeatureButton.java
tests/src/com/vaadin/tests/featurebrowser/FeatureContainers.java
tests/src/com/vaadin/tests/featurebrowser/FeatureCustomLayout.java
tests/src/com/vaadin/tests/featurebrowser/FeatureDateField.java
tests/src/com/vaadin/tests/featurebrowser/FeatureEmbedded.java
tests/src/com/vaadin/tests/featurebrowser/FeatureForm.java
tests/src/com/vaadin/tests/featurebrowser/FeatureGridLayout.java
tests/src/com/vaadin/tests/featurebrowser/FeatureItems.java
tests/src/com/vaadin/tests/featurebrowser/FeatureLabel.java
tests/src/com/vaadin/tests/featurebrowser/FeatureLink.java
tests/src/com/vaadin/tests/featurebrowser/FeatureOrderedLayout.java
tests/src/com/vaadin/tests/featurebrowser/FeaturePanel.java
tests/src/com/vaadin/tests/featurebrowser/FeatureParameters.java
tests/src/com/vaadin/tests/featurebrowser/FeatureProperties.java
tests/src/com/vaadin/tests/featurebrowser/FeatureSelect.java
tests/src/com/vaadin/tests/featurebrowser/FeatureTabSheet.java
tests/src/com/vaadin/tests/featurebrowser/FeatureTable.java
tests/src/com/vaadin/tests/featurebrowser/FeatureTree.java
tests/src/com/vaadin/tests/featurebrowser/FeatureUpload.java
tests/src/com/vaadin/tests/featurebrowser/FeatureValidators.java
tests/src/com/vaadin/tests/featurebrowser/FeatureWindow.java
tests/src/com/vaadin/tests/featurebrowser/IntroBasic.java
tests/src/com/vaadin/tests/featurebrowser/IntroComponents.java
tests/src/com/vaadin/tests/featurebrowser/IntroDataHandling.java
tests/src/com/vaadin/tests/featurebrowser/IntroDataModel.java
tests/src/com/vaadin/tests/featurebrowser/IntroItemContainers.java
tests/src/com/vaadin/tests/featurebrowser/IntroLayouts.java
tests/src/com/vaadin/tests/featurebrowser/IntroTerminal.java
tests/src/com/vaadin/tests/featurebrowser/IntroWelcome.java
tests/src/com/vaadin/tests/featurebrowser/PropertyPanel.java
tests/src/com/vaadin/tests/layouts/OrderedLayoutBasics.java
tests/src/com/vaadin/tests/robustness/RobustnessSimple.java
tests/src/com/vaadin/tests/server/components/AbstractTestFieldValueChange.java
tests/src/com/vaadin/tests/tickets/Ticket1225.java
tests/src/com/vaadin/tests/tickets/Ticket1230.java
tests/src/com/vaadin/tests/tickets/Ticket1245.java
tests/src/com/vaadin/tests/tickets/Ticket1362Login.java
tests/src/com/vaadin/tests/tickets/Ticket1365.java
tests/src/com/vaadin/tests/tickets/Ticket1397.java
tests/src/com/vaadin/tests/tickets/Ticket1435.java
tests/src/com/vaadin/tests/tickets/Ticket1444.java
tests/src/com/vaadin/tests/tickets/Ticket1465ModalNotification.java
tests/src/com/vaadin/tests/tickets/Ticket1506_Panel.java
tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer.java
tests/src/com/vaadin/tests/tickets/Ticket1506_TestContainer2.java
tests/src/com/vaadin/tests/tickets/Ticket1572.java
tests/src/com/vaadin/tests/tickets/Ticket1581.java
tests/src/com/vaadin/tests/tickets/Ticket1589.java
tests/src/com/vaadin/tests/tickets/Ticket1598.java
tests/src/com/vaadin/tests/tickets/Ticket1659.java
tests/src/com/vaadin/tests/tickets/Ticket1663.java
tests/src/com/vaadin/tests/tickets/Ticket1710.java
tests/src/com/vaadin/tests/tickets/Ticket1737.java
tests/src/com/vaadin/tests/tickets/Ticket1767.java
tests/src/com/vaadin/tests/tickets/Ticket1772.java
tests/src/com/vaadin/tests/tickets/Ticket1804.java
tests/src/com/vaadin/tests/tickets/Ticket1805.java
tests/src/com/vaadin/tests/tickets/Ticket1806.java
tests/src/com/vaadin/tests/tickets/Ticket1811.java
tests/src/com/vaadin/tests/tickets/Ticket1819.java
tests/src/com/vaadin/tests/tickets/Ticket1834PanelScrolling.java
tests/src/com/vaadin/tests/tickets/Ticket1857.java
tests/src/com/vaadin/tests/tickets/Ticket1868.java
tests/src/com/vaadin/tests/tickets/Ticket1869.java
tests/src/com/vaadin/tests/tickets/Ticket1878.java
tests/src/com/vaadin/tests/tickets/Ticket1900.java
tests/src/com/vaadin/tests/tickets/Ticket1904.java
tests/src/com/vaadin/tests/tickets/Ticket1916.java
tests/src/com/vaadin/tests/tickets/Ticket1919.java
tests/src/com/vaadin/tests/tickets/Ticket1921.java
tests/src/com/vaadin/tests/tickets/Ticket1923.java
tests/src/com/vaadin/tests/tickets/Ticket1924ThemeChanging.java
tests/src/com/vaadin/tests/tickets/Ticket1939.java
tests/src/com/vaadin/tests/tickets/Ticket1940.java
tests/src/com/vaadin/tests/tickets/Ticket1953.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/Ticket1969.java
tests/src/com/vaadin/tests/tickets/Ticket1970.java
tests/src/com/vaadin/tests/tickets/Ticket1973.java
tests/src/com/vaadin/tests/tickets/Ticket1973_2.java
tests/src/com/vaadin/tests/tickets/Ticket1975.java
tests/src/com/vaadin/tests/tickets/Ticket1982.java
tests/src/com/vaadin/tests/tickets/Ticket1983.java
tests/src/com/vaadin/tests/tickets/Ticket1991.java
tests/src/com/vaadin/tests/tickets/Ticket1995.java
tests/src/com/vaadin/tests/tickets/Ticket20.java
tests/src/com/vaadin/tests/tickets/Ticket2001.java
tests/src/com/vaadin/tests/tickets/Ticket2002.java
tests/src/com/vaadin/tests/tickets/Ticket2007.java
tests/src/com/vaadin/tests/tickets/Ticket2009.java
tests/src/com/vaadin/tests/tickets/Ticket2014.java
tests/src/com/vaadin/tests/tickets/Ticket2021.java
tests/src/com/vaadin/tests/tickets/Ticket2023.java
tests/src/com/vaadin/tests/tickets/Ticket2024.java
tests/src/com/vaadin/tests/tickets/Ticket2029.java
tests/src/com/vaadin/tests/tickets/Ticket2037.java
tests/src/com/vaadin/tests/tickets/Ticket2038.java
tests/src/com/vaadin/tests/tickets/Ticket2040.java
tests/src/com/vaadin/tests/tickets/Ticket2043.java
tests/src/com/vaadin/tests/tickets/Ticket2048.java
tests/src/com/vaadin/tests/tickets/Ticket2053.java
tests/src/com/vaadin/tests/tickets/Ticket2060.java
tests/src/com/vaadin/tests/tickets/Ticket2061.java
tests/src/com/vaadin/tests/tickets/Ticket2061b.java
tests/src/com/vaadin/tests/tickets/Ticket2061c.java
tests/src/com/vaadin/tests/tickets/Ticket2083.java
tests/src/com/vaadin/tests/tickets/Ticket2090.java
tests/src/com/vaadin/tests/tickets/Ticket2099.java
tests/src/com/vaadin/tests/tickets/Ticket2101.java
tests/src/com/vaadin/tests/tickets/Ticket2103.java
tests/src/com/vaadin/tests/tickets/Ticket2104.java
tests/src/com/vaadin/tests/tickets/Ticket2106.java
tests/src/com/vaadin/tests/tickets/Ticket2107.java
tests/src/com/vaadin/tests/tickets/Ticket2117.java
tests/src/com/vaadin/tests/tickets/Ticket2119.java
tests/src/com/vaadin/tests/tickets/Ticket2125.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/Ticket2179.java
tests/src/com/vaadin/tests/tickets/Ticket2180.java
tests/src/com/vaadin/tests/tickets/Ticket2181.java
tests/src/com/vaadin/tests/tickets/Ticket2186.java
tests/src/com/vaadin/tests/tickets/Ticket2204.java
tests/src/com/vaadin/tests/tickets/Ticket2208.java
tests/src/com/vaadin/tests/tickets/Ticket2209.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/Ticket2227OrderedlayoutInTable.java
tests/src/com/vaadin/tests/tickets/Ticket2232.java
tests/src/com/vaadin/tests/tickets/Ticket2240.java
tests/src/com/vaadin/tests/tickets/Ticket2242.java
tests/src/com/vaadin/tests/tickets/Ticket2244.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/Ticket2287.java
tests/src/com/vaadin/tests/tickets/Ticket2292.java
tests/src/com/vaadin/tests/tickets/Ticket2294.java
tests/src/com/vaadin/tests/tickets/Ticket2297.java
tests/src/com/vaadin/tests/tickets/Ticket2303.java
tests/src/com/vaadin/tests/tickets/Ticket2304.java
tests/src/com/vaadin/tests/tickets/Ticket2310.java
tests/src/com/vaadin/tests/tickets/Ticket2319.java
tests/src/com/vaadin/tests/tickets/Ticket2325.java
tests/src/com/vaadin/tests/tickets/Ticket2329.java
tests/src/com/vaadin/tests/tickets/Ticket2337.java
tests/src/com/vaadin/tests/tickets/Ticket2339.java
tests/src/com/vaadin/tests/tickets/Ticket2398.java
tests/src/com/vaadin/tests/tickets/Ticket2405.java
tests/src/com/vaadin/tests/tickets/Ticket2411.java
tests/src/com/vaadin/tests/tickets/Ticket2426.java
tests/src/com/vaadin/tests/tickets/Ticket2431.java
tests/src/com/vaadin/tests/tickets/Ticket2432.java
tests/src/com/vaadin/tests/tickets/Ticket2434.java
tests/src/com/vaadin/tests/tickets/Ticket2440.java
tests/src/com/vaadin/tests/tickets/Ticket2998.java
tests/src/com/vaadin/tests/tickets/Ticket3146.java
tests/src/com/vaadin/tests/tickets/Ticket34.java
tests/src/com/vaadin/tests/tickets/Ticket677.java
tests/src/com/vaadin/tests/tickets/Ticket695.java
tests/src/com/vaadin/tests/tickets/Ticket736.java
tests/src/com/vaadin/tests/tickets/Ticket846.java
tests/src/com/vaadin/tests/tickets/Ticket932.java
tests/src/com/vaadin/tests/util/RandomComponents.java

index 680c0ebde802419cc1ca06150283ca81de6c18bf..d54ec4e391e4ad9e0dbb8dc476e124d42b41b699 100644 (file)
@@ -13,12 +13,13 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.GridLayout;
+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.TabSheet;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -45,8 +46,7 @@ import com.vaadin.ui.Window;
  * 
  */
 @SuppressWarnings("unchecked")
-public class BasicRandomTest extends com.vaadin.Application implements
-        Button.ClickListener {
+public class BasicRandomTest extends com.vaadin.Application implements Button.ClickListener {
 
     // Seed with fixed number to ensure predeterministic AUT behaviour
     private Random rand;
@@ -56,17 +56,15 @@ public class BasicRandomTest extends com.vaadin.Application implements
 
     private static int COMPONENT_MAX_GROUPED_NUMBER = 5;
 
-    private final OrderedLayout mainLayout = new OrderedLayout();
+    private final VerticalLayout mainLayout = new VerticalLayout();
 
     private Layout testingLayout;
 
     private final TextField randomSeedValue = new TextField("Seed for random");
 
-    private final Button seedShuffle = new Button("Shuffle with seed", this,
-            "seedShuffle");
+    private final Button seedShuffle = new Button("Shuffle with seed", this, "seedShuffle");
 
-    private final Button randomShuffle = new Button(
-            "Seed randomly and shuffle", this, "randomShuffle");
+    private final Button randomShuffle = new Button("Seed randomly and shuffle", this, "randomShuffle");
 
     private Label display = null;
 
@@ -113,19 +111,9 @@ public class BasicRandomTest extends com.vaadin.Application implements
 
         // Setup contains restart button and deterministic component shuffler
         // Test requirement: test cases must be reproducable (use seed)
-        mainLayout.addComponent(new Label(
-                "<H3>ATFTest with randomized Calculator functionality</H3>"
-                        + "Buttons with X captions contain calculator number, "
-                        + "minus, add, multiply, divisor or clear "
-                        + "button functionalities.<br />Layouts, \"noise\" "
-                        + "components and component placing is randomized "
-                        + "after each application restart.<br />"
-                        + "Test cases should exercise calculator functions "
-                        + "through X buttons and ensure that Result label "
-                        + "contains correct value.", Label.CONTENT_XHTML));
-
-        final OrderedLayout setupLayout = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        mainLayout.addComponent(new Label("<H3>ATFTest with randomized Calculator functionality</H3>" + "Buttons with X captions contain calculator number, " + "minus, add, multiply, divisor or clear " + "button functionalities.<br />Layouts, \"noise\" " + "components and component placing is randomized " + "after each application restart.<br />" + "Test cases should exercise calculator functions " + "through X buttons and ensure that Result label " + "contains correct value.", Label.CONTENT_XHTML));
+
+        final HorizontalLayout setupLayout = new HorizontalLayout();
         final Panel statusPanel = new Panel("Status");
         statusPanel.setWidth(200);
         setupLayout.addComponent(statusPanel);
@@ -157,8 +145,7 @@ public class BasicRandomTest extends com.vaadin.Application implements
         }
         try {
             // randomize using user given value
-            rand = new Random(Long.parseLong((String) randomSeedValue
-                    .getValue()));
+            rand = new Random(Long.parseLong((String) randomSeedValue.getValue()));
         } catch (final Exception e) {
             randomize();
         }
@@ -168,8 +155,7 @@ public class BasicRandomTest extends com.vaadin.Application implements
         addComponents(testingLayout);
         eventCounter = 0;
 
-        statusLabel.setValue("#" + eventCounter + ": button <none>"
-                + ", value " + Double.toString(current));
+        statusLabel.setValue("#" + eventCounter + ": button <none>" + ", value " + Double.toString(current));
     }
 
     // initialize random with random seed and shuffle
@@ -206,11 +192,7 @@ public class BasicRandomTest extends com.vaadin.Application implements
         components.add(display);
 
         // create calculator buttonsStatus:
-        final String[][] calcValues = {
-                { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-",
-                        "*", "/", "=", "C" },
-                { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "plus",
-                        "minus", "multiple", "divisor", "equals", "clear" } };
+        final String[][] calcValues = { { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "-", "*", "/", "=", "C" }, { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "plus", "minus", "multiple", "divisor", "equals", "clear" } };
         // final String[] randomizedCaptions = { "a", "b", "c", "y", "8", "3" };
         // String[] randomizedCaptions = { "X" };
         buttonValues = new HashMap<Button, String>();
@@ -256,8 +238,7 @@ public class BasicRandomTest extends com.vaadin.Application implements
     private void addComponents(Layout layout) {
         while (components.size() > 0) {
             // Get random container
-            final ComponentContainer container = randomComponents
-                    .getRandomComponentContainer("" + captionCounter++);
+            final ComponentContainer container = randomComponents.getRandomComponentContainer("" + captionCounter++);
             layout.addComponent(container);
             // Get random amount of components for above container
             final int groupsize = rand.nextInt(COMPONENT_MAX_GROUPED_NUMBER) + 1;
@@ -265,8 +246,7 @@ public class BasicRandomTest extends com.vaadin.Application implements
                 final Component c = getComponent();
                 if (c != null) {
                     if (container instanceof TabSheet) {
-                        final ComponentContainer tab = (ComponentContainer) ((TabSheet) container)
-                                .getSelectedTab();
+                        final ComponentContainer tab = (ComponentContainer) ((TabSheet) container).getSelectedTab();
                         tab.addComponent(c);
                     } else if (container instanceof GridLayout) {
                         final GridLayout gl = (GridLayout) container;
@@ -293,10 +273,8 @@ public class BasicRandomTest extends com.vaadin.Application implements
             // Number button pressed
             current = current * 10 + Double.parseDouble(value);
             display.setValue(Double.toString(current));
-            statusLabel.setValue("#" + eventCounter + ": button " + value
-                    + ", value " + Double.toString(current));
-            System.out.println("#" + eventCounter + ": button " + value
-                    + ", value " + Double.toString(current));
+            statusLabel.setValue("#" + eventCounter + ": button " + value + ", value " + Double.toString(current));
+            System.out.println("#" + eventCounter + ": button " + value + ", value " + Double.toString(current));
         } catch (final java.lang.NumberFormatException e) {
             // Operation button pressed
             if (operation.equals("+")) {
@@ -320,10 +298,8 @@ public class BasicRandomTest extends com.vaadin.Application implements
             operation = value;
             current = 0.0;
             display.setValue(Double.toString(stored));
-            statusLabel.setValue("#" + eventCounter + ": button " + value
-                    + ", value " + Double.toString(stored));
-            System.out.println("#" + eventCounter + ": button " + value
-                    + ", value " + Double.toString(stored));
+            statusLabel.setValue("#" + eventCounter + ": button " + value + ", value " + Double.toString(stored));
+            System.out.println("#" + eventCounter + ": button " + value + ", value " + Double.toString(stored));
         }
     }
 
@@ -343,8 +319,7 @@ public class BasicRandomTest extends com.vaadin.Application implements
     @Override
     public void terminalError(com.vaadin.terminal.Terminal.ErrorEvent event) {
         final Throwable e = event.getThrowable();
-        System.err.println(getUser().toString() + " terminalError: "
-                + e.toString());
+        System.err.println(getUser().toString() + " terminalError: " + e.toString());
         e.printStackTrace();
     }
 }
index 2a8d5de9b77efba84ec41a1180a4ff358ef919b0..9e7f4ff6f5ce8fad69ef808db2f91d0ad97cff29 100644 (file)
@@ -28,8 +28,7 @@ import com.vaadin.ui.Window;
  * @since 4.0.0
  * 
  */
-public class CustomLayoutDemo extends com.vaadin.Application implements
-        Listener {
+public class CustomLayoutDemo extends com.vaadin.Application implements Listener {
 
     private CustomLayout mainLayout = null;
 
@@ -57,8 +56,7 @@ public class CustomLayoutDemo extends com.vaadin.Application implements
         // Create custom layout, themes/example/layout/mainLayout.html
         mainLayout = new CustomLayout("mainLayout");
         // wrap custom layout inside a panel
-        final Panel customLayoutPanel = new Panel(
-                "Panel containing custom layout (mainLayout.html)");
+        final Panel customLayoutPanel = new Panel("Panel containing custom layout (mainLayout.html)");
         customLayoutPanel.addComponent(mainLayout);
 
         // Login components
@@ -88,8 +86,7 @@ public class CustomLayoutDemo extends com.vaadin.Application implements
         setBody("Welcome");
 
         // Add heading label and custom layout panel to main window
-        mainWindow.addComponent(new Label("<h3>Custom layout demo</h3>",
-                Label.CONTENT_XHTML));
+        mainWindow.addComponent(new Label("<h3>Custom layout demo</h3>", Label.CONTENT_XHTML));
         mainWindow.addComponent(customLayoutPanel);
     }
 
@@ -104,8 +101,7 @@ public class CustomLayoutDemo extends com.vaadin.Application implements
         if (username.getValue().toString().length() < 1) {
             username.setValue("Anonymous");
         }
-        mainLayout.replaceComponent(loginButton, new Label("Welcome user <em>"
-                + username.getValue() + "</em>", Label.CONTENT_XHTML));
+        mainLayout.replaceComponent(loginButton, new Label("Welcome user <em>" + username.getValue() + "</em>", Label.CONTENT_XHTML));
     }
 
     /**
index 1cdf4de298418cf68471586570ffbfd99e7c6202..33f5bb5e26f2df1e8a46a286a7bbffd25677b669 100644 (file)
@@ -8,11 +8,12 @@ import com.vaadin.terminal.ClassResource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Embedded;
 import com.vaadin.ui.GridLayout;
+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.TabSheet;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -36,16 +37,14 @@ public class LayoutDemo extends com.vaadin.Application {
         //
         // Create horizontal ordered layout
         //
-        final OrderedLayout layoutA = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        final HorizontalLayout layoutA = new HorizontalLayout();
         // Add 4 panels
         fillLayout(layoutA, 4);
 
         //
         // Create vertical ordered layout
         //
-        final OrderedLayout layoutB = new OrderedLayout(
-                OrderedLayout.ORIENTATION_VERTICAL);
+        final VerticalLayout layoutB = new VerticalLayout();
         // Add 4 panels
         fillLayout(layoutB, 4);
 
@@ -84,27 +83,15 @@ public class LayoutDemo extends com.vaadin.Application {
         //
         // Add demo layouts to main window
         //
-        mainWindow.addComponent(new Label(
-                "<h3>Horizontal ordered layout</h3>Added four components.",
-                Label.CONTENT_XHTML));
+        mainWindow.addComponent(new Label("<h3>Horizontal ordered layout</h3>Added four components.", Label.CONTENT_XHTML));
         mainWindow.addComponent(layoutA);
-        mainWindow.addComponent(new Label(
-                "<br /><h3>Vertical ordered layout</h3>Added four components.",
-                Label.CONTENT_XHTML));
+        mainWindow.addComponent(new Label("<br /><h3>Vertical ordered layout</h3>Added four components.", Label.CONTENT_XHTML));
         mainWindow.addComponent(layoutB);
-        mainWindow.addComponent(new Label(
-                "<br /><h3>Grid Layout (4 x 4)</h3>Added 16 components.",
-                Label.CONTENT_XHTML));
+        mainWindow.addComponent(new Label("<br /><h3>Grid Layout (4 x 4)</h3>Added 16 components.", Label.CONTENT_XHTML));
         mainWindow.addComponent(layoutG);
-        mainWindow
-                .addComponent(new Label("<br /><h3>Grid Layout (4 x 4)</h3>"
-                        + "Added four panels and four embedded components "
-                        + "diagonally with absolute coordinates.",
-                        Label.CONTENT_XHTML));
+        mainWindow.addComponent(new Label("<br /><h3>Grid Layout (4 x 4)</h3>" + "Added four panels and four embedded components " + "diagonally with absolute coordinates.", Label.CONTENT_XHTML));
         mainWindow.addComponent(layoutG2);
-        mainWindow.addComponent(new Label(
-                "<br /><h3>TabSheet</h3>Added above layouts as tabs.",
-                Label.CONTENT_XHTML));
+        mainWindow.addComponent(new Label("<br /><h3>TabSheet</h3>Added above layouts as tabs.", Label.CONTENT_XHTML));
         mainWindow.addComponent(tabsheet);
 
     }
@@ -120,12 +107,7 @@ public class LayoutDemo extends com.vaadin.Application {
     private Component getExampleComponent(String caption) {
         final Panel panel = new Panel();
         panel.setCaption("Panel component " + caption);
-        panel.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.",
-                Label.CONTENT_XHTML));
+        panel.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.", Label.CONTENT_XHTML));
         panel.setWidth(222);
         return panel;
     }
index c1d6245222827818c50e64b676964fd93bfa1fb5..e31ca1e86ca26fa771db5c25f0d1470430317a95 100644 (file)
@@ -16,9 +16,7 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.Window;
 
-public class ListenerOrder extends com.vaadin.Application implements
-        Button.ClickListener, PropertySetChangeListener, ItemSetChangeListener,
-        ValueChangeListener {
+public class ListenerOrder extends com.vaadin.Application implements Button.ClickListener, PropertySetChangeListener, ItemSetChangeListener, ValueChangeListener {
 
     Button b1;
 
@@ -134,8 +132,7 @@ public class ListenerOrder extends com.vaadin.Application implements
         }
 
         public void buttonClick(ClickEvent event) {
-            String msg = "ClickEvent from MyClickListener " + name + ", id="
-                    + count;
+            String msg = "ClickEvent from MyClickListener " + name + ", id=" + count;
             System.out.println(msg);
             getMainWindow().showNotification(msg);
         }
index 4ace9f889e73d57b47a48187aa3d1b5f6d8ba8fb..f77ce95c00a72cd042bee333b803f33df1a47479 100644 (file)
@@ -21,8 +21,7 @@ import com.vaadin.ui.Window;
  * @see com.vaadin.ui.Window
  * @see com.vaadin.ui.Label
  */
-public class ModalWindow extends com.vaadin.Application implements
-        ClickListener {
+public class ModalWindow extends com.vaadin.Application implements ClickListener {
 
     private Window test;
     private Button reopen;
@@ -57,8 +56,7 @@ public class ModalWindow extends com.vaadin.Application implements
         if (event.getButton() == reopen) {
             openSubWindow();
         }
-        getMainWindow().addComponent(
-                new Label("Button click: " + event.getButton().getCaption()));
+        getMainWindow().addComponent(new Label("Button click: " + event.getButton().getCaption()));
     }
 
     private void openSubWindow() {
@@ -66,8 +64,7 @@ public class ModalWindow extends com.vaadin.Application implements
         test = new Window("Modal window");
         test.setModal(true);
         getMainWindow().addWindow(test);
-        test.addComponent(new Label(
-                "You have to close this window before accessing others."));
+        test.addComponent(new Label("You have to close this window before accessing others."));
 
         // Textfield for modal window
         final TextField f = new TextField();
index e1cf6087638908fdcb6f9114c7873b125ba3d931..337d99b837a6243a3c02396f51264435afff7690 100644 (file)
@@ -22,76 +22,41 @@ public class NativeWindowing extends Application {
 
         setMainWindow(main);
 
-        main.addComponent(new Button("Add new subwindow",
-                new Button.ClickListener() {
+        main.addComponent(new Button("Add new subwindow", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                final Window w = new Window("sw " + System.currentTimeMillis());
+                main.addWindow(w);
+                w.setPositionX(100);
+                w.setPositionY(100);
+                w.setWidth(200);
+                w.setHeight(200);
+
+                w.setWidth(100);
+                w.setHeight(400);
+
+                final Button closebutton = new Button("Close " + w.getCaption(), new Button.ClickListener() {
                     public void buttonClick(ClickEvent event) {
-                        final Window w = new Window("sw "
-                                + System.currentTimeMillis());
-                        main.addWindow(w);
-                        w.setPositionX(100);
-                        w.setPositionY(100);
-                        w.setWidth(200);
-                        w.setHeight(200);
-
-                        w.setWidth(100);
-                        w.setHeight(400);
-
-                        final Button closebutton = new Button("Close "
-                                + w.getCaption(), new Button.ClickListener() {
-                            public void buttonClick(ClickEvent event) {
-                                main.removeWindow(w);
-                            }
-
-                        });
-                        w.addComponent(closebutton);
-
-                        w.addComponent(new Label(
-                                "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>",
-                                Label.CONTENT_XHTML));
-
+                        main.removeWindow(w);
                     }
-                }));
 
-        main.addComponent(new Button(
-                "Open a currently uncreated application level window",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        try {
-                            main.open(
-                                    new com.vaadin.terminal.ExternalResource(
-                                            new URL(
-                                                    getURL(),
-                                                    "mainwin-"
-                                                            + System.currentTimeMillis()
-                                                            + "/")), null);
-                        } catch (final MalformedURLException e) {
-                        }
-                    }
-                }));
+                });
+                w.addComponent(closebutton);
+
+                w.addComponent(new Label("<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>", Label.CONTENT_XHTML));
+
+            }
+        }));
+
+        main.addComponent(new Button("Open a currently uncreated application level window", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                try {
+                    main.open(new com.vaadin.terminal.ExternalResource(new URL(getURL(), "mainwin-" + System.currentTimeMillis() + "/")), null);
+                } catch (final MalformedURLException e) {
+                }
+            }
+        }));
 
-        main.addComponent(new Button(
-                "Commit (saves window state: size, place, scrollpos)"));
+        main.addComponent(new Button("Commit (saves window state: size, place, scrollpos)"));
     }
 
     @Override
@@ -106,15 +71,12 @@ public class NativeWindowing extends Application {
             final String postfix = name.substring("mainwin-".length());
             final Window ww = new Window("Window: " + postfix);
             ww.setName(name);
-            ww.addComponent(new Label(
-                    "This is a application-level window opened with name: "
-                            + name));
+            ww.addComponent(new Label("This is a application-level window opened with name: " + name));
             ww.addComponent(new Button("Click me", new Button.ClickListener() {
                 int state = 0;
 
                 public void buttonClick(ClickEvent event) {
-                    ww.addComponent(new Label("Button clicked " + (++state)
-                            + " times"));
+                    ww.addComponent(new Label("Button clicked " + (++state) + " times"));
                 }
             }));
             addWindow(ww);
index dab5eec54308236dd771274944d7a60d7060ad59..34ec439010e2d50b8a8753950318373086f026ad 100644 (file)
@@ -6,11 +6,13 @@ package com.vaadin.tests;
 
 import java.util.ArrayList;
 
+import com.vaadin.ui.AbstractOrderedLayout;
 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.VerticalLayout;
 
 /**
  * 
@@ -21,13 +23,13 @@ import com.vaadin.ui.OrderedLayout;
  */
 public class OrderedLayoutSwapComponents extends CustomComponent {
 
-    private final OrderedLayout main;
+    private final AbstractOrderedLayout main;
 
     ArrayList<MyComponent> order = new ArrayList<MyComponent>();
 
     public OrderedLayoutSwapComponents() {
 
-        main = new OrderedLayout();
+        main = new VerticalLayout();
         // main.setSizeFull();
         setCompositionRoot(main);
         createNewView();
@@ -53,8 +55,7 @@ public class OrderedLayoutSwapComponents extends CustomComponent {
         private Button down;
 
         MyComponent(String name) {
-            OrderedLayout ol = new OrderedLayout(
-                    OrderedLayout.ORIENTATION_HORIZONTAL);
+            HorizontalLayout ol = new HorizontalLayout();
             ol.setDebugId(name.replaceAll(" ", ""));
             ol.addComponent(new Label(name));
             up = new Button("up");
index a8957c0f6af2040286c31d6616f16d98b0439898..faa318298b85e53d0f08f330f83dc376e564fd53 100644 (file)
@@ -12,11 +12,11 @@ import com.vaadin.terminal.DownloadStream;
 import com.vaadin.terminal.ExternalResource;
 import com.vaadin.terminal.ParameterHandler;
 import com.vaadin.terminal.URIHandler;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Link;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -26,8 +26,7 @@ import com.vaadin.ui.Window;
  * 
  * @since 3.1.1
  */
-public class Parameters extends com.vaadin.Application implements URIHandler,
-        ParameterHandler {
+public class Parameters extends com.vaadin.Application implements URIHandler, ParameterHandler {
 
     private final Label context = new Label();
 
@@ -45,22 +44,18 @@ public class Parameters extends com.vaadin.Application implements URIHandler,
         main.addURIHandler(this);
         main.addParameterHandler(this);
 
-        final ExpandLayout layout = new ExpandLayout();
-        final Label info = new Label("To test URI and Parameter Handlers, "
-                + "add get parameters to URL. For example try examples below: ");
+        final VerticalLayout layout = new VerticalLayout();
+        final Label info = new Label("To test URI and Parameter Handlers, " + "add get parameters to URL. For example try examples below: ");
         info.setCaption("Usage info");
         layout.addComponent(info);
         try {
             final URL u1 = new URL(getURL(), "test/uri?test=1&test=2");
             final URL u2 = new URL(getURL(), "foo/bar?mary=john&count=3");
-            layout.addComponent(new Link(u1.toString(),
-                    new ExternalResource(u1)));
+            layout.addComponent(new Link(u1.toString(), new ExternalResource(u1)));
             layout.addComponent(new Label("Or this: "));
-            layout.addComponent(new Link(u2.toString(),
-                    new ExternalResource(u2)));
+            layout.addComponent(new Link(u2.toString(), new ExternalResource(u2)));
         } catch (final Exception e) {
-            System.out.println("Couldn't get hostname for this machine: "
-                    + e.toString());
+            System.out.println("Couldn't get hostname for this machine: " + e.toString());
             e.printStackTrace();
         }
 
@@ -76,7 +71,7 @@ public class Parameters extends com.vaadin.Application implements URIHandler,
         params.addContainerProperty("Value", String.class, "");
         final Panel panel2 = new Panel("Parameter Handler");
         params.setSizeFull();
-        panel2.setLayout(new ExpandLayout());
+        panel2.setLayout(new VerticalLayout());
         panel2.getLayout().setMargin(true);
 
         params.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_ID);
@@ -84,7 +79,7 @@ public class Parameters extends com.vaadin.Application implements URIHandler,
         layout.addComponent(panel2);
 
         // expand parameter panel and its table
-        layout.expand(panel2);
+        layout.setExpandRatio(panel2, 1);
 
         layout.setMargin(true);
         layout.setSpacing(true);
@@ -110,8 +105,7 @@ public class Parameters extends com.vaadin.Application implements URIHandler,
      */
     public void handleParameters(Map<String, String[]> parameters) {
         params.removeAllItems();
-        for (final Iterator<String> i = parameters.keySet().iterator(); i
-                .hasNext();) {
+        for (final Iterator<String> i = parameters.keySet().iterator(); i.hasNext();) {
             final String name = i.next();
             final String[] values = parameters.get(name);
             String v = "";
index d61979df174ac87c8bc6d16aa41bb4c9e789fe25..ef83ac5afbf3a3bf8ce768efa549d11a1ff3d3c3 100644 (file)
@@ -13,16 +13,16 @@ import com.vaadin.ui.ComboBox;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 
 public class PerformanceTestBasicComponentRendering extends CustomComponent {
 
-    private final OrderedLayout main;
+    private final VerticalLayout main;
 
-    private final OrderedLayout testContainer;
+    private final VerticalLayout testContainer;
 
     private Date startTime;
 
@@ -34,22 +34,20 @@ public class PerformanceTestBasicComponentRendering extends CustomComponent {
 
     public PerformanceTestBasicComponentRendering() {
 
-        main = new OrderedLayout();
+        main = new VerticalLayout();
         setCompositionRoot(main);
         addInfo();
 
         result = new Label();
         main.addComponent(result);
 
-        testContainer = new OrderedLayout();
+        testContainer = new VerticalLayout();
 
-        final Table t = TestForTablesInitialColumnWidthLogicRendering
-                .getTestTable(5, 200);
+        final Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 200);
 
         Table t2 = new Table("Test Table with 199 rows rendered initially") {
             @Override
-            public void changeVariables(Object source,
-                    Map<String, Object> variables) {
+            public void changeVariables(Object source, Map<String, Object> variables) {
                 super.changeVariables(source, variables);
                 // end timing on cache row request
                 endTest();
index f5dcc43d5ebb9e59bbe529caaa58cc7a187ba07a..f258dc8a6eb0bec432679f49f1f0d53aede768f2 100644 (file)
@@ -6,17 +6,18 @@ package com.vaadin.tests;
 
 import java.util.Date;
 
+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.CustomComponent;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent {
-    private final OrderedLayout main;
+    private final AbstractOrderedLayout main;
 
-    private final OrderedLayout testContainer;
+    private final AbstractOrderedLayout testContainer;
 
     private Date startTime;
 
@@ -27,30 +28,27 @@ public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent {
     private static final int INITIAL_COMPONENTS = 1000;
 
     public PerformanceTestLabelsAndOrderedLayouts() {
-        main = new OrderedLayout();
+        main = new VerticalLayout();
         setCompositionRoot(main);
         addInfo();
 
         result = new Label();
         main.addComponent(result);
 
-        main.addComponent(new Button("click when rendered",
-                new ClickListener() {
+        main.addComponent(new Button("click when rendered", new ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        endTest();
-                    }
-                }));
+            public void buttonClick(ClickEvent event) {
+                endTest();
+            }
+        }));
 
-        main.addComponent(new Button(
-                "Click for layout repaint (cached components)",
-                new ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        testContainer.requestRepaint();
-                    }
-                }));
+        main.addComponent(new Button("Click for layout repaint (cached components)", new ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                testContainer.requestRepaint();
+            }
+        }));
 
-        testContainer = new OrderedLayout();
+        testContainer = new VerticalLayout();
 
         for (int i = 0; i < INITIAL_COMPONENTS; i++) {
             Label l = new Label("foo" + i);
index 8d39562101edef1e1e2f11814704b530e0e5677e..3b7aa683fa911db4b2392469349b5e4ef06f4d6d 100644 (file)
@@ -9,30 +9,25 @@ import java.util.Date;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 
 public class PerformanceTestSubTreeCaching extends CustomComponent {
 
-    private final OrderedLayout main;
+    private final VerticalLayout main;
 
-    private final OrderedLayout testContainer;
+    private final VerticalLayout testContainer;
 
     private Date startTime;
 
     private final Label result;
 
-    private static final String DESCRIPTION = "Hypothesis: Toolkit 4 has major architechtural problem when adding "
-            + "small incrementall updates to a container which has either a lot or "
-            + "some very slow components in it. Toolkit 5 has 'subtree caching' and a"
-            + " small amount of logic in containers, so CommunicationManager can assure"
-            + " that client do not need information about unchanged components it contains."
-            + " Completing test ought to be much faster with Toolkit 5.";
+    private static final String DESCRIPTION = "Hypothesis: Toolkit 4 has major architechtural problem when adding " + "small incrementall updates to a container which has either a lot or " + "some very slow components in it. Toolkit 5 has 'subtree caching' and a" + " small amount of logic in containers, so CommunicationManager can assure" + " that client do not need information about unchanged components it contains." + " Completing test ought to be much faster with Toolkit 5.";
 
     private static final int INITIAL_COMPONENTS = 40;
 
     public PerformanceTestSubTreeCaching() {
-        main = new OrderedLayout();
+        main = new VerticalLayout();
         setCompositionRoot(main);
         addInfo();
 
@@ -46,7 +41,7 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
         result = new Label();
         main.addComponent(result);
 
-        testContainer = new OrderedLayout();
+        testContainer = new VerticalLayout();
         populateContainer(testContainer, INITIAL_COMPONENTS);
         main.addComponent(testContainer);
     }
@@ -67,11 +62,10 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
      * 
      * @param testContainer2
      */
-    private void populateContainer(OrderedLayout container, int n) {
+    private void populateContainer(VerticalLayout container, int n) {
         for (int i = 0; i < n; i++) {
             // array_type array_element = [i];
-            final Table t = TestForTablesInitialColumnWidthLogicRendering
-                    .getTestTable(5, 100);
+            final Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 100);
             container.addComponent(t);
         }
     }
index 327e34418ef8806c8eae205b7ae22d488a95f939..6596afa3fe03bec6bb9c136b89fc1d08e431f1f2 100644 (file)
@@ -12,14 +12,15 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.CustomLayout;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
 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;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -51,20 +52,16 @@ public class RandomLayoutStress extends com.vaadin.Application {
         setMainWindow(mainWindow);
 
         // Create horizontal ordered layout
-        final Panel panelA = new Panel(
-                "Panel containing horizontal ordered layout");
-        OrderedLayout layoutA = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        final Panel panelA = new Panel("Panel containing horizontal ordered layout");
+        HorizontalLayout layoutA = new HorizontalLayout();
         // Add 4 random components
         fillLayout(layoutA, componentCountA);
         // Add layout to panel
         panelA.addComponent(layoutA);
 
         // Create vertical ordered layout
-        final Panel panelB = new Panel(
-                "Panel containing vertical ordered layout");
-        OrderedLayout layoutB = new OrderedLayout(
-                OrderedLayout.ORIENTATION_VERTICAL);
+        final Panel panelB = new Panel("Panel containing vertical ordered layout");
+        VerticalLayout layoutB = new VerticalLayout();
         // Add 4 random components
         fillLayout(layoutB, componentCountB);
         // Add layout to panel
@@ -72,8 +69,7 @@ public class RandomLayoutStress extends com.vaadin.Application {
 
         // Create grid layout
         final int gridSize = (int) java.lang.Math.sqrt(componentCountC);
-        final Panel panelG = new Panel("Panel containing grid layout ("
-                + gridSize + " x " + gridSize + ")");
+        final Panel panelG = new Panel("Panel containing grid layout (" + gridSize + " x " + gridSize + ")");
         GridLayout layoutG = new GridLayout(gridSize, gridSize);
         // Add 12 random components
         fillLayout(layoutG, componentCountC);
@@ -83,11 +79,11 @@ public class RandomLayoutStress extends com.vaadin.Application {
         // Create TabSheet
         final TabSheet tabsheet = new TabSheet();
         tabsheet.setCaption("Tabsheet, above layouts are added to this component");
-        layoutA = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
+        layoutA = new HorizontalLayout();
         // Add 4 random components
         fillLayout(layoutA, componentCountA);
         tabsheet.addTab(layoutA, "Horizontal ordered layout", null);
-        layoutB = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
+        layoutB = new VerticalLayout();
         // Add 4 random components
         fillLayout(layoutB, componentCountB);
         tabsheet.addTab(layoutB, "Vertical ordered layout", null);
@@ -148,12 +144,7 @@ public class RandomLayoutStress extends com.vaadin.Application {
             // 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:
index d7b8cdd8bf39ee345b350447a4d1f34e0365e5c8..54cf7a6d99a161faac40ab7f9df111f542919a9c 100644 (file)
@@ -51,8 +51,7 @@ public class ScrollbarStressTest extends Application {
         context.addItem("Accordion");
         context.setValue("Main window");
 
-        final OptionGroup testComponent = new OptionGroup(
-                "TestComponent 100%x100%");
+        final OptionGroup testComponent = new OptionGroup("TestComponent 100%x100%");
         testComponent.addItem("Label");
         testComponent.addItem("Table");
         testComponent.setValue("Label");
@@ -223,8 +222,7 @@ public class ScrollbarStressTest extends Application {
 
     private Component getTestComponent() {
         if (getTable) {
-            Table testTable = TestForTablesInitialColumnWidthLogicRendering
-                    .getTestTable(4, 50);
+            Table testTable = TestForTablesInitialColumnWidthLogicRendering.getTestTable(4, 50);
             testTable.setSizeFull();
             return testTable;
         } else {
index 4722475fd8688998976cb8f9a31502332b823336..54dd0a5bf33c19260249e7f125e60dd09ec2d943 100644 (file)
@@ -10,13 +10,13 @@ import java.util.Vector;
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.CustomComponent;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Table;\r
+import com.vaadin.ui.VerticalLayout;\r
 \r
 public class StressComponentsInTable extends CustomComponent {\r
 \r
     public StressComponentsInTable() {\r
-        final OrderedLayout main = new OrderedLayout();\r
+        final VerticalLayout main = new VerticalLayout();\r
         setCompositionRoot(main);\r
 \r
         main.addComponent(getTestTable(4, 1000));\r
@@ -39,8 +39,7 @@ public class StressComponentsInTable extends CustomComponent {
 \r
                 public void buttonClick(ClickEvent event) {\r
                     Button b = event.getButton();\r
-                    System.out.println(b.getCaption() + " click: "\r
-                            + (new Date()).toGMTString());\r
+                    System.out.println(b.getCaption() + " click: " + (new Date()).toGMTString());\r
                     System.out.println(b.getApplication());\r
 \r
                 }\r
@@ -51,22 +50,7 @@ public class StressComponentsInTable extends CustomComponent {
         return t;\r
     }\r
 \r
-    static String[] testString = new String[] { "Jacob", "Michael", "Joshua",\r
-            "Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher",\r
-            "Joseph", "William", "Alexander", "Ryan", "David", "Nicholas",\r
-            "Tyler", "James", "John", "Jonathan", "Nathan", "Samuel",\r
-            "Christian", "Noah", "Dylan", "Benjamin", "Logan", "Brandon",\r
-            "Gabriel", "Zachary", "Jose", "Elijah", "Angel", "Kevin", "Jack",\r
-            "Caleb", "Justin", "Austin", "Evan", "Robert", "Thomas", "Luke",\r
-            "Mason", "Aidan", "Jackson", "Isaiah", "Jordan", "Gavin", "Connor",\r
-            "Aiden", "Isaac", "Jason", "Cameron", "Hunter", "Jayden", "Juan",\r
-            "Charles", "Aaron", "Lucas", "Luis", "Owen", "Landon", "Diego",\r
-            "Brian", "Adam", "Adrian", "Kyle", "Eric", "Ian", "Nathaniel",\r
-            "Carlos", "Alex", "Bryan", "Jesus", "Julian", "Sean", "Carter",\r
-            "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase",\r
-            "Steven", "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden",\r
-            "Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin",\r
-            "Cody", "Alejandro", "Caden", "Blake", "Carson" };\r
+    static String[] testString = new String[] { "Jacob", "Michael", "Joshua", "Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher", "Joseph", "William", "Alexander", "Ryan", "David", "Nicholas", "Tyler", "James", "John", "Jonathan", "Nathan", "Samuel", "Christian", "Noah", "Dylan", "Benjamin", "Logan", "Brandon", "Gabriel", "Zachary", "Jose", "Elijah", "Angel", "Kevin", "Jack", "Caleb", "Justin", "Austin", "Evan", "Robert", "Thomas", "Luke", "Mason", "Aidan", "Jackson", "Isaiah", "Jordan", "Gavin", "Connor", "Aiden", "Isaac", "Jason", "Cameron", "Hunter", "Jayden", "Juan", "Charles", "Aaron", "Lucas", "Luis", "Owen", "Landon", "Diego", "Brian", "Adam", "Adrian", "Kyle", "Eric", "Ian", "Nathaniel", "Carlos", "Alex", "Bryan", "Jesus", "Julian", "Sean", "Carter", "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase", "Steven", "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden", "Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin", "Cody", "Alejandro", "Caden", "Blake", "Carson" };\r
 \r
     public static String rndString() {\r
         return testString[(int) (Math.random() * testString.length)];\r
index 722fd48d018ccdb05af0f09680286eba63703b95..991db5a2ed566c48388ded3009c78ad85035f162 100644 (file)
@@ -9,34 +9,28 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.CustomComponent;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Table;\r
+import com.vaadin.ui.VerticalLayout;\r
 \r
-public class TableChangingDatasource extends CustomComponent implements\r
-        ClickListener {\r
+public class TableChangingDatasource extends CustomComponent implements ClickListener {\r
     Table t;\r
     Table[] ta = new Table[4];\r
     private int mode = 0;\r
 \r
     public TableChangingDatasource() {\r
-        final OrderedLayout main = new OrderedLayout();\r
+        final VerticalLayout main = new VerticalLayout();\r
 \r
-        main.addComponent(new Label(\r
-                "Table should look sane after data source changes"));\r
+        main.addComponent(new Label("Table should look sane after data source changes"));\r
 \r
         t = new Table();\r
 \r
         t.setWidth(500);\r
         t.setHeight(300);\r
 \r
-        ta[0] = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(3, 0);\r
-        ta[1] = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(3, 7);\r
-        ta[2] = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(3, 5);\r
-        ta[3] = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(3, 1);\r
+        ta[0] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3, 0);\r
+        ta[1] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3, 7);\r
+        ta[2] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3, 5);\r
+        ta[3] = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3, 1);\r
 \r
         main.addComponent(t);\r
         main.addComponent(new Button("switch DS", this));\r
index 69363bd0bc5e14a28c31733c3cdb5b329b5f63a5..0ab962c4a929f0c14519b18ea6414ce86f6f1772 100644 (file)
@@ -7,14 +7,13 @@ package com.vaadin.tests;
 import com.vaadin.data.Property.ValueChangeEvent;\r
 import com.vaadin.ui.CustomComponent;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Table;\r
+import com.vaadin.ui.VerticalLayout;\r
 \r
-public class TableSelectTest extends CustomComponent implements\r
-        Table.ValueChangeListener {\r
+public class TableSelectTest extends CustomComponent implements Table.ValueChangeListener {\r
 \r
     public TableSelectTest() {\r
-        final OrderedLayout main = new OrderedLayout();\r
+        final VerticalLayout main = new VerticalLayout();\r
         setCompositionRoot(main);\r
         main.addComponent(new Label("Hello World!"));\r
 \r
index 985c06e7746644771d2a72b8647871aa4c5dd7b1..e3eb59291647e0a672fef1aa44aeeb135cc61998 100644 (file)
@@ -39,13 +39,10 @@ import com.vaadin.ui.Window;
  * @author IT Mill Ltd.
  * 
  */
-public class TestBench extends com.vaadin.Application implements
-        Property.ValueChangeListener {
+public class TestBench extends com.vaadin.Application implements Property.ValueChangeListener {
 
     // Add here packages which are used for finding testable classes
-    String[] testablePackages = { "com.vaadin.tests", "com.vaadin.demo",
-            "com.vaadin.demo.colorpicker", "com.vaadin.demo.features",
-            "com.vaadin.tests.tickets", "com.vaadin.tests.book" };
+    String[] testablePackages = { "com.vaadin.tests", "com.vaadin.demo", "com.vaadin.demo.colorpicker", "com.vaadin.demo.features", "com.vaadin.tests.tickets" };
 
     HierarchicalContainer testables = new HierarchicalContainer();
 
@@ -69,8 +66,7 @@ public class TestBench extends com.vaadin.Application implements
             testables.addItem(testablePackages[p]);
             try {
                 final List<Class<?>> testableClasses = getTestableClassesForPackage(testablePackages[p]);
-                for (final Iterator<Class<?>> it = testableClasses.iterator(); it
-                        .hasNext();) {
+                for (final Iterator<Class<?>> it = testableClasses.iterator(); it.hasNext();) {
                     final Class<?> t = it.next();
                     // ignore TestBench itself
                     if (t.equals(TestBench.class)) {
@@ -101,12 +97,10 @@ public class TestBench extends com.vaadin.Application implements
 
         menu = new Tree("Testables", testables);
 
-        for (final Iterator<Class<?>> i = itemCaptions.keySet().iterator(); i
-                .hasNext();) {
+        for (final Iterator<Class<?>> i = itemCaptions.keySet().iterator(); i.hasNext();) {
             final Class<?> testable = i.next();
             // simplify captions
-            final String name = testable.getName().substring(
-                    testable.getName().lastIndexOf('.') + 1);
+            final String name = testable.getName().substring(testable.getName().lastIndexOf('.') + 1);
             menu.setItemCaption(testable, name);
         }
         // expand all root items
@@ -180,8 +174,7 @@ public class TestBench extends com.vaadin.Application implements
                         if (next instanceof Class) {
                             Class<?> c = (Class<?>) next;
                             String string = c.getSimpleName();
-                            if (string.toLowerCase().contains(
-                                    fragment.toLowerCase())) {
+                            if (string.toLowerCase().contains(fragment.toLowerCase())) {
                                 menu.setValue(c);
                                 mainLayout.setSplitPosition(0);
                                 return;
@@ -189,8 +182,7 @@ public class TestBench extends com.vaadin.Application implements
                         }
                     }
 
-                    getMainWindow().showNotification(
-                            "No potential matc for #" + fragment);
+                    getMainWindow().showNotification("No potential matc for #" + fragment);
 
                 }
 
@@ -227,12 +219,9 @@ public class TestBench extends com.vaadin.Application implements
             } catch (final Exception e1) {
                 e1.printStackTrace();
                 VerticalLayout lo = new VerticalLayout();
-                lo.addComponent(new Label(
-                        "Cannot create application / custom component: "
-                                + e1.toString()));
+                lo.addComponent(new Label("Cannot create application / custom component: " + e1.toString()));
 
-                Link l = new Link("Try opening via app runner",
-                        new ExternalResource("../run/" + c.getName()));
+                Link l = new Link("Try opening via app runner", new ExternalResource("../run/" + c.getName()));
                 lo.addComponent(l);
 
                 return lo;
@@ -264,12 +253,10 @@ public class TestBench extends com.vaadin.Application implements
      * @return
      * @throws ClassNotFoundException
      */
-    public static List<Class<?>> getTestableClassesForPackage(String packageName)
-            throws Exception {
+    public static List<Class<?>> getTestableClassesForPackage(String packageName) throws Exception {
         final ArrayList<File> directories = new ArrayList<File>();
         try {
-            final ClassLoader cld = Thread.currentThread()
-                    .getContextClassLoader();
+            final ClassLoader cld = Thread.currentThread().getContextClassLoader();
             if (cld == null) {
                 throw new ClassNotFoundException("Can't get class loader.");
             }
@@ -281,8 +268,7 @@ public class TestBench extends com.vaadin.Application implements
                 directories.add(new File(url.getFile()));
             }
         } catch (final Exception x) {
-            throw new Exception(packageName
-                    + " does not appear to be a valid package.");
+            throw new Exception(packageName + " does not appear to be a valid package.");
         }
 
         final ArrayList<Class<?>> classes = new ArrayList<Class<?>>();
@@ -296,15 +282,12 @@ public class TestBench extends com.vaadin.Application implements
                     // we are only interested in .class files
                     if (files[j].endsWith(".class")) {
                         // removes the .class extension
-                        final String p = packageName + '.'
-                                + files[j].substring(0, files[j].length() - 6);
+                        final String p = packageName + '.' + files[j].substring(0, files[j].length() - 6);
                         final Class<?> c = Class.forName(p);
                         if (c.getSuperclass() != null) {
-                            if ((c.getSuperclass()
-                                    .equals(com.vaadin.Application.class))) {
+                            if ((c.getSuperclass().equals(com.vaadin.Application.class))) {
                                 classes.add(c);
-                            } else if ((c.getSuperclass()
-                                    .equals(com.vaadin.ui.CustomComponent.class))) {
+                            } else if ((c.getSuperclass().equals(com.vaadin.ui.CustomComponent.class))) {
                                 classes.add(c);
                             }
                         }
@@ -319,9 +302,7 @@ public class TestBench extends com.vaadin.Application implements
                     }
                 }
             } else {
-                throw new ClassNotFoundException(packageName + " ("
-                        + directory.getPath()
-                        + ") does not appear to be a valid package");
+                throw new ClassNotFoundException(packageName + " (" + directory.getPath() + ") does not appear to be a valid package");
             }
         }
 
index f63c14889214b082ed7529862b86d6dd63d4c497..fdbe1f6d97dbd5dac4a29cbbe0e3f04720408c12 100644 (file)
@@ -40,8 +40,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
     VerticalLayout main = new VerticalLayout();
 
     final String eventListenerString = "Component.Listener feedback: ";
-    Label eventListenerFeedback = new Label(eventListenerString
-            + " <no events occured>");
+    Label eventListenerFeedback = new Label(eventListenerString + " <no events occured>");
     int count = 0;
 
     public TestCaptionWrapper() {
@@ -57,10 +56,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
     public void createNewView() {
         main.removeAllComponents();
 
-        main.addComponent(new Label(
-                "Each Layout and their contained components should "
-                        + "have icon, caption, description, user error defined. "
-                        + "Eeach layout should contain similar components."));
+        main.addComponent(new Label("Each Layout and their contained components should " + "have icon, caption, description, user error defined. " + "Eeach layout should contain similar components."));
 
         main.addComponent(eventListenerFeedback);
 
@@ -79,10 +75,8 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
         final VerticalLayout tab2 = new VerticalLayout();
         test(tab2);
         populateLayout(tab2);
-        tabsheet.addTab(tab1, "TabSheet tab1", new ClassResource("m.gif",
-                getApplication()));
-        tabsheet.addTab(tab2, "TabSheet tab2", new ClassResource("m.gif",
-                getApplication()));
+        tabsheet.addTab(tab1, "TabSheet tab1", new ClassResource("m.gif", getApplication()));
+        tabsheet.addTab(tab2, "TabSheet tab2", new ClassResource("m.gif", getApplication()));
 
         final VerticalLayout expandLayout = new VerticalLayout();
         test(expandLayout);
@@ -119,16 +113,13 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
         final Label label = new Label("Label " + count++);
         test(layout, label);
 
-        final Link link = new Link("Link " + count++, new ExternalResource(
-                "www.vaadin.com"));
+        final Link link = new Link("Link " + count++, new ExternalResource("www.vaadin.com"));
         test(layout, link);
 
-        final NativeSelect nativeSelect = new NativeSelect("NativeSelect "
-                + count++);
+        final NativeSelect nativeSelect = new NativeSelect("NativeSelect " + count++);
         test(layout, nativeSelect);
 
-        final OptionGroup optionGroup = new OptionGroup("OptionGroup "
-                + count++);
+        final OptionGroup optionGroup = new OptionGroup("OptionGroup " + count++);
         test(layout, optionGroup);
 
         final ProgressIndicator pi = new ProgressIndicator();
@@ -152,16 +143,14 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
         final Tree tree = new Tree("Tree " + count++);
         test(layout, tree);
 
-        final TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect "
-                + count++);
+        final TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect " + count++);
         test(layout, twinColSelect);
 
         final Upload upload = new Upload("Upload (non-functional)", null);
         test(layout, upload);
 
         // Custom components
-        layout.addComponent(new Label("<B>Below are few custom components</B>",
-                Label.CONTENT_XHTML));
+        layout.addComponent(new Label("<B>Below are few custom components</B>", Label.CONTENT_XHTML));
         final TestForUpload tfu = new TestForUpload();
         layout.addComponent(tfu);
 
@@ -195,8 +184,7 @@ public class TestCaptionWrapper extends CustomComponent implements Listener {
     }
 
     public void componentEvent(Event event) {
-        final String feedback = eventListenerString + " source="
-                + event.getSource() + ", toString()=" + event.toString();
+        final String feedback = eventListenerString + " source=" + event.getSource() + ", toString()=" + event.toString();
         System.out.println("eventListenerFeedback: " + feedback);
         eventListenerFeedback.setValue(feedback);
     }
index a63575e177fa9c82574b70daf5eaa8e2cc1787a3..473c0b5674897fbe790ff88368247c0f232d653a 100644 (file)
@@ -10,6 +10,7 @@ import com.vaadin.ui.GridLayout;
 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
 \r
 /**\r
@@ -25,7 +26,7 @@ public class TestComponentAddAndRecursion extends CustomComponent {
 \r
     public TestComponentAddAndRecursion() {\r
 \r
-        OrderedLayout main = new OrderedLayout();\r
+        VerticalLayout main = new VerticalLayout();\r
         setCompositionRoot(main);\r
 \r
         l = new Label("A");\r
@@ -91,12 +92,9 @@ public class TestComponentAddAndRecursion extends CustomComponent {
             public void buttonClick(ClickEvent event) {\r
                 try {\r
                     p3.addComponent(p2);\r
-                    getWindow().showNotification("ERROR",\r
-                            "This should have failed",\r
-                            Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("ERROR", "This should have failed", Window.Notification.TYPE_ERROR_MESSAGE);\r
                 } catch (Exception e) {\r
-                    getWindow().showNotification("OK", "threw, as expected",\r
-                            Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("OK", "threw, as expected", Window.Notification.TYPE_ERROR_MESSAGE);\r
                 }\r
             }\r
 \r
@@ -109,12 +107,9 @@ public class TestComponentAddAndRecursion extends CustomComponent {
                 p.addComponent(p2);\r
                 try {\r
                     p3.addComponent(p);\r
-                    getWindow().showNotification("ERROR",\r
-                            "This should have failed",\r
-                            Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("ERROR", "This should have failed", Window.Notification.TYPE_ERROR_MESSAGE);\r
                 } catch (Exception e) {\r
-                    getWindow().showNotification("OK", "threw, as expected",\r
-                            Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("OK", "threw, as expected", Window.Notification.TYPE_ERROR_MESSAGE);\r
                 }\r
             }\r
 \r
index 86ff9649d35ccae9750734bc13aaf4c76ee3b634..44ce5be1bf2bbdf7aa4476dfcb2a620f5eab5d98 100644 (file)
@@ -12,12 +12,13 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.ComboBox;\r
 import com.vaadin.ui.CustomComponent;\r
+import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Label;\r
 import com.vaadin.ui.ListSelect;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.Table;\r
 import com.vaadin.ui.Tree;\r
+import com.vaadin.ui.VerticalLayout;\r
 \r
 /**\r
  * @author marc\r
@@ -36,18 +37,16 @@ public class TestContainerChanges extends CustomComponent {
         cont.addContainerProperty("Asd", String.class, "qwe");\r
         cont.addContainerProperty("Bar", String.class, "foo");\r
 \r
-        OrderedLayout main = new OrderedLayout();\r
+        VerticalLayout main = new VerticalLayout();\r
         setCompositionRoot(main);\r
 \r
-        main.addComponent(new Label(\r
-                "The same IndexedContainer is wrapped in a ordered/hierarchical wrapper and is set as data source for all components . The buttons only affect the 'original' IndexedContainer."));\r
+        main.addComponent(new Label("The same IndexedContainer is wrapped in a ordered/hierarchical wrapper and is set as data source for all components . The buttons only affect the 'original' IndexedContainer."));\r
 \r
-        OrderedLayout h = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout h = new HorizontalLayout();\r
 \r
         main.addComponent(h);\r
 \r
-        OrderedLayout v = new OrderedLayout();\r
+        VerticalLayout v = new VerticalLayout();\r
         h.addComponent(v);\r
         tbl = new Table();\r
         tbl.setHeight(200);\r
@@ -70,8 +69,7 @@ public class TestContainerChanges extends CustomComponent {
         tbl2.setImmediate(true);\r
         tbl2.addListener(new Table.ValueChangeListener() {\r
             public void valueChange(ValueChangeEvent event) {\r
-                System.err.println("Value now "\r
-                        + event.getProperty().getValue());\r
+                System.err.println("Value now " + event.getProperty().getValue());\r
 \r
             }\r
         });\r
@@ -79,7 +77,7 @@ public class TestContainerChanges extends CustomComponent {
         // non-ordered container will get wrapped\r
         tbl2.setContainerDataSource(hierarchical);\r
 \r
-        OrderedLayout buttons = new OrderedLayout();\r
+        VerticalLayout buttons = new VerticalLayout();\r
         v.addComponent(buttons);\r
 \r
         Button b = new Button("table.commit()", new Button.ClickListener() {\r
@@ -91,43 +89,38 @@ public class TestContainerChanges extends CustomComponent {
         });\r
         buttons.addComponent(b);\r
 \r
-        b = new Button("indexedcontainer.addItem()",\r
-                new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.addItem()", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        cont.addItem(new Integer(cnt++));\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                cont.addItem(new Integer(cnt++));\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
-        b = new Button("indexedcontainer.addItem(null)",\r
-                new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.addItem(null)", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        cont.addItem(null);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                cont.addItem(null);\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
-        b = new Button("indexedcontainer.removeItem(table.lastItemId()",\r
-                new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.removeItem(table.lastItemId()", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        cont.removeItem(tbl.lastItemId());\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                cont.removeItem(tbl.lastItemId());\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
 \r
-        b = new Button("indexedcontainer.addContainerProperty()",\r
-                new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.addContainerProperty()", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        cont.addContainerProperty("prop" + cnt, String.class,\r
-                                "#" + cnt++);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                cont.addContainerProperty("prop" + cnt, String.class, "#" + cnt++);\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
 \r
         b = new Button("indexedcontainer.clear()", new Button.ClickListener() {\r
@@ -138,32 +131,29 @@ public class TestContainerChanges extends CustomComponent {
 \r
         });\r
         buttons.addComponent(b);\r
-        b = new Button("table.setContainerDataSource(indexedcontainer)",\r
-                new Button.ClickListener() {\r
+        b = new Button("table.setContainerDataSource(indexedcontainer)", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        tbl.setContainerDataSource(cont);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                tbl.setContainerDataSource(cont);\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
-        b = new Button("table.setContainerDataSource(orderedwrapper)",\r
-                new Button.ClickListener() {\r
+        b = new Button("table.setContainerDataSource(orderedwrapper)", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        tbl.setContainerDataSource(ordered);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                tbl.setContainerDataSource(ordered);\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
-        b = new Button("table.setContainerDataSource(hierarchicalwrapper)",\r
-                new Button.ClickListener() {\r
+        b = new Button("table.setContainerDataSource(hierarchicalwrapper)", new Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        tbl.setContainerDataSource(hierarchical);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                tbl.setContainerDataSource(hierarchical);\r
+            }\r
 \r
-                });\r
+        });\r
         buttons.addComponent(b);\r
 \r
         Panel p = new Panel("Tree");\r
index f84b37fe6da8ebfef4e357e5ed8d6a62dd312316..2cbe6982de4c45f12804199eb074104e1c8e29ca 100644 (file)
@@ -12,7 +12,7 @@ import com.vaadin.terminal.UserError;
 import com.vaadin.ui.CustomComponent;\r
 import com.vaadin.ui.DateField;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.VerticalLayout;\r
 \r
 /**\r
  * \r
@@ -20,7 +20,7 @@ import com.vaadin.ui.OrderedLayout;
  */\r
 public class TestDateField extends CustomComponent {\r
 \r
-    OrderedLayout main = new OrderedLayout();\r
+    VerticalLayout main = new VerticalLayout();\r
 \r
     DateField df;\r
 \r
@@ -65,8 +65,7 @@ public class TestDateField extends CustomComponent {
 \r
     @Override\r
     public void attach() {\r
-        final ClassResource res = new ClassResource("m.gif",\r
-                super.getApplication());\r
+        final ClassResource res = new ClassResource("m.gif", super.getApplication());\r
         df.setIcon(res);\r
         super.attach();\r
     }\r
index d8c7c0d59ca570d15cc7404132339da91e22b29a..8315169cb9523cfd3349376c4ba2123dda906b14 100644 (file)
@@ -7,14 +7,16 @@ package com.vaadin.tests;
 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;
 
 public class TestForAlignments extends CustomComponent {
 
     public TestForAlignments() {
 
-        final OrderedLayout main = new OrderedLayout();
+        final VerticalLayout main = new VerticalLayout();
 
         final Button b1 = new Button("Right");
         final Button b2 = new Button("Left");
@@ -25,36 +27,26 @@ public class TestForAlignments extends CustomComponent {
         final DateField d1 = new DateField("Center aligned");
         final DateField d2 = new DateField("Center aligned");
 
-        final OrderedLayout vert = new OrderedLayout();
+        final VerticalLayout vert = new VerticalLayout();
         vert.addComponent(b1);
         vert.addComponent(b2);
         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);
-        final OrderedLayout hori = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        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);
+        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, 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);
 
         main.addComponent(vert);
         main.addComponent(hori);
index 6de6d3c046f83ab2e74ec1155ab69cf99dcd272c..49f989e972b9e003cb4891e2caaf9d47c524bb4f 100644 (file)
@@ -5,18 +5,17 @@
 package com.vaadin.tests;
 
 import com.vaadin.Application;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
-public class TestForApplicationLayoutThatUsesWholeBrosersSpace extends
-        Application {
+public class TestForApplicationLayoutThatUsesWholeBrosersSpace extends Application {
 
     Window main = new Window("Windowing test");
 
-    ExpandLayout rootLayout;
+    VerticalLayout rootLayout;
 
     SplitPanel firstLevelSplit;
 
@@ -24,38 +23,36 @@ public class TestForApplicationLayoutThatUsesWholeBrosersSpace extends
     public void init() {
         setMainWindow(main);
 
-        rootLayout = new ExpandLayout();
+        rootLayout = new VerticalLayout();
         main.setLayout(rootLayout);
 
         rootLayout.addComponent(new Label("header"));
 
         firstLevelSplit = new SplitPanel();
 
-        final SplitPanel secondSplitPanel = new SplitPanel(
-                SplitPanel.ORIENTATION_HORIZONTAL);
+        final SplitPanel secondSplitPanel = new SplitPanel(SplitPanel.ORIENTATION_HORIZONTAL);
         secondSplitPanel.setFirstComponent(new Label("left"));
 
-        final ExpandLayout topRight = new ExpandLayout();
+        final VerticalLayout topRight = new VerticalLayout();
         topRight.addComponent(new Label("topright header"));
 
-        final Table t = TestForTablesInitialColumnWidthLogicRendering
-                .getTestTable(4, 100);
+        final Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(4, 100);
         t.setSizeFull();
         topRight.addComponent(t);
-        topRight.expand(t);
+        topRight.setExpandRatio(t, 1);
 
         topRight.addComponent(new Label("topright footer"));
 
         secondSplitPanel.setSecondComponent(topRight);
 
-        final ExpandLayout el = new ExpandLayout();
+        final VerticalLayout el = new VerticalLayout();
         el.addComponent(new Label("B��"));
 
         firstLevelSplit.setFirstComponent(secondSplitPanel);
         firstLevelSplit.setSecondComponent(el);
 
         rootLayout.addComponent(firstLevelSplit);
-        rootLayout.expand(firstLevelSplit);
+        rootLayout.setExpandRatio(firstLevelSplit, 1);
 
         rootLayout.addComponent(new Label("footer"));
 
index 22f2c0d998602599ad92601e2748ae3415aa0b3a..ae4f641857627684be4e142e2b12f699dcfbac40 100644 (file)
@@ -11,13 +11,12 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.CustomComponent;\r
 import com.vaadin.ui.DateField;\r
-import com.vaadin.ui.ExpandLayout;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.SplitPanel;\r
 import com.vaadin.ui.TabSheet;\r
 import com.vaadin.ui.Table;\r
+import com.vaadin.ui.VerticalLayout;\r
 \r
 public class TestForBasicApplicationLayout extends CustomComponent {\r
 \r
@@ -55,9 +54,8 @@ public class TestForBasicApplicationLayout extends CustomComponent {
         tab = new TabSheet();\r
         tab.setSizeFull();\r
 \r
-        final Panel report = new Panel("Monthly Program Runs",\r
-                new ExpandLayout());\r
-        final OrderedLayout controls = new OrderedLayout();\r
+        final Panel report = new Panel("Monthly Program Runs", new VerticalLayout());\r
+        final VerticalLayout controls = new VerticalLayout();\r
         controls.setMargin(true);\r
         controls.addComponent(new Label("Report tab"));\r
         controls.addComponent(click);\r
@@ -67,14 +65,13 @@ public class TestForBasicApplicationLayout extends CustomComponent {
         cal.setResolution(DateField.RESOLUTION_DAY);\r
         cal.setLocale(new Locale("en", "US"));\r
         report.addComponent(cal);\r
-        ((ExpandLayout) report.getLayout()).expand(controls);\r
+        ((VerticalLayout) report.getContent()).setExpandRatio(controls, 1);\r
         report.addStyleName(Panel.STYLE_LIGHT);\r
         report.setHeight(100, SplitPanel.UNITS_PERCENTAGE);\r
 \r
         sp2.setFirstComponent(report);\r
 \r
-        final Table table = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(5, 200);\r
+        final Table table = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 200);\r
         table.setPageLength(15);\r
         table.setSelectable(true);\r
         table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\r
index 5ca134c1bff92788d2bb42429ec32409e8c2033d..f57872fdef4d6543b031e760fbe9f9f8629a9a6c 100644 (file)
@@ -13,8 +13,8 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Link;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 /**
  * 
@@ -25,11 +25,11 @@ import com.vaadin.ui.Select;
  */
 public class TestForChildComponentRendering extends CustomComponent {
 
-    private final OrderedLayout main;
+    private final VerticalLayout main;
 
     public TestForChildComponentRendering() {
 
-        main = new OrderedLayout();
+        main = new VerticalLayout();
         setCompositionRoot(main);
         createNewView();
     }
@@ -57,8 +57,7 @@ public class TestForChildComponentRendering extends CustomComponent {
         b = new Button("reorder view", this, "randomReorder");
         main.addComponent(b);
 
-        b = new Button("remove randomly one component", this,
-                "removeRandomComponent");
+        b = new Button("remove randomly one component", this, "removeRandomComponent");
         main.addComponent(b);
 
     }
@@ -70,7 +69,7 @@ public class TestForChildComponentRendering extends CustomComponent {
             components.add(it.next());
         }
 
-        final OrderedLayout v = main;
+        final VerticalLayout v = main;
         v.removeAllComponents();
 
         for (int i = components.size(); i > 0; i--) {
index 51b144d4b16bb9a9056c49f40ee127f4eb9bbef6..f521ba63bf6fa578963437a86108dfbb4809ddaf 100644 (file)
@@ -13,14 +13,14 @@ import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 
 public class TestForContainerFilterable extends CustomComponent {
 
-    OrderedLayout lo = new OrderedLayout();
+    VerticalLayout lo = new VerticalLayout();
     IndexedContainer ic = new IndexedContainer();
     Table t = new Table();
-    private static String parts[] = { "Neo", "Sa", "rem", "the", "adi", "za",
-            "tre", "day", "Ca", "re", "cen", "ter", "mi", "nal" };
+    private static String parts[] = { "Neo", "Sa", "rem", "the", "adi", "za", "tre", "day", "Ca", "re", "cen", "ter", "mi", "nal" };
     TextField fooFilter = new TextField("foo-filter");
     TextField barFilter = new TextField("bar-filter");
     Button filterButton = new Button("Filter");
@@ -39,17 +39,14 @@ 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 OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL));
         filterPanel.setWidth(100, Panel.UNITS_PERCENTAGE);
         lo.addComponent(filterPanel);
         filterPanel.addComponent(fooFilter);
         filterPanel.addComponent(barFilter);
         filterPanel.addComponent(filterButton);
-        fooFilter
-                .setDescription("Filters foo column in case-sensitive contains manner.");
-        barFilter
-                .setDescription("Filters bar column in case-insensitive prefix manner.");
+        fooFilter.setDescription("Filters foo column in case-sensitive contains manner.");
+        barFilter.setDescription("Filters bar column in case-insensitive prefix manner.");
         filterPanel.addComponent(count);
 
         // Table
@@ -63,24 +60,21 @@ public class TestForContainerFilterable extends CustomComponent {
             public void buttonClick(ClickEvent event) {
                 ic.removeAllContainerFilters();
                 if (fooFilter.toString().length() > 0) {
-                    ic.addContainerFilter("foo", fooFilter.toString(), false,
-                            false);
+                    ic.addContainerFilter("foo", fooFilter.toString(), false, false);
                 }
                 if (barFilter.toString().length() > 0) {
-                    ic.addContainerFilter("bar", barFilter.toString(), true,
-                            true);
+                    ic.addContainerFilter("bar", barFilter.toString(), true, true);
                 }
                 count.setValue("Rows in table: " + ic.size());
             }
         });
 
         // Resetbutton
-        lo.addComponent(new Button("Rebind table datasource",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        t.setContainerDataSource(ic);
-                    }
-                }));
+        lo.addComponent(new Button("Rebind table datasource", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                t.setContainerDataSource(ic);
+            }
+        }));
     }
 
     private String randomWord() {
index 5c121dd3d3dda8bd885169abd0d0b442e8dc3e4a..081fe23b8bea7b414809b1caa2bdd41f62361116 100644 (file)
@@ -58,8 +58,7 @@ public class TestForGridLayoutChildComponentRendering extends CustomComponent {
         b = new Button("reorder view", this, "randomReorder");
         main.addComponent(b);
 
-        b = new Button("remove randomly one component", this,
-                "removeRandomComponent");
+        b = new Button("remove randomly one component", this, "removeRandomComponent");
         main.addComponent(b);
 
     }
@@ -79,8 +78,7 @@ public class TestForGridLayoutChildComponentRendering extends CustomComponent {
         for (int i = components.size(); i > 0; i--) {
             final int index = (int) (Math.random() * i);
             if (i == colspanIndex) {
-                main.addComponent(components.get(index), 0, (size - i) / 2, 1,
-                        (size - i) / 2);
+                main.addComponent(components.get(index), 0, (size - i) / 2, 1, (size - i) / 2);
             } else {
                 main.addComponent(components.get(index));
             }
index 6156c84bba7287ae976cc0d0d32968cfafdf2d6f..b0962953f109286b84f37fbc9bbef488ce0866e1 100644 (file)
@@ -13,8 +13,8 @@ import com.vaadin.data.Property.ValueChangeListener;
 import com.vaadin.data.util.IndexedContainer;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TwinColSelect;
+import com.vaadin.ui.VerticalLayout;
 
 /**
  * TODO: Note you need to add Theme under WebContent/VAADIN/Themes/mytheme in
@@ -23,10 +23,9 @@ import com.vaadin.ui.TwinColSelect;
  * 
  * @author IT Mill Ltd.
  */
-public class TestForMultipleStyleNames extends CustomComponent implements
-        ValueChangeListener {
+public class TestForMultipleStyleNames extends CustomComponent implements ValueChangeListener {
 
-    private final OrderedLayout main = new OrderedLayout();
+    private final VerticalLayout main = new VerticalLayout();
 
     private Label l;
 
@@ -41,13 +40,8 @@ public class TestForMultipleStyleNames extends CustomComponent implements
 
     public void createNewView() {
         main.removeAllComponents();
-        main.addComponent(new Label(
-                "TK5 supports multiple stylenames for components."));
-        main.addComponent(new Label("Note you need to add Theme under"
-                + " WebContent/VAADIN/Themes/mytheme"
-                + " in order to see actual visible results"
-                + " on the browser. Currently changes are"
-                + " visible only by inspecting DOM."));
+        main.addComponent(new Label("TK5 supports multiple stylenames for components."));
+        main.addComponent(new Label("Note you need to add Theme under" + " WebContent/VAADIN/Themes/mytheme" + " in order to see actual visible results" + " on the browser. Currently changes are" + " visible only by inspecting DOM."));
 
         styleNames2 = new ArrayList<String>();
 
@@ -87,8 +81,7 @@ public class TestForMultipleStyleNames extends CustomComponent implements
                 l.addStyleName(styleName);
             }
         }
-        for (final Iterator<String> iterator2 = curStyles.iterator(); iterator2
-                .hasNext();) {
+        for (final Iterator<String> iterator2 = curStyles.iterator(); iterator2.hasNext();) {
             final String object = iterator2.next();
             l.removeStyleName(object);
         }
index 9728214163802914f8a46330427b37a55ef69438..12670a931a56f6b4f8f09d83f95775a2657fa42d 100644 (file)
@@ -22,76 +22,41 @@ public class TestForNativeWindowing extends Application {
 
         setMainWindow(main);
 
-        main.addComponent(new Button("Add new subwindow",
-                new Button.ClickListener() {
+        main.addComponent(new Button("Add new subwindow", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                final Window w = new Window("sw " + System.currentTimeMillis());
+                main.addWindow(w);
+                w.setPositionX(100);
+                w.setPositionY(100);
+                w.setWidth(200);
+                w.setHeight(200);
+
+                w.setWidth(100);
+                w.setHeight(400);
+
+                final Button closebutton = new Button("Close " + w.getCaption(), new Button.ClickListener() {
                     public void buttonClick(ClickEvent event) {
-                        final Window w = new Window("sw "
-                                + System.currentTimeMillis());
-                        main.addWindow(w);
-                        w.setPositionX(100);
-                        w.setPositionY(100);
-                        w.setWidth(200);
-                        w.setHeight(200);
-
-                        w.setWidth(100);
-                        w.setHeight(400);
-
-                        final Button closebutton = new Button("Close "
-                                + w.getCaption(), new Button.ClickListener() {
-                            public void buttonClick(ClickEvent event) {
-                                main.removeWindow(w);
-                            }
-
-                        });
-                        w.addComponent(closebutton);
-
-                        w.addComponent(new Label(
-                                "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>"
-                                        + "<p>Lorem ipsum dolor sit amet.</p>",
-                                Label.CONTENT_XHTML));
-
+                        main.removeWindow(w);
                     }
-                }));
 
-        main.addComponent(new Button(
-                "Open a currently uncreated application level window",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        try {
-                            main.open(
-                                    new com.vaadin.terminal.ExternalResource(
-                                            new URL(
-                                                    getURL(),
-                                                    "mainwin-"
-                                                            + System.currentTimeMillis()
-                                                            + "/")), null);
-                        } catch (final MalformedURLException e) {
-                        }
-                    }
-                }));
+                });
+                w.addComponent(closebutton);
+
+                w.addComponent(new Label("<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>" + "<p>Lorem ipsum dolor sit amet.</p>", Label.CONTENT_XHTML));
+
+            }
+        }));
+
+        main.addComponent(new Button("Open a currently uncreated application level window", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                try {
+                    main.open(new com.vaadin.terminal.ExternalResource(new URL(getURL(), "mainwin-" + System.currentTimeMillis() + "/")), null);
+                } catch (final MalformedURLException e) {
+                }
+            }
+        }));
 
-        main.addComponent(new Button(
-                "Commit (saves window state: size, place, scrollpos)"));
+        main.addComponent(new Button("Commit (saves window state: size, place, scrollpos)"));
     }
 
     @Override
@@ -106,15 +71,12 @@ public class TestForNativeWindowing extends Application {
             final String postfix = name.substring("mainwin-".length());
             final Window ww = new Window("Window: " + postfix);
             ww.setName(name);
-            ww.addComponent(new Label(
-                    "This is a application-level window opened with name: "
-                            + name));
+            ww.addComponent(new Label("This is a application-level window opened with name: " + name));
             ww.addComponent(new Button("Click me", new Button.ClickListener() {
                 int state = 0;
 
                 public void buttonClick(ClickEvent event) {
-                    ww.addComponent(new Label("Button clicked " + (++state)
-                            + " times"));
+                    ww.addComponent(new Label("Button clicked " + (++state) + " times"));
                 }
             }));
             addWindow(ww);
index bfc9ef0abf277a69b248402bb3b86aace65a0e8d..edc2ca3105ca72ca68c05142211af27f7114beed 100644 (file)
@@ -13,6 +13,7 @@ import com.vaadin.ui.Button.ClickListener;
 import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.NativeSelect;
 import com.vaadin.ui.OptionGroup;
@@ -20,24 +21,20 @@ import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.TwinColSelect;
+import com.vaadin.ui.VerticalLayout;
 
 /**
  * @author IT Mill Ltd.
  */
-public class TestForPreconfiguredComponents extends CustomComponent implements
-        Handler {
+public class TestForPreconfiguredComponents extends CustomComponent implements Handler {
 
-    private static final String[] firstnames = new String[] { "John", "Mary",
-            "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
+    private static final String[] firstnames = new String[] { "John", "Mary", "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
 
-    private static final String[] lastnames = new String[] { "Torvalds",
-            "Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding",
-            "Einstein" };
+    private static final String[] lastnames = new String[] { "Torvalds", "Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding", "Einstein" };
 
-    private final OrderedLayout main = new OrderedLayout();
+    private final VerticalLayout main = new VerticalLayout();
 
-    private final Action[] actions = new Action[] { new Action("edit"),
-            new Action("delete") };
+    private final Action[] actions = new Action[] { new Action("edit"), new Action("delete") };
 
     private Panel al;
 
@@ -51,12 +48,7 @@ public class TestForPreconfiguredComponents extends CustomComponent implements
 
     public void createNewView() {
         main.removeAllComponents();
-        main.addComponent(new Label(
-                "In Toolkit 5 we introduce new components. Previously we"
-                        + " usually used setStyle or some other methods on possibly "
-                        + "multiple steps to configure component for ones needs. These new "
-                        + "server side components are mostly just classes that in constructor "
-                        + "set base class to state that programmer wants."));
+        main.addComponent(new Label("In Toolkit 5 we introduce new components. Previously we" + " usually used setStyle or some other methods on possibly " + "multiple steps to configure component for ones needs. These new " + "server side components are mostly just classes that in constructor " + "set base class to state that programmer wants."));
 
         main.addComponent(new Button("commit"));
 
@@ -96,9 +88,7 @@ public class TestForPreconfiguredComponents extends CustomComponent implements
 
     public static void fillSelect(AbstractSelect s, int items) {
         for (int i = 0; i < items; i++) {
-            final String name = firstnames[(int) (Math.random() * (firstnames.length - 1))]
-                    + " "
-                    + lastnames[(int) (Math.random() * (lastnames.length - 1))];
+            final String name = firstnames[(int) (Math.random() * (firstnames.length - 1))] + " " + lastnames[(int) (Math.random() * (lastnames.length - 1))];
             s.addItem(name);
         }
     }
@@ -107,9 +97,7 @@ public class TestForPreconfiguredComponents extends CustomComponent implements
         Tree t = new Tree("Tree");
         final String[] names = new String[100];
         for (int i = 0; i < names.length; i++) {
-            names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))]
-                    + " "
-                    + lastnames[(int) (Math.random() * (lastnames.length - 1))];
+            names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))] + " " + lastnames[(int) (Math.random() * (lastnames.length - 1))];
         }
 
         // Create tree
@@ -137,8 +125,7 @@ public class TestForPreconfiguredComponents extends CustomComponent implements
 
         ol.addComponent(t);
 
-        final OrderedLayout ol2 = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        final HorizontalLayout ol2 = new HorizontalLayout();
         final Panel status = new Panel("Events");
         final Button clear = new Button("clear event log");
         clear.addListener(new ClickListener() {
@@ -160,8 +147,7 @@ public class TestForPreconfiguredComponents extends CustomComponent implements
         t.addListener(new Listener() {
             public void componentEvent(Event event) {
                 status.addComponent(new Label(event.getClass().getName()));
-                status.addComponent(new Label("selected: "
-                        + event.getSource().toString()));
+                status.addComponent(new Label("selected: " + event.getSource().toString()));
             }
         });
 
index 4e9dfba2b40c546490295040e9e6319033b541fb..615b8852d7588e015c2f52e9e961990ca33261f5 100644 (file)
@@ -10,17 +10,16 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.RichTextArea;
+import com.vaadin.ui.VerticalLayout;
 
 /**
  * 
  * @author IT Mill Ltd.
  */
-public class TestForRichTextEditor extends CustomComponent implements
-        ValueChangeListener {
+public class TestForRichTextEditor extends CustomComponent implements ValueChangeListener {
 
-    private final OrderedLayout main = new OrderedLayout();
+    private final VerticalLayout main = new VerticalLayout();
 
     private Label l;
 
@@ -34,8 +33,7 @@ public class TestForRichTextEditor extends CustomComponent implements
 
     public void createNewView() {
         main.removeAllComponents();
-        main.addComponent(new Label(
-                "RTE uses google richtextArea and their examples toolbar."));
+        main.addComponent(new Label("RTE uses google richtextArea and their examples toolbar."));
 
         rte = new RichTextArea();
         rte.addListener(this);
index 6a6ae130e5daef75374356b06dd7db65d6e9d8f5..539d03259a315ed8a242135e213d572340add9c3 100644 (file)
@@ -35,9 +35,7 @@ import com.vaadin.ui.Upload.SucceededListener;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
-public class TestForStyledUpload extends Application implements
-        Upload.FinishedListener, FailedListener, SucceededListener,
-        StartedListener {
+public class TestForStyledUpload extends Application implements Upload.FinishedListener, FailedListener, SucceededListener, StartedListener {
 
     Layout main = new VerticalLayout();
 
@@ -56,8 +54,7 @@ public class TestForStyledUpload extends Application implements
     private final Label memoryStatus;
 
     public TestForStyledUpload() {
-        main.addComponent(new Label(
-                "Clicking on button b updates information about upload components status or same with garbage collector."));
+        main.addComponent(new Label("Clicking on button b updates information about upload components status or same with garbage collector."));
 
         up = new Upload(null, buffer);
         up.setButtonCaption("Select file");
@@ -74,8 +71,7 @@ public class TestForStyledUpload extends Application implements
 
                 refreshMemUsage();
 
-                transferred.setValue("Transferred " + readBytes + " of "
-                        + contentLenght);
+                transferred.setValue("Transferred " + readBytes + " of " + contentLenght);
             }
 
         });
@@ -135,8 +131,7 @@ public class TestForStyledUpload extends Application implements
             sb.append("/");
             sb.append(up.getUploadSize());
             sb.append(" ");
-            sb.append(Math.round(100 * up.getBytesRead()
-                    / (double) up.getUploadSize()));
+            sb.append(Math.round(100 * up.getBytesRead() / (double) up.getUploadSize()));
             sb.append("%");
         } else {
             sb.append("Idle");
@@ -149,25 +144,19 @@ public class TestForStyledUpload extends Application implements
         status.removeAllComponents();
         final InputStream stream = buffer.getStream();
         if (stream == null) {
-            status.addComponent(new Label(
-                    "Upload finished, but output buffer is null!!"));
+            status.addComponent(new Label("Upload finished, but output buffer is null!!"));
         } else {
-            status.addComponent(new Label(
-                    "<b>Name:</b> " + event.getFilename(), Label.CONTENT_XHTML));
-            status.addComponent(new Label("<b>Mimetype:</b> "
-                    + event.getMIMEType(), Label.CONTENT_XHTML));
-            status.addComponent(new Label("<b>Size:</b> " + event.getLength()
-                    + " bytes.", Label.CONTENT_XHTML));
+            status.addComponent(new Label("<b>Name:</b> " + event.getFilename(), Label.CONTENT_XHTML));
+            status.addComponent(new Label("<b>Mimetype:</b> " + event.getMIMEType(), Label.CONTENT_XHTML));
+            status.addComponent(new Label("<b>Size:</b> " + event.getLength() + " bytes.", Label.CONTENT_XHTML));
 
-            status.addComponent(new Link("Download " + buffer.getFileName(),
-                    new StreamResource(buffer, buffer.getFileName(), this)));
+            status.addComponent(new Link("Download " + buffer.getFileName(), new StreamResource(buffer, buffer.getFileName(), this)));
 
             status.setVisible(true);
         }
     }
 
-    public interface Buffer extends StreamResource.StreamSource,
-            Upload.Receiver {
+    public interface Buffer extends StreamResource.StreamSource, Upload.Receiver {
 
         String getFileName();
     }
@@ -182,8 +171,7 @@ public class TestForStyledUpload extends Application implements
         private FileInputStream stream;
 
         public TmpFileBuffer() {
-            final String tempFileName = "upload_tmpfile_"
-                    + System.currentTimeMillis();
+            final String tempFileName = "upload_tmpfile_" + System.currentTimeMillis();
             try {
                 file = File.createTempFile(tempFileName, null);
             } catch (final IOException e) {
index 938bf431150769b39d81210689b2a656e7836d9e..2e35538da0945986432010110467e30eb7bd3ef3 100644 (file)
@@ -7,8 +7,7 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
 
-public class TestForTabSheet extends CustomComponent implements
-        Button.ClickListener, TabSheet.SelectedTabChangeListener {
+public class TestForTabSheet extends CustomComponent implements Button.ClickListener, TabSheet.SelectedTabChangeListener {
     TabSheet tabsheet = new TabSheet();
     Button tab1_root = new Button("Push this button");
     Label tab2_root = new Label("Contents of Second Tab");
@@ -33,8 +32,7 @@ public class TestForTabSheet extends CustomComponent implements
     }
 
     public void buttonClick(ClickEvent event) {
-        System.out.println("tab2=" + tab2_root.isEnabled() + " tab3="
-                + tab3_root.isEnabled());
+        System.out.println("tab2=" + tab2_root.isEnabled() + " tab3=" + tab3_root.isEnabled());
         tab2_root.setEnabled(true);
         tab3_root.setEnabled(true);
     }
index 870feeb0bd96b4540a2927df4d7caae151f2171b..77c931a9ea313959276fe03ac07e8a1bef0968a4 100644 (file)
@@ -13,8 +13,8 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 
 /**
  * 
@@ -23,10 +23,9 @@ import com.vaadin.ui.Table;
  * 
  * @author IT Mill Ltd.
  */
-public class TestForTablesInitialColumnWidthLogicRendering extends
-        CustomComponent {
+public class TestForTablesInitialColumnWidthLogicRendering extends CustomComponent {
 
-    private final OrderedLayout main = new OrderedLayout();
+    private final VerticalLayout main = new VerticalLayout();
 
     public TestForTablesInitialColumnWidthLogicRendering() {
 
@@ -36,12 +35,11 @@ public class TestForTablesInitialColumnWidthLogicRendering extends
 
     public void createNewView() {
         main.removeAllComponents();
-        main.addComponent(new Label(
-                "Below are same tables that all should render somewhat nice. Also when testing, you might want to try resizing window."));
+        main.addComponent(new Label("Below are same tables that all should render somewhat nice. Also when testing, you might want to try resizing window."));
 
         Table t;
 
-        Layout lo = new OrderedLayout();
+        Layout lo = new VerticalLayout();
         lo.setWidth("600px");
         lo.setHeight("250px");
 
@@ -134,22 +132,7 @@ public class TestForTablesInitialColumnWidthLogicRendering extends
         return t;
     }
 
-    static String[] testString = new String[] { "Jacob", "Michael", "Joshua",
-            "Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher",
-            "Joseph", "William", "Alexander", "Ryan", "David", "Nicholas",
-            "Tyler", "James", "John", "Jonathan", "Nathan", "Samuel",
-            "Christian", "Noah", "Dylan", "Benjamin", "Logan", "Brandon",
-            "Gabriel", "Zachary", "Jose", "Elijah", "Angel", "Kevin", "Jack",
-            "Caleb", "Justin", "Austin", "Evan", "Robert", "Thomas", "Luke",
-            "Mason", "Aidan", "Jackson", "Isaiah", "Jordan", "Gavin", "Connor",
-            "Aiden", "Isaac", "Jason", "Cameron", "Hunter", "Jayden", "Juan",
-            "Charles", "Aaron", "Lucas", "Luis", "Owen", "Landon", "Diego",
-            "Brian", "Adam", "Adrian", "Kyle", "Eric", "Ian", "Nathaniel",
-            "Carlos", "Alex", "Bryan", "Jesus", "Julian", "Sean", "Carter",
-            "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase",
-            "Steven", "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden",
-            "Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin",
-            "Cody", "Alejandro", "Caden", "Blake", "Carson" };
+    static String[] testString = new String[] { "Jacob", "Michael", "Joshua", "Matthew", "Ethan", "Andrew", "Daniel", "Anthony", "Christopher", "Joseph", "William", "Alexander", "Ryan", "David", "Nicholas", "Tyler", "James", "John", "Jonathan", "Nathan", "Samuel", "Christian", "Noah", "Dylan", "Benjamin", "Logan", "Brandon", "Gabriel", "Zachary", "Jose", "Elijah", "Angel", "Kevin", "Jack", "Caleb", "Justin", "Austin", "Evan", "Robert", "Thomas", "Luke", "Mason", "Aidan", "Jackson", "Isaiah", "Jordan", "Gavin", "Connor", "Aiden", "Isaac", "Jason", "Cameron", "Hunter", "Jayden", "Juan", "Charles", "Aaron", "Lucas", "Luis", "Owen", "Landon", "Diego", "Brian", "Adam", "Adrian", "Kyle", "Eric", "Ian", "Nathaniel", "Carlos", "Alex", "Bryan", "Jesus", "Julian", "Sean", "Carter", "Hayden", "Jeremiah", "Cole", "Brayden", "Wyatt", "Chase", "Steven", "Timothy", "Dominic", "Sebastian", "Xavier", "Jaden", "Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin", "Cody", "Alejandro", "Caden", "Blake", "Carson" };
 
     public static String rndString() {
         return testString[(int) (Math.random() * testString.length)];
index 93579c8ae7ad469aecece2755945033cfe6ce6b4..f1ec2eba121dea7f3d94a2210d4b72281dba0d20 100644 (file)
@@ -11,10 +11,12 @@ 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.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;
 
 /**
  * Some test cases for trees. Events panel logs events that happen server side.
@@ -23,17 +25,13 @@ import com.vaadin.ui.Tree;
  */
 public class TestForTrees extends CustomComponent implements Handler {
 
-    private static final String[] firstnames = new String[] { "John", "Mary",
-            "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
+    private static final String[] firstnames = new String[] { "John", "Mary", "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
 
-    private static final String[] lastnames = new String[] { "Torvalds",
-            "Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding",
-            "Einstein" };
+    private static final String[] lastnames = new String[] { "Torvalds", "Smith", "Jones", "Beck", "Sheridan", "Picard", "Hill", "Fielding", "Einstein" };
 
-    private final OrderedLayout main = new OrderedLayout();
+    private final VerticalLayout main = new VerticalLayout();
 
-    private final Action[] actions = new Action[] { new Action("edit"),
-            new Action("delete") };
+    private final Action[] actions = new Action[] { new Action("edit"), new Action("delete") };
 
     private Panel al;
 
@@ -47,8 +45,7 @@ public class TestForTrees extends CustomComponent implements Handler {
 
     public void createNewView() {
         main.removeAllComponents();
-        main.addComponent(new Label(
-                "Some test cases for trees. Events panel logs events that happen server side."));
+        main.addComponent(new Label("Some test cases for trees. Events panel logs events that happen server side."));
 
         main.addComponent(new Button("commit"));
 
@@ -93,9 +90,7 @@ public class TestForTrees extends CustomComponent implements Handler {
         Tree t = new Tree("Tree");
         final String[] names = new String[100];
         for (int i = 0; i < names.length; i++) {
-            names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))]
-                    + " "
-                    + lastnames[(int) (Math.random() * (lastnames.length - 1))];
+            names[i] = firstnames[(int) (Math.random() * (firstnames.length - 1))] + " " + lastnames[(int) (Math.random() * (lastnames.length - 1))];
         }
 
         // Create tree
@@ -118,8 +113,7 @@ public class TestForTrees extends CustomComponent implements Handler {
     }
 
     public Component createTestBench(Tree t) {
-        final OrderedLayout ol = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        final HorizontalLayout ol = new HorizontalLayout();
 
         ol.addComponent(t);
 
@@ -141,8 +135,7 @@ public class TestForTrees extends CustomComponent implements Handler {
         t.addListener(new Listener() {
             public void componentEvent(Event event) {
                 status.addComponent(new Label(event.getClass().getName()));
-                status.addComponent(new Label("selected: "
-                        + event.getSource().toString()));
+                status.addComponent(new Label("selected: " + event.getSource().toString()));
             }
         });
 
index e80a3f45813d0ad636edb32670c4d268c2a451d6..0cd1988e4f91cba1623dfc3dbe976b7321599dbc 100644 (file)
@@ -36,8 +36,7 @@ import com.vaadin.ui.Upload.StartedEvent;
 import com.vaadin.ui.Upload.StartedListener;
 import com.vaadin.ui.VerticalLayout;
 
-public class TestForUpload extends CustomComponent implements
-        Upload.ProgressListener {
+public class TestForUpload extends CustomComponent implements Upload.ProgressListener {
 
     private static final long serialVersionUID = -3400119871764256575L;
 
@@ -64,25 +63,15 @@ public class TestForUpload extends CustomComponent implements
 
     private CheckBox beSluggish = new CheckBox("Be sluggish");
 
-    private CheckBox throwExecption = new CheckBox(
-            "Throw exception in receiver");
+    private CheckBox throwExecption = new CheckBox("Throw exception in receiver");
 
     private Button interrupt = new Button("Interrupt upload");
 
     public TestForUpload() {
         setCompositionRoot(main);
-        main.addComponent(new Label(
-                "This is a simple test for upload application. "
-                        + "Upload should work with big files and concurrent "
-                        + "requests should not be blocked. Button 'b' reads "
-                        + "current state into label below it. Memory receiver "
-                        + "streams upload contents into memory. You may track"
-                        + "consumption."
-                        + "tempfile receiver writes upload to file and "
-                        + "should have low memory consumption."));
-
-        main.addComponent(new Label(
-                "Clicking on button b updates information about upload components status or same with garbage collector."));
+        main.addComponent(new Label("This is a simple test for upload application. " + "Upload should work with big files and concurrent " + "requests should not be blocked. Button 'b' reads " + "current state into label below it. Memory receiver " + "streams upload contents into memory. You may track" + "consumption." + "tempfile receiver writes upload to file and " + "should have low memory consumption."));
+
+        main.addComponent(new Label("Clicking on button b updates information about upload components status or same with garbage collector."));
 
         textField = new TextField("Test field");
         textFieldValue = new Label();
@@ -107,9 +96,7 @@ public class TestForUpload extends CustomComponent implements
                 pi.setVisible(true);
                 pi2.setVisible(true);
                 l.setValue("Started uploading file " + event.getFilename());
-                textFieldValue
-                        .setValue(" TestFields value at the upload start is:"
-                                + textField.getValue());
+                textFieldValue.setValue(" TestFields value at the upload start is:" + textField.getValue());
             }
         });
 
@@ -121,8 +108,7 @@ public class TestForUpload extends CustomComponent implements
                 pi2.setVisible(false);
                 if (event instanceof Upload.FailedEvent) {
                     Exception reason = ((Upload.FailedEvent) event).getReason();
-                    l.setValue("Finished with failure ( " + reason
-                            + "  ), idle");
+                    l.setValue("Finished with failure ( " + reason + "  ), idle");
                 } else if (event instanceof Upload.SucceededEvent) {
                     l.setValue("Finished with succes, idle");
                 } else {
@@ -132,20 +118,13 @@ public class TestForUpload extends CustomComponent implements
                 status.removeAllComponents();
                 final InputStream stream = buffer.getStream();
                 if (stream == null) {
-                    status.addComponent(new Label(
-                            "Upload finished, but output buffer is null"));
+                    status.addComponent(new Label("Upload finished, but output buffer is null"));
                 } else {
-                    status.addComponent(new Label("<b>Name:</b> "
-                            + event.getFilename(), Label.CONTENT_XHTML));
-                    status.addComponent(new Label("<b>Mimetype:</b> "
-                            + event.getMIMEType(), Label.CONTENT_XHTML));
-                    status.addComponent(new Label("<b>Size:</b> "
-                            + event.getLength() + " bytes.",
-                            Label.CONTENT_XHTML));
-
-                    status.addComponent(new Link("Download "
-                            + buffer.getFileName(), new StreamResource(buffer,
-                            buffer.getFileName(), getApplication())));
+                    status.addComponent(new Label("<b>Name:</b> " + event.getFilename(), Label.CONTENT_XHTML));
+                    status.addComponent(new Label("<b>Mimetype:</b> " + event.getMIMEType(), Label.CONTENT_XHTML));
+                    status.addComponent(new Label("<b>Size:</b> " + event.getLength() + " bytes.", Label.CONTENT_XHTML));
+
+                    status.addComponent(new Link("Download " + buffer.getFileName(), new StreamResource(buffer, buffer.getFileName(), getApplication())));
 
                     status.setVisible(true);
                 }
@@ -184,12 +163,11 @@ public class TestForUpload extends CustomComponent implements
         uploadBufferSelector.addItem("memory");
         uploadBufferSelector.setValue("memory");
         uploadBufferSelector.addItem("tempfile");
-        uploadBufferSelector
-                .addListener(new AbstractField.ValueChangeListener() {
-                    public void valueChange(ValueChangeEvent event) {
-                        setBuffer();
-                    }
-                });
+        uploadBufferSelector.addListener(new AbstractField.ValueChangeListener() {
+            public void valueChange(ValueChangeEvent event) {
+                setBuffer();
+            }
+        });
         main.addComponent(uploadBufferSelector);
 
         main.addComponent(up);
@@ -244,8 +222,7 @@ public class TestForUpload extends CustomComponent implements
             sb.append("/");
             sb.append(up.getUploadSize());
             sb.append(" ");
-            sb.append(Math.round(100 * up.getBytesRead()
-                    / (double) up.getUploadSize()));
+            sb.append(Math.round(100 * up.getBytesRead() / (double) up.getUploadSize()));
             sb.append("%");
         } else {
             sb.append("Idle");
@@ -254,8 +231,7 @@ public class TestForUpload extends CustomComponent implements
         refreshMemUsage();
     }
 
-    public interface Buffer extends StreamResource.StreamSource,
-            Upload.Receiver {
+    public interface Buffer extends StreamResource.StreamSource, Upload.Receiver {
 
         String getFileName();
     }
@@ -324,8 +300,7 @@ public class TestForUpload extends CustomComponent implements
         private File file;
 
         public TmpFileBuffer() {
-            final String tempFileName = "upload_tmpfile_"
-                    + System.currentTimeMillis();
+            final String tempFileName = "upload_tmpfile_" + System.currentTimeMillis();
             try {
                 file = File.createTempFile(tempFileName, null);
             } catch (final IOException e) {
@@ -358,8 +333,7 @@ public class TestForUpload extends CustomComponent implements
                 return new FileOutputStream(file) {
 
                     @Override
-                    public void write(byte[] b, int off, int len)
-                            throws IOException {
+                    public void write(byte[] b, int off, int len) throws IOException {
                         beSluggish();
                         throwExecption();
                         super.write(b, off, len);
index 41af299bf3ada3cbe9377f26929ae8713b2fa80b..884cceb627eaaee2ffc3c1945d4643f7222c2dd0 100644 (file)
@@ -8,51 +8,44 @@ import com.vaadin.terminal.ExternalResource;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class TestForWindowOpen extends CustomComponent {
 
     public TestForWindowOpen() {
 
-        final OrderedLayout main = new OrderedLayout();
+        final VerticalLayout main = new VerticalLayout();
         setCompositionRoot(main);
 
-        main.addComponent(new Button("Open in this window",
-                new Button.ClickListener() {
+        main.addComponent(new Button("Open in this window", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        final ExternalResource r = new ExternalResource(
-                                "http://www.google.com");
-                        getApplication().getMainWindow().open(r);
+            public void buttonClick(ClickEvent event) {
+                final ExternalResource r = new ExternalResource("http://www.google.com");
+                getApplication().getMainWindow().open(r);
 
-                    }
+            }
 
-                }));
+        }));
 
-        main.addComponent(new Button("Open in target \"mytarget\"",
-                new Button.ClickListener() {
+        main.addComponent(new Button("Open in target \"mytarget\"", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        final ExternalResource r = new ExternalResource(
-                                "http://www.google.com");
-                        getApplication().getMainWindow().open(r, "mytarget");
+            public void buttonClick(ClickEvent event) {
+                final ExternalResource r = new ExternalResource("http://www.google.com");
+                getApplication().getMainWindow().open(r, "mytarget");
 
-                    }
+            }
 
-                }));
+        }));
 
-        main.addComponent(new Button("Open in target \"secondtarget\"",
-                new Button.ClickListener() {
+        main.addComponent(new Button("Open in target \"secondtarget\"", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        final ExternalResource r = new ExternalResource(
-                                "http://www.google.com");
-                        getApplication().getMainWindow()
-                                .open(r, "secondtarget");
+            public void buttonClick(ClickEvent event) {
+                final ExternalResource r = new ExternalResource("http://www.google.com");
+                getApplication().getMainWindow().open(r, "secondtarget");
 
-                    }
+            }
 
-                }));
+        }));
 
     }
 
index c2dac3d5295d07cd01ac8ce86fbe64cfd566c521..439c3d38992947da273a577d6de2fa5c5525a209 100644 (file)
@@ -14,9 +14,9 @@ import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.Slider;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class TestForWindowing extends CustomComponent {
@@ -25,71 +25,68 @@ public class TestForWindowing extends CustomComponent {
 
     public TestForWindowing() {
 
-        final OrderedLayout main = new OrderedLayout();
+        final VerticalLayout main = new VerticalLayout();
 
-        main.addComponent(new Label(
-                "Click the button to create a new inline window."));
+        main.addComponent(new Label("Click the button to create a new inline window."));
 
         final CheckBox asModal = new CheckBox("As modal");
         main.addComponent(asModal);
 
-        final Button create = new Button("Create a new window",
-                new ClickListener() {
+        final Button create = new Button("Create a new window", new ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        Window w = new Window("Testing Window");
+            public void buttonClick(ClickEvent event) {
+                Window w = new Window("Testing Window");
 
-                        if (((Boolean) asModal.getValue()).booleanValue()) {
-                            w.setModal(true);
-                        }
+                if (((Boolean) asModal.getValue()).booleanValue()) {
+                    w.setModal(true);
+                }
+
+                AbstractSelect s1 = new OptionGroup();
+                s1.setCaption("1. Select output format");
+                s1.addItem("Excel sheet");
+                s1.addItem("CSV plain text");
+                s1.setValue("Excel sheet");
+                s1.setImmediate(true);
+
+                s2 = new Select();
+                s2.addItem("Separate by comma (,)");
+                s2.addItem("Separate by colon (:)");
+                s2.addItem("Separate by semicolon (;)");
+                s2.setEnabled(false);
 
-                        AbstractSelect s1 = new OptionGroup();
-                        s1.setCaption("1. Select output format");
-                        s1.addItem("Excel sheet");
-                        s1.addItem("CSV plain text");
-                        s1.setValue("Excel sheet");
-                        s1.setImmediate(true);
-
-                        s2 = new Select();
-                        s2.addItem("Separate by comma (,)");
-                        s2.addItem("Separate by colon (:)");
-                        s2.addItem("Separate by semicolon (;)");
-                        s2.setEnabled(false);
-
-                        s1.addListener(new ValueChangeListener() {
-
-                            public void valueChange(ValueChangeEvent event) {
-                                String v = (String) event.getProperty()
-                                        .getValue();
-                                if (v.equals("CSV plain text")) {
-                                    s2.setEnabled(true);
-                                } else {
-                                    s2.setEnabled(false);
-                                }
-                            }
-
-                        });
-
-                        w.addComponent(s1);
-                        w.addComponent(s2);
-
-                        Slider s = new Slider();
-                        s.setCaption("Volume");
-                        s.setMax(13);
-                        s.setMin(12);
-                        s.setResolution(2);
-                        s.setImmediate(true);
-                        // s.setOrientation(Slider.ORIENTATION_VERTICAL);
-                        // s.setArrows(false);
-
-                        w.addComponent(s);
-
-                        getApplication().getMainWindow().addWindow(w);
+                s1.addListener(new ValueChangeListener() {
 
+                    public void valueChange(ValueChangeEvent event) {
+                        String v = (String) event.getProperty().getValue();
+                        if (v.equals("CSV plain text")) {
+                            s2.setEnabled(true);
+                        } else {
+                            s2.setEnabled(false);
+                        }
                     }
 
                 });
 
+                w.addComponent(s1);
+                w.addComponent(s2);
+
+                Slider s = new Slider();
+                s.setCaption("Volume");
+                s.setMax(13);
+                s.setMin(12);
+                s.setResolution(2);
+                s.setImmediate(true);
+                // s.setOrientation(Slider.ORIENTATION_VERTICAL);
+                // s.setArrows(false);
+
+                w.addComponent(s);
+
+                getApplication().getMainWindow().addWindow(w);
+
+            }
+
+        });
+
         main.addComponent(create);
 
         setCompositionRoot(main);
index b955a023f79272d44f34dfa6d0e40ec641e5610a..44b3bda4be327d1a7cf6a536976d899316868e67 100644 (file)
@@ -6,11 +6,11 @@ package com.vaadin.tests;
 
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class TestIFrames extends CustomComponent {
 
-    OrderedLayout main = new OrderedLayout();
+    VerticalLayout main = new VerticalLayout();
 
     public TestIFrames() {
         setCompositionRoot(main);
@@ -29,8 +29,7 @@ public class TestIFrames extends CustomComponent {
     private Label createEmbedded(String URL) {
         final int width = 600;
         final int height = 250;
-        final String iFrame = "<iframe height=\"" + height + "\" width=\""
-                + width + "\" src=\"" + URL + "\" />";
+        final String iFrame = "<iframe height=\"" + height + "\" width=\"" + width + "\" src=\"" + URL + "\" />";
         return new Label(iFrame, Label.CONTENT_XHTML);
     }
 
index 49a3c110fa479b9bdd08a181ca9554dbc1569ba1..95bda50044d0d406ae31a50d5bd017b34b6d8feb 100644 (file)
@@ -11,9 +11,7 @@ public class TestMethodProperty {
 
         MyTest myTest = new MyTest();
 
-        MethodProperty<Integer> methodProperty2 = new MethodProperty<Integer>(
-                Integer.TYPE, myTest, "getInt", "setInt", new Object[0],
-                new Object[] { null }, 0);
+        MethodProperty<Integer> methodProperty2 = new MethodProperty<Integer>(Integer.TYPE, myTest, "getInt", "setInt", new Object[0], new Object[] { null }, 0);
 
         methodProperty2.setValue("3");
 
index 5d1332d352b8849ae282ccb61f0af5aea485e736..da4cd1edb375c524fd109a3382552009ec9aa1f8 100644 (file)
@@ -14,6 +14,7 @@ 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;
 
 /**
  * This test has a somewhat deep layout within one page. At the bottom, Select
@@ -62,7 +63,7 @@ public class TestSelectAndDatefieldInDeepLayouts extends CustomComponent {
     }
 
     AbstractLayout getOrderedLayout() {
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
         l.setCaption(getCaption("orderedlayout"));
         return l;
     }
index 479a7602ef3d4b32cea30a1c45660b3d7657df76..fe114439956021d4cdf8bf0990bea399132a73ac 100644 (file)
@@ -26,20 +26,11 @@ public class TestSetVisibleAndCaching extends com.vaadin.Application {
         final Window mainWindow = new Window("TestSetVisibleAndCaching");
         setMainWindow(mainWindow);
 
-        panelA.addComponent(new Label(
-                "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
-        panelB.addComponent(new Label(
-                "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"));
-        panelC.addComponent(new Label(
-                "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"));
+        panelA.addComponent(new Label("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));
+        panelB.addComponent(new Label("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"));
+        panelC.addComponent(new Label("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"));
 
-        mainWindow
-                .addComponent(new Label(
-                        "Inspect transfered data from server to "
-                                + "client using firebug (http request / response cycles)."
-                                + " See how widgets are re-used,"
-                                + " after each panel is once shown in GUI then"
-                                + " their contents are not resend."));
+        mainWindow.addComponent(new Label("Inspect transfered data from server to " + "client using firebug (http request / response cycles)." + " See how widgets are re-used," + " after each panel is once shown in GUI then" + " their contents are not resend."));
         mainWindow.addComponent(buttonNextPanel);
         mainWindow.addComponent(panelA);
         mainWindow.addComponent(panelB);
index 5d3a6e77cd6fdfb233ebb4ccac93569de07ef747..3692841c15cc3d9a577f8f4c127808c41212667b 100644 (file)
@@ -62,8 +62,7 @@ public class TestSizeableIncomponents extends Application {
                 if (prev == null) {
                     getMainWindow().showNotification("No more test cases");
                 } else {
-                    getMainWindow().showNotification(
-                            "Selected test:" + prev.getTestableName());
+                    getMainWindow().showNotification("Selected test:" + prev.getTestableName());
                     select.setValue(prev);
                     select.requestRepaint();
                 }
@@ -77,8 +76,7 @@ public class TestSizeableIncomponents extends Application {
                 if (next == null) {
                     getMainWindow().showNotification("No more test cases");
                 } else {
-                    getMainWindow().showNotification(
-                            "Selected test:" + next.getTestableName());
+                    getMainWindow().showNotification("Selected test:" + next.getTestableName());
                     select.setValue(next);
                     select.requestRepaint();
                 }
@@ -131,8 +129,7 @@ public class TestSizeableIncomponents extends Application {
         String[] list2 = (new File(dir.getFile())).list();
         for (int i = 0; i < list2.length; i++) {
             String f = list2[i];
-            if (f.endsWith(".class") && (f.indexOf("CustomComponent") == -1)
-                    && (f.indexOf("Window") == -1)) {
+            if (f.endsWith(".class") && (f.indexOf("CustomComponent") == -1) && (f.indexOf("Window") == -1)) {
                 f = f.replaceAll(".class", "");
                 String className = "com.vaadin.ui." + f;
                 Class<?> c;
@@ -168,14 +165,11 @@ public class TestSizeableIncomponents extends Application {
                         cont.addItem(t);
                         t = new Testable(c) {
                             @Override
-                            public Component getComponent()
-                                    throws InstantiationException,
-                                    IllegalAccessException {
+                            public Component getComponent() throws InstantiationException, IllegalAccessException {
 
                                 Component c = super.getComponent();
 
-                                Panel p = new Panel(
-                                        "Wrapper panel (400px*400px)");
+                                Panel p = new Panel("Wrapper panel (400px*400px)");
                                 p.setContent(new VerticalLayout());
                                 p.setWidth("400px");
                                 p.setHeight("400px");
@@ -228,8 +222,7 @@ public class TestSizeableIncomponents extends Application {
             StringBuffer sb = new StringBuffer();
             sb.append(classToTest.getName().replaceAll("com.vaadin.ui.", ""));
             sb.append("[");
-            for (Iterator<Configuration> i = configurations.iterator(); i
-                    .hasNext();) {
+            for (Iterator<Configuration> i = configurations.iterator(); i.hasNext();) {
                 sb.append((i.next()).getDescription());
                 if (i.hasNext()) {
                     sb.append(",");
@@ -248,8 +241,7 @@ public class TestSizeableIncomponents extends Application {
          * @throws InstantiationException
          * @throws IllegalAccessException
          */
-        public Component getComponent() throws InstantiationException,
-                IllegalAccessException {
+        public Component getComponent() throws InstantiationException, IllegalAccessException {
             Component c = (Component) classToTest.newInstance();
 
             if (c instanceof Button) {
@@ -258,16 +250,13 @@ public class TestSizeableIncomponents extends Application {
             if (AbstractSelect.class.isAssignableFrom(c.getClass())) {
                 if (c instanceof Table) {
                     Table new_name = (Table) c;
-                    new_name.setContainerDataSource(TestForTablesInitialColumnWidthLogicRendering
-                            .getTestTable(5, 100).getContainerDataSource());
+                    new_name.setContainerDataSource(TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 100).getContainerDataSource());
 
                 } else {
                     AbstractSelect new_name = (AbstractSelect) c;
-                    Container cont = TestForTablesInitialColumnWidthLogicRendering
-                            .getTestTable(2, 8).getContainerDataSource();
+                    Container cont = TestForTablesInitialColumnWidthLogicRendering.getTestTable(2, 8).getContainerDataSource();
                     new_name.setContainerDataSource(cont);
-                    new_name.setItemCaptionPropertyId(cont
-                            .getContainerPropertyIds().iterator().next());
+                    new_name.setItemCaptionPropertyId(cont.getContainerPropertyIds().iterator().next());
 
                 }
             } else if (c instanceof ComponentContainer) {
@@ -281,8 +270,7 @@ public class TestSizeableIncomponents extends Application {
                 ((Label) c).setValue("Test label");
             }
 
-            for (Iterator<Configuration> i = configurations.iterator(); i
-                    .hasNext();) {
+            for (Iterator<Configuration> i = configurations.iterator(); i.hasNext();) {
                 Configuration conf = i.next();
                 conf.configure(c);
             }
index c5ff1cb51d30cc0050dd25d0c9facad94eb4c796..6ed6489e009a9351ea0ad1127a0c7c81f27e3b73 100644 (file)
@@ -23,8 +23,7 @@ import com.vaadin.ui.Window;
  * @since 4.0.0
  * 
  */
-public class TreeFilesystem extends com.vaadin.Application implements
-        Tree.ExpandListener {
+public class TreeFilesystem extends com.vaadin.Application implements Tree.ExpandListener {
 
     // Filesystem explorer panel and it's components
     private final Panel explorerPanel = new Panel("Filesystem explorer");
index 618fa21ccf6ffe6c6e1062e0d40d18b1dff1594b..44e1f63b952d505aa04624aee3765ac18ad00116 100644 (file)
@@ -28,8 +28,7 @@ import com.vaadin.ui.Window;
  * @since 4.0.0
  * 
  */
-public class TreeFilesystemContainer extends com.vaadin.Application implements
-        Listener {
+public class TreeFilesystemContainer extends com.vaadin.Application implements Listener {
 
     // Filesystem explorer panel and it's components
     private final Panel explorerPanel = new Panel("Filesystem explorer");
@@ -86,11 +85,9 @@ public class TreeFilesystemContainer extends com.vaadin.Application implements
             // Check if event is about changing value
             if (event.getClass() == Field.ValueChangeEvent.class) {
                 // Update property panel contents
-                final FileItem fileItem = (FileItem) filesystem
-                        .getItem(filesystem.getValue());
+                final FileItem fileItem = (FileItem) filesystem.getItem(filesystem.getValue());
                 fileProperties.setIcon(fileItem.getIcon());
-                fileProperties.setCaption(fileItem.getName() + ", size "
-                        + fileItem.getSize() + " bytes.");
+                fileProperties.setCaption(fileItem.getName() + ", size " + fileItem.getSize() + " bytes.");
                 propertyPanel.setEnabled(true);
             }
             // here we could check for other type of events for filesystem
index 3819b33a3c891aac2963a42f675f7ed9666e09be..62abad260818dfea029793423e41edde5d5123e8 100644 (file)
@@ -17,10 +17,10 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.Tree;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -34,19 +34,13 @@ import com.vaadin.ui.Window;
  * @since 3.1.1
  * @author IT Mill Ltd.
  */
-public class UpgradingSample extends Application implements
-        Property.ValueChangeListener {
+public class UpgradingSample extends Application implements Property.ValueChangeListener {
 
     /* Menu for navigating inside the application. */
     private final Tree menu = new Tree();
 
     /* Contents of the website */
-    private final String[][] pages = {
-            { "Welcome", "Welcome to our website..." },
-            { "Products", "Public product information." },
-            { "Contact", "Public contact information." },
-            { "CRM", "CRM Database requiring login." },
-            { "Intranet", "Internal information database." } };
+    private final String[][] pages = { { "Welcome", "Welcome to our website..." }, { "Products", "Public product information." }, { "Contact", "Public contact information." }, { "CRM", "CRM Database requiring login." }, { "Intranet", "Internal information database." } };
 
     /* Application layout */
     private final GridLayout layout = new GridLayout(2, 1);
@@ -60,7 +54,7 @@ public class UpgradingSample extends Application implements
         setMainWindow(main);
 
         // Add menu and loginbox to the application
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
         layout.addComponent(l, 0, 0);
         l.addComponent(menu);
         l.addComponent(new LoginBox());
@@ -107,8 +101,7 @@ public class UpgradingSample extends Application implements
     }
 
     // Simple loginbox component for the application
-    public class LoginBox extends CustomComponent implements
-            Application.UserChangeListener {
+    public class LoginBox extends CustomComponent implements Application.UserChangeListener {
 
         // The components this loginbox is composed of
         private final TextField loginName = new TextField("Name");
@@ -119,8 +112,7 @@ public class UpgradingSample extends Application implements
 
         private final Panel statusPanel = new Panel();
 
-        private final Button logoutButton = new Button("Logout",
-                UpgradingSample.this, "close");
+        private final Button logoutButton = new Button("Logout", UpgradingSample.this, "close");
 
         private final Label statusLabel = new Label();
 
index b54bd3d184569ce24a590aa086106fe3b9796f5d..08dc3bf4fb0a0eb405fcba44ef8447142d62835b 100644 (file)
@@ -39,14 +39,11 @@ public class UsingCustomNewItemHandlerInSelect extends CustomComponent {
     }
 
     public void populateSelect() {
-        final String[] names = new String[] { "John", "Mary", "Joe", "Sarah",
-                "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
+        final String[] names = new String[] { "John", "Mary", "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
         for (int j = 0; j < 4; j++) {
             Integer id = new Integer(sequence++);
             Item item = select.addItem(id);
-            item.getItemProperty("CAPTION").setValue(
-                    id.toString() + ": "
-                            + names[random.nextInt() % names.length]);
+            item.getItemProperty("CAPTION").setValue(id.toString() + ": " + names[random.nextInt() % names.length]);
         }
     }
 
@@ -55,8 +52,7 @@ public class UsingCustomNewItemHandlerInSelect extends CustomComponent {
             // here could be db insert or other backend operation
             Integer id = new Integer(sequence++);
             Item item = select.addItem(id);
-            item.getItemProperty("CAPTION").setValue(
-                    id.toString() + ": " + newItemCaption);
+            item.getItemProperty("CAPTION").setValue(id.toString() + ": " + newItemCaption);
             select.setValue(id);
         }
 
index c9b0939eef3613f9ee0778f38c4628994b011242..c3346200c23c89aab371056c587456c8fced444a 100644 (file)
@@ -14,12 +14,10 @@ import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.Window;
 
-public class UsingObjectsInSelect extends com.vaadin.Application implements
-        ValueChangeListener {
+public class UsingObjectsInSelect extends com.vaadin.Application implements ValueChangeListener {
 
     private final Select select = new Select();
-    private final Label selectedTask = new Label("Selected task",
-            Label.CONTENT_XHTML);
+    private final Label selectedTask = new Label("Selected task", Label.CONTENT_XHTML);
 
     public LinkedList<?> exampleTasks = new LinkedList<Object>();
 
@@ -46,24 +44,17 @@ public class UsingObjectsInSelect extends com.vaadin.Application implements
     }
 
     public void createExampleTasks() {
-        final String[] assignedTo = new String[] { "John", "Mary", "Joe",
-                "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
-        final String[] type = new String[] { "Enhancement", "Bugfix",
-                "Testing", "Task" };
+        final String[] assignedTo = new String[] { "John", "Mary", "Joe", "Sarah", "Jeff", "Jane", "Peter", "Marc", "Josie", "Linus" };
+        final String[] type = new String[] { "Enhancement", "Bugfix", "Testing", "Task" };
         for (int j = 0; j < 100; j++) {
-            final Task task = new Task(
-                    type[(int) (random.nextDouble() * (type.length - 1))],
-                    assignedTo[(int) (random.nextDouble() * (assignedTo.length - 1))],
-                    random.nextInt(100));
+            final Task task = new Task(type[(int) (random.nextDouble() * (type.length - 1))], assignedTo[(int) (random.nextDouble() * (assignedTo.length - 1))], random.nextInt(100));
             select.addItem(task);
         }
     }
 
     public void valueChange(ValueChangeEvent event) {
         final Task task = (Task) select.getValue();
-        selectedTask.setValue("<b>Type:</b> " + task.getType()
-                + "<br /><b>Assigned to:</b> " + task.getAssignedTo()
-                + "<br /><b>Estimated hours: </b>" + task.getEstimatedHours());
+        selectedTask.setValue("<b>Type:</b> " + task.getType() + "<br /><b>Assigned to:</b> " + task.getAssignedTo() + "<br /><b>Estimated hours: </b>" + task.getEstimatedHours());
     }
 
     /**
index 241be04e212db5d402fe28915be445bad5bee860..df7293d3743cee282b2bc43eb61770ff2a570c47 100644 (file)
@@ -12,17 +12,15 @@ import com.vaadin.ui.Embedded;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.VerticalLayout;
 
 public abstract class Feature extends CustomComponent {
 
-    private static final String PROP_REMINDER_TEXT = ""
-            + "<br /><br />Note: Use <b>Properties</b> panel located at the top"
-            + " right corner to try out how different properties affect"
-            + " the presentation or functionality of currently selected component.";
+    private static final String PROP_REMINDER_TEXT = "" + "<br /><br />Note: Use <b>Properties</b> panel located at the top" + " right corner to try out how different properties affect" + " the presentation or functionality of currently selected component.";
 
     private boolean propsReminder = true;
 
-    private final OrderedLayout layout;
+    private final VerticalLayout layout;
 
     private TabSheet ts;
 
@@ -38,7 +36,7 @@ public abstract class Feature extends CustomComponent {
 
     /** Constuctor for the feature component */
     public Feature() {
-        layout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
+        layout = new VerticalLayout();
         setCompositionRoot(layout);
     }
 
@@ -48,8 +46,7 @@ public abstract class Feature extends CustomComponent {
      * @param url
      */
     public void setJavadocURL(String url) {
-        javadoc.setValue("<iframe width=\"100%\" src=\"http://www.vaadin.com/api/com/vaadin/"
-                + url + "\"></iframe>");
+        javadoc.setValue("<iframe width=\"100%\" src=\"http://www.vaadin.com/api/com/vaadin/" + url + "\"></iframe>");
     }
 
     /**
@@ -83,14 +80,11 @@ 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 OrderedLayout mainLayout = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
+            final OrderedLayout layout = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
             mainLayout.addComponent(layout);
             if (getImage() != null) {
-                layout.addComponent(new Embedded("", new ClassResource(
-                        getImage(), getApplication())));
+                layout.addComponent(new Embedded("", new ClassResource(getImage(), getApplication())));
             }
             String label = "";
             label += getDescriptionXHTML();
@@ -98,8 +92,7 @@ public abstract class Feature extends CustomComponent {
                 label += PROP_REMINDER_TEXT;
             }
             if (title != null) {
-                layout.addComponent(new Label("<h3>" + title + "</h3>",
-                        Label.CONTENT_XHTML));
+                layout.addComponent(new Label("<h3>" + title + "</h3>", Label.CONTENT_XHTML));
             }
             description = new Label(label, Label.CONTENT_XHTML);
             mainLayout.addComponent(description);
@@ -119,11 +112,9 @@ public abstract class Feature extends CustomComponent {
         // Code Sample tab
         final String example = getExampleSrc();
         if (example != null) {
-            final OrderedLayout l = new OrderedLayout();
+            final VerticalLayout l = new VerticalLayout();
             if (getTitle() != null) {
-                l.addComponent(new Label(
-                        "<b>// " + getTitle() + " example</b>",
-                        Label.CONTENT_XHTML));
+                l.addComponent(new Label("<b>// " + getTitle() + " example</b>", Label.CONTENT_XHTML));
             }
             l.addComponent(new Label(example, Label.CONTENT_PREFORMATTED));
             ts.addTab(l, "Code Sample", null);
index adb563e6d476b66ed612546c168e21df58a70cd4..7428f8d8d505f9422fbc14e8dcbc7168def4b6c4 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureBuffering extends Feature {
 
@@ -38,7 +38,7 @@ public class FeatureBuffering extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
         final Panel panel = new Panel();
         panel.setCaption("Buffering");
         l.addComponent(panel);
index 58c4a1cea86f0de510c3a268d488f3de096dc6df..7dc3be661a273b8eba0e49e70497fcde3461a627 100644 (file)
@@ -7,8 +7,8 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureButton extends Feature {
 
@@ -19,7 +19,7 @@ public class FeatureButton extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Button b = new Button("Caption");
         l.addComponent(b);
index 06732c03254087eb9233fc3fa39820b799a8a0a8..5d4b09e722c19aa78c19fa62a6e3a2d05619cf8e 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureContainers extends Feature {
 
@@ -43,7 +43,7 @@ public class FeatureContainers extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Containers");
index e016ebaf4e01d8920051fb7b100916d3aef47871..02e29f8ee34cab75571feb4267f0b5296ca2f3b0 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureCustomLayout extends Feature {
 
@@ -29,7 +29,7 @@ public class FeatureCustomLayout extends Feature {
 
     @Override
     protected Component getDemoComponent() {
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Custom Layout");
index 8fda0597e794ff6b09ef43ee4c1b0fd754f56890..ca815811532678fcaea44e2e9bc064e2af98fc3a 100644 (file)
@@ -10,8 +10,8 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureDateField extends Feature {
 
@@ -31,7 +31,7 @@ public class FeatureDateField extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         l.addComponent(new Label("Your default locale is: "
                 + getApplication().getLocale().toString().replace('_', '-')));
index 65453a8ecc936bab69a6ba0af75546f30b3c4d3f..8d44979b9126294c9298003027b52ce0171fa0dc 100644 (file)
@@ -8,7 +8,7 @@ import com.vaadin.terminal.ClassResource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Embedded;
 import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureEmbedded extends Feature {
 
@@ -19,7 +19,7 @@ public class FeatureEmbedded extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final ClassResource flashResource = new ClassResource(
                 "vaadin_spin.swf", getApplication());
index 8c0d01752dd1a009917388f177fecceedfb57ebd..b1e690481e3b4a85130ae4e4d2400bb691395f6f 100644 (file)
@@ -11,15 +11,15 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 
-public class FeatureForm extends Feature implements
-        Property.ValueChangeListener {
+public class FeatureForm extends Feature implements Property.ValueChangeListener {
 
-    OrderedLayout demo = null;
+    VerticalLayout demo = null;
 
     Form test;
 
@@ -33,7 +33,7 @@ public class FeatureForm extends Feature implements
     protected Component getDemoComponent() {
 
         if (demo == null) {
-            demo = new OrderedLayout();
+            demo = new VerticalLayout();
             createDemo();
         }
 
@@ -54,8 +54,7 @@ public class FeatureForm extends Feature implements
         }
 
         demo.addComponent(test);
-        final OrderedLayout actions = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        final HorizontalLayout actions = new HorizontalLayout();
         demo.addComponent(actions);
 
         // form adder
@@ -97,8 +96,7 @@ public class FeatureForm extends Feature implements
                     formLayout = new GridLayout(2, 1);
                 }
                 if (value.equals("Horizontal (OrderedLayout)")) {
-                    formLayout = new OrderedLayout(
-                            OrderedLayout.ORIENTATION_HORIZONTAL);
+                    formLayout = new HorizontalLayout();
                 }
 
                 createDemo();
@@ -147,24 +145,7 @@ public class FeatureForm extends Feature implements
 
     @Override
     protected String getDescriptionXHTML() {
-        return "Form is a flexible, yet simple container for fields. "
-                + " It provides support for any layouts and provides buffering interface for"
-                + " easy connection of commit- and discard buttons. All the form"
-                + " fields can be customized by adding validators, setting captions and icons, "
-                + " setting immediateness, etc. Also direct mechanism for replacing existing"
-                + " fields with selections is given."
-                + " <br /><br />Form provides customizable editor for classes implementing"
-                + " Item-interface. Also the form itself"
-                + " implements this interface for easier connectivity to other items."
-                + " To use the form as editor for an item, just connect the item to"
-                + " form.After the item has been connected to the form,"
-                + " the automatically created fields can be customized and new fields can"
-                + " be added. If you need to connect a class that does not implement"
-                + " Item-interface, most properties of any"
-                + " class following bean pattern, can be accessed trough"
-                + " BeanItem."
-                + " <br /><br />The best example of Form usage is the this feature browser itself; "
-                + " all the Property-panels in demos are composed of Form-components.";
+        return "Form is a flexible, yet simple container for fields. " + " It provides support for any layouts and provides buffering interface for" + " easy connection of commit- and discard buttons. All the form" + " fields can be customized by adding validators, setting captions and icons, " + " setting immediateness, etc. Also direct mechanism for replacing existing" + " fields with selections is given." + " <br /><br />Form provides customizable editor for classes implementing" + " Item-interface. Also the form itself" + " implements this interface for easier connectivity to other items." + " To use the form as editor for an item, just connect the item to" + " form.After the item has been connected to the form," + " the automatically created fields can be customized and new fields can" + " be added. If you need to connect a class that does not implement" + " Item-interface, most properties of any" + " class following bean pattern, can be accessed trough" + " BeanItem." + " <br /><br />The best example of Form usage is the this feature browser itself; " + " all the Property-panels in demos are composed of Form-components.";
     }
 
     @Override
index 297248001e268a0f1045c6cc3f13b4cecb438834..a72dbd87734e01bd1cc6a1eff7ef551b4b2d7d30 100644 (file)
@@ -11,8 +11,8 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.GridLayout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureGridLayout extends Feature {
 
@@ -23,7 +23,7 @@ public class FeatureGridLayout extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final GridLayout gl = new GridLayout(3, 3);
         final DateField cal = new DateField("Test component 1", new Date());
index 47fdc2d71f15e4930c70f736aad30ed545f81561..e577861a4901415aeac43f1f54843661677bba16 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureItems extends Feature {
 
@@ -33,7 +33,7 @@ public class FeatureItems extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Items");
index f12a76b39b2a623a37e9a00d4ab2eb9aeff1960e..01d30f74e9c0d423d97394d3a281b6c05e773ad1 100644 (file)
@@ -7,7 +7,7 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureLabel extends Feature {
 
@@ -18,7 +18,7 @@ public class FeatureLabel extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Label lab = new Label("Label text");
         l.addComponent(lab);
index c20f8fe45632dc9059ee3a467579857887ddb2ac..74e7eed7cf5f76562eb38c4e32c9a1e4252467d4 100644 (file)
@@ -8,7 +8,7 @@ import com.vaadin.terminal.ExternalResource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Link;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureLink extends Feature {
 
@@ -19,7 +19,7 @@ public class FeatureLink extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Link lnk = new Link("Link caption", new ExternalResource(
                 "http://www.vaadin.com"));
index cd7c5f90921f2954b926cadd37d8d124c0ae2335..95c2b405c3b6e540b0a7206ae8a9f6f1c1f50f2d 100644 (file)
@@ -9,6 +9,7 @@ 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;
 
 public class FeatureOrderedLayout extends Feature {
 
@@ -19,9 +20,9 @@ public class FeatureOrderedLayout extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
-        final OrderedLayout ol = new OrderedLayout();
+        final VerticalLayout ol = new VerticalLayout();
         for (int i = 1; i < 5; i++) {
             ol.addComponent(new TextField("Test component " + i));
         }
@@ -29,16 +30,10 @@ 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(OrderedLayout.ORIENTATION_HORIZONTAL), new Integer(OrderedLayout.ORIENTATION_VERTICAL) }, new Object[] { "Horizontal", "Vertical" });
         final Select themes = (Select) propertyPanel.getField("style");
-        themes.addItem("form")
-                .getItemProperty(themes.getItemCaptionPropertyId())
-                .setValue("form");
+        themes.addItem("form").getItemProperty(themes.getItemCaptionPropertyId()).setValue("form");
         propertyPanel.addProperties("OrderedLayout Properties", ap);
 
         setJavadocURL("ui/OrderedLayout.html");
@@ -48,9 +43,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(OrderedLayout.ORIENTATION_FLOW);\n" + "ol.addComponent(new TextField(\"Textfield caption\"));\n" + "ol.addComponent(new Label(\"Label\"));\n";
 
     }
 
@@ -59,14 +52,7 @@ public class FeatureOrderedLayout extends Feature {
      */
     @Override
     protected String getDescriptionXHTML() {
-        return "This feature provides a container for laying out components either "
-                + "vertically, horizontally or flowingly. The orientation may be changed "
-                + "during runtime. It also defines a special style for themes to implement called \"form\""
-                + "that is used for input forms where the components are laid-out side-by-side "
-                + "with their captions."
-                + "<br /><br />"
-                + "On the demo tab you can try out how the different properties "
-                + "affect the presentation of the component.";
+        return "This feature provides a container for laying out components either " + "vertically, horizontally or flowingly. The orientation may be changed " + "during runtime. It also defines a special style for themes to implement called \"form\"" + "that is used for input forms where the components are laid-out side-by-side " + "with their captions." + "<br /><br />" + "On the demo tab you can try out how the different properties " + "affect the presentation of the component.";
     }
 
     @Override
index dd5b7a431a3691007ed3e0370f96c9860724be15..d1e1258e277db3f290c773e349d351bf26cd7b2d 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeaturePanel extends Feature {
 
@@ -20,7 +20,7 @@ public class FeaturePanel extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         // Example panel
         final Panel show = new Panel("Panel caption");
index b11cd57ca778d522a1017dbf583c7e28fb688ae8..f37be2c372ec33d85aab9550f9ee2a72b2ab30b2 100644 (file)
@@ -16,10 +16,10 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 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.Table;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureParameters extends Feature implements URIHandler,
         ParameterHandler {
@@ -38,7 +38,7 @@ public class FeatureParameters extends Feature implements URIHandler,
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Label info = new Label("To test this feature, try to "
                 + "add some get parameters to URL. For example if you have "
index 718ebbd9e419a881714af2935c92a74d62a197c1..e314c574f6b357ac687c95c0bc16c95b06ea711b 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureProperties extends Feature {
 
@@ -41,7 +41,7 @@ public class FeatureProperties extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Data Model");
index f4386e762d727717d9b582e7502d828f7d1db7a9..2ea564476b33d02eb7197ab85a56716064eb1eb6 100644 (file)
@@ -5,8 +5,8 @@
 package com.vaadin.tests.featurebrowser;
 
 import com.vaadin.ui.Component;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureSelect extends Feature {
 
@@ -27,7 +27,7 @@ public class FeatureSelect extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Select s = new Select("Select employee");
         for (int i = 0; i < 50; i++) {
index ab015297a9e59a6637ed2addc370f8eb237c75b6..46d8e0f9747ed0f52dcdd11da4a94e6f6dbbe9b6 100644 (file)
@@ -6,8 +6,8 @@ package com.vaadin.tests.featurebrowser;
 
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TabSheet;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureTabSheet extends Feature {
 
@@ -18,7 +18,7 @@ public class FeatureTabSheet extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final TabSheet ts = new TabSheet();
         ts.addTab(
index 7c58bf89ee35b927b1ab7d25f113b6b093c2ee0f..928b7e3f88f90d78063483f8f0a77cdaea003465 100644 (file)
@@ -8,9 +8,9 @@ import com.vaadin.event.Action;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureTable extends Feature implements Action.Handler {
 
@@ -52,7 +52,7 @@ public class FeatureTable extends Feature implements Action.Handler {
 
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         // Sample table
         t = new Table("Corporate Employees");
index f1dc49b4236f1a9008eba81a90cb9b9ef38d9929..82a8b77b65ebe68b027f739bac12cefb25c96ffe 100644 (file)
@@ -10,9 +10,9 @@ import com.vaadin.event.Action;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.Tree;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureTree extends Feature implements Action.Handler {
 
@@ -61,7 +61,7 @@ public class FeatureTree extends Feature implements Action.Handler {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final String[] names = new String[100];
         for (int i = 0; i < names.length; i++) {
index 64cd29eba513e4e4891edf05b8d5b4cf327619d4..fdd51e7efdc3d1b1d94c798ad261b778aad82fec 100644 (file)
@@ -13,10 +13,10 @@ import com.vaadin.terminal.StreamResource;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Link;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Upload;
 import com.vaadin.ui.Upload.FinishedEvent;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureUpload extends Feature implements Upload.FinishedListener {
     Buffer buffer = new Buffer();
@@ -30,7 +30,7 @@ public class FeatureUpload extends Feature implements Upload.FinishedListener {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Upload up = new Upload("Upload", buffer);
         up.setImmediate(true);
index 2b2fbae805e1ef3a07013d7a5fa0448417098bec..6d28163c12da595c6c999578f623a347cc392e47 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class FeatureValidators extends Feature {
 
@@ -33,7 +33,7 @@ public class FeatureValidators extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Validators");
index 0153bf5a0e843285ae17ac57ef77319720936f7b..760ca5211ac89a577f3b5ac9dca6d3d2d0fc09f4 100644 (file)
@@ -8,7 +8,7 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Window.CloseEvent;
 
@@ -30,9 +30,9 @@ public class FeatureWindow extends Feature implements Window.CloseListener {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout layoutRoot = new OrderedLayout();
-        final OrderedLayout layoutUpper = new OrderedLayout();
-        final OrderedLayout layoutLower = new OrderedLayout();
+        final VerticalLayout layoutRoot = new VerticalLayout();
+        final VerticalLayout layoutUpper = new VerticalLayout();
+        final VerticalLayout layoutLower = new VerticalLayout();
 
         demoWindow = new Window("Feature Test Window");
         demoWindow.addListener(this);
index 9543b89d0fe278c04d4d84e2bb36daa4497ae748..ae16c5c0cc0ea95bc98ffe95c558aa487820e592 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroBasic extends Feature {
 
@@ -25,7 +25,7 @@ public class IntroBasic extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Basic UI components");
index ceb36324add83c5bd1e2328e070c1ce991863e35..46dad74ad7b48af282a9ae2b586b33af8c77a8a4 100644 (file)
@@ -9,9 +9,9 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.Embedded;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroComponents extends Feature {
 
@@ -26,7 +26,7 @@ public class IntroComponents extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("UI component diagram");
index 3e5b013f8dec83bbf9c7bb744e561cef6c80865e..384404a75a3b1472208a3264603f9a8ba89bcab2 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroDataHandling extends Feature {
 
@@ -25,7 +25,7 @@ public class IntroDataHandling extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Data Handling");
index 9bc199dc34775f2599c4fbe7bf1fdaac79200ba0..4b9d208d7ec65e0fe5c7391fda7b69287031ad4b 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroDataModel extends Feature {
 
@@ -26,7 +26,7 @@ public class IntroDataModel extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Data Model");
index ff8b029fbd93688c4ab311445ac9b13ff2516d3b..024f05fabd8f998557aa8fc02cec9dae09745330 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroItemContainers extends Feature {
 
@@ -25,7 +25,7 @@ public class IntroItemContainers extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Item Containers");
index c0dd0e305aef7e1d26c9384f6c286a8dc2b2ece5..724d2c2ee2d9b2aece0f111ef3314e441a68339c 100644 (file)
@@ -7,9 +7,9 @@ package com.vaadin.tests.featurebrowser;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroLayouts extends Feature {
 
@@ -27,7 +27,7 @@ public class IntroLayouts extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Panel panel = new Panel();
         panel.setCaption("Layouts");
index 8bb4a3f14582b641a530c302e2c8e51b8ff0f502..4d6ee6987457d4e4e23d44cfe7c22bf1d49e3b45 100644 (file)
@@ -6,7 +6,7 @@ package com.vaadin.tests.featurebrowser;
 
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroTerminal extends Feature {
 
@@ -17,7 +17,7 @@ public class IntroTerminal extends Feature {
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         final Label lab = new Label();
         lab.setStyle("featurebrowser-none");
index 4daad847038d859cd56e6dcd4ee3b693ddb4000d..b0dbc222324efc6e6c2c3069aa6285db51b2b592 100644 (file)
@@ -16,9 +16,9 @@ import com.vaadin.terminal.gwt.server.ApplicationServlet;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.Form;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 
 public class IntroWelcome extends Feature implements URIHandler,
         ParameterHandler {
@@ -62,7 +62,7 @@ public class IntroWelcome extends Feature implements URIHandler,
     @Override
     protected Component getDemoComponent() {
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
 
         panel.setCaption("Welcome to the Vaadin feature tour!");
         l.addComponent(panel);
index 3a6c379b5ce988b47f83c5f229f7ce4be6896207..8ec16b12f025d8763aaa4d6928a2f2fec48c4dad 100644 (file)
@@ -34,6 +34,7 @@ import com.vaadin.ui.Select;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.Tree;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class PropertyPanel extends Panel implements Button.ClickListener,
@@ -41,7 +42,7 @@ public class PropertyPanel extends Panel implements Button.ClickListener,
 
     private Select addComponent;
 
-    private final OrderedLayout formsLayout = new OrderedLayout();
+    private final VerticalLayout formsLayout = new VerticalLayout();
 
     private final LinkedList<Form> forms = new LinkedList<Form>();
 
index 0e61705049cb0dc7257bf2ede7887e7638993ca8..668588ee3900eea77f2e6a365bf71015660f7230 100644 (file)
@@ -25,9 +25,7 @@ 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,\r
-            AlignmentHandler.ALIGNMENT_VERTICAL_CENTER,\r
-            AlignmentHandler.ALIGNMENT_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
@@ -152,22 +150,19 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setWidth("");\r
         ol.setCaption("Fixed height (50px) and dynamic width");\r
 \r
-        TextField tf = new TextField(\r
-                "100px high TextField, valign: bottom, should be partly outside");\r
+        TextField tf = new TextField("100px high TextField, valign: bottom, should be partly outside");\r
         tf.setHeight("100px");\r
         tf.setWidth("");\r
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
 \r
-        tf = new TextField(\r
-                "100% high, 50px wide TextField, valign: bottom, should fill full height");\r
+        tf = new TextField("100% high, 50px wide TextField, valign: bottom, should fill full height");\r
         tf.setHeight("100%");\r
         tf.setWidth("50px");\r
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
 \r
-        Label l = new Label(\r
-                "100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
+        Label l = new Label("100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
         tf.setHeight("100%");\r
         tf.setWidth("50px");\r
         ol.addComponent(l);\r
@@ -217,8 +212,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
 \r
-        Label l = new Label(\r
-                "100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
+        Label l = new Label("100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
         tf.setHeight("100%");\r
         tf.setWidth("50px");\r
         ol.addComponent(l);\r
@@ -244,7 +238,7 @@ public class OrderedLayoutBasics extends TestBase {
     }\r
 \r
     private Layout layout3New() {\r
-        AbstractOrderedLayout ol = new HorizontalLayout();\r
+        HorizontalLayout ol = new HorizontalLayout();\r
         ol.setHeight("300px");\r
         // ol.setWidth("500px");\r
         ol.setWidth("");\r
@@ -269,8 +263,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
 \r
-        Label l = new Label(\r
-                "100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
+        Label l = new Label("100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
         tf.setHeight("100%");\r
         tf.setWidth("50px");\r
         ol.addComponent(l);\r
@@ -326,13 +319,11 @@ public class OrderedLayoutBasics extends TestBase {
             int w = i * 100;\r
             tf = new TextField("Field " + i);\r
             tf.setRows(2);\r
-            tf.setValue(w + "px high, " + w + "px wide TextField, valign: "\r
-                    + valignName[i % 3]);\r
+            tf.setValue(w + "px high, " + w + "px wide TextField, valign: " + valignName[i % 3]);\r
             tf.setWidth(w + "px");\r
             tf.setHeight(w + "px");\r
             ol.addComponent(tf);\r
-            ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT,\r
-                    valign[i % 3]);\r
+            ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT, valign[i % 3]);\r
 \r
         }\r
 \r
@@ -352,9 +343,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight()\r
-                + "px) / layout_field_100pct_button_field");\r
+        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_field_100pct_button_field");\r
         TextField tf;\r
 \r
         tf = new TextField("300px x 300px Field");\r
@@ -394,9 +383,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight()\r
-                + "px) / layout_basic_test");\r
+        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_basic_test");\r
         TextField tf;\r
 \r
         tf = new TextField("300px x 300px Field");\r
@@ -436,9 +423,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(false);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight()\r
-                + "px) / layout_symmetric_fields");\r
+        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_symmetric_fields");\r
         TextField tf;\r
 \r
         tf = new TextField("300px x 300px Field");\r
@@ -475,9 +460,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight()\r
-                + "px) / layout_leftAndRight");\r
+        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_leftAndRight");\r
         TextField tf;\r
 \r
         // tf = new TextField("100%x100% Field");\r
@@ -551,8 +534,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Filled with fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("Filled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField("60%x100% Field");\r
@@ -578,8 +560,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,\r
-                AlignmentHandler.ALIGNMENT_VERTICAL_CENTER);\r
+        ol.setComponentAlignment(tf, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_VERTICAL_CENTER);\r
         // tf.setComponentError(new UserError("It's broken!"));\r
 \r
         // tf.setHeight("100%");\r
@@ -645,8 +626,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("OverFilled with fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("OverFilled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         for (int i = 0; i < 5; i++) {\r
@@ -674,8 +654,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("OverFilled with fixed width (" + ol.getWidth()\r
-                + "px) and dynamic height");\r
+        ol.setCaption("OverFilled with fixed width (" + ol.getWidth() + "px) and dynamic height");\r
         TextField tf;\r
 \r
         for (int i = 0; i < 10; i++) {\r
@@ -722,9 +701,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight()\r
-                + "px) / layout_add_remove_components");\r
+        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_add_remove_components");\r
 \r
         for (int i = 0; i < 2; i++) {\r
             AbstractOrderedLayout inner = createAddRemove(ol, "", "");\r
@@ -768,12 +745,10 @@ public class OrderedLayoutBasics extends TestBase {
         tf = new TextField("Short caption");\r
         ol.addComponent(tf);\r
 \r
-        tf = new TextField(\r
-                "A very long caption which is probably much longer than the field");\r
+        tf = new TextField("A very long caption which is probably much longer than the field");\r
         ol.addComponent(tf);\r
 \r
-        tf = new TextField(\r
-                "A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
         tf.setRequired(true);\r
         tf.setComponentError(new UserError("abc123"));\r
         ol.addComponent(tf);\r
@@ -809,16 +784,14 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField(\r
-                "A long caption which is probably much longer than the field");\r
+        tf = new TextField("A long caption which is probably much longer than the field");\r
         tf.setValue("Undefined width");\r
         tf.setRequired(true);\r
         tf.setComponentError(new UserError("123"));\r
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField(\r
-                "A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
         tf.setValue("Undefined width");\r
         tf.setIcon(new ThemeResource("icons/16/document-add.png"));\r
         tf.setRequired(true);\r
@@ -840,8 +813,7 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
-    private Layout layout_captions_fixed_size_and_relative_size(\r
-            AbstractOrderedLayout ol) {\r
+    private Layout layout_captions_fixed_size_and_relative_size(AbstractOrderedLayout ol) {\r
         ol.setWidth("700px");\r
         ol.setHeight("250px");\r
 \r
@@ -861,8 +833,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
         ol.setExpandRatio(tf, 1);\r
 \r
-        tf = new TextField(\r
-                "A long caption which is probably much longer than the field");\r
+        tf = new TextField("A long caption which is probably much longer than the field");\r
         tf.setValue("100% wide field, ratio 2");\r
         tf.setSizeFull();\r
         tf.setRequired(true);\r
@@ -871,8 +842,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
         ol.setExpandRatio(tf, 2);\r
 \r
-        tf = new TextField(\r
-                "A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
         tf.setValue("100% wide field, ratio 3");\r
         tf.setSizeFull();\r
         tf.setIcon(new ThemeResource("icons/16/document-add.png"));\r
@@ -896,8 +866,7 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
-    private Layout layout_captions_fixed_size_and_fixed_size(\r
-            AbstractOrderedLayout ol) {\r
+    private Layout layout_captions_fixed_size_and_fixed_size(AbstractOrderedLayout ol) {\r
         ol.setWidth("700px");\r
         ol.setHeight("250px");\r
 \r
@@ -915,8 +884,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField(\r
-                "A long caption which is probably much longer than the field");\r
+        tf = new TextField("A long caption which is probably much longer than the field");\r
         tf.setWidth("250px");\r
         tf.setValue("250px wide field");\r
         tf.setRequired(true);\r
@@ -924,8 +892,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField(\r
-                "A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
         tf.setValue("200px wide field");\r
         tf.setWidth("200px");\r
         tf.setIcon(new ThemeResource("icons/16/document-add.png"));\r
@@ -959,8 +926,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setCaption("Caption test with fixed width");\r
 \r
         Label l;\r
-        l = new Label(\r
-                "This is a long text and should remain on one line as there is nothing forcing line breaks");\r
+        l = new Label("This is a long text and should remain on one line as there is nothing forcing line breaks");\r
         ol.addComponent(l);\r
         // ol.setComponentAlignment(l, AlignmentHandler.ALIGNMENT_RIGHT,\r
         // AlignmentHandler.ALIGNMENT_BOTTOM);\r
@@ -974,8 +940,7 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
-    private AbstractOrderedLayout createAddRemove(AbstractOrderedLayout ol,\r
-            String width, String buttonSuffix) {\r
+    private AbstractOrderedLayout createAddRemove(AbstractOrderedLayout ol, String width, String buttonSuffix) {\r
         Button b = createAddButton(ol);\r
         Button wb = createWideAddButton(ol);\r
         Button r = createRemoveButton(ol, buttonSuffix);\r
@@ -995,8 +960,7 @@ public class OrderedLayoutBasics extends TestBase {
         Button b = new Button("Add before", new ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                addBefore((AbstractOrderedLayout) event.getButton().getData(),\r
-                        event.getButton().getParent(), "");\r
+                addBefore((AbstractOrderedLayout) event.getButton().getData(), event.getButton().getParent(), "");\r
             }\r
 \r
         });\r
@@ -1009,8 +973,7 @@ public class OrderedLayoutBasics extends TestBase {
         Button b = new Button("Add 100% before", new ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                addBefore((AbstractOrderedLayout) event.getButton().getData(),\r
-                        event.getButton().getParent(), "100%");\r
+                addBefore((AbstractOrderedLayout) event.getButton().getData(), event.getButton().getParent(), "100%");\r
             }\r
 \r
         });\r
@@ -1023,8 +986,7 @@ public class OrderedLayoutBasics extends TestBase {
         Button b = new Button("Remove this " + suffix, new ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
-                remove((AbstractOrderedLayout) event.getButton().getData(),\r
-                        event.getButton().getParent());\r
+                remove((AbstractOrderedLayout) event.getButton().getData(), event.getButton().getParent());\r
             }\r
 \r
         });\r
@@ -1048,8 +1010,7 @@ public class OrderedLayoutBasics extends TestBase {
             }\r
             index++;\r
         }\r
-        AbstractOrderedLayout inner = createAddRemove(ol, width,\r
-                String.valueOf(suffix++));\r
+        AbstractOrderedLayout inner = createAddRemove(ol, width, String.valueOf(suffix++));\r
         ol.addComponent(inner, index);\r
         if (width.contains("%")) {\r
             ol.setExpandRatio(inner, 1.0f);\r
@@ -1066,8 +1027,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("100 % filled with fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("100 % filled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField();\r
@@ -1116,8 +1076,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(false);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("100 % filled with fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("100 % filled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField();\r
@@ -1155,8 +1114,7 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Underfilled with fixed width (" + ol.getWidth()\r
-                + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("Underfilled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField("60%x100% Field");\r
index e99fe4b5e7c03afb2387d3bdfd22a0b9f3f99cd8..31540fe9cf18b3946f02bd2cb84980a13e44e634 100644 (file)
@@ -2,7 +2,7 @@ package com.vaadin.tests.robustness;
 
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 
 public class RobustnessSimple extends Robustness implements
         Button.ClickListener {
@@ -18,7 +18,7 @@ public class RobustnessSimple extends Robustness implements
         }
 
         // create new stress layout
-        stressLayout = new OrderedLayout();
+        stressLayout = new VerticalLayout();
 
         // CASE single orderedlayout with a label containing 1Mb of data
         // fill with random components
index 20bee60326cbfb1183e4483cffcdf0d211e46950..45b5c0b0b2bd17393a442097d17a56f7dfc667aa 100644 (file)
@@ -6,6 +6,7 @@ import org.easymock.EasyMock;
 \r
 import com.vaadin.data.Property.ValueChangeEvent;\r
 import com.vaadin.data.Property.ValueChangeListener;\r
+import com.vaadin.data.Property.ValueChangeNotifier;\r
 import com.vaadin.data.util.ObjectProperty;\r
 import com.vaadin.ui.AbstractField;\r
 \r
index 5244308f45831a062b6f180a115d472b2f4d3d8d..8eb0571a779df7e42cfea25fb12d37b19fde5a3e 100644 (file)
@@ -2,11 +2,12 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.tests.TestForTablesInitialColumnWidthLogicRendering;
-import com.vaadin.ui.ExpandLayout;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -19,15 +20,14 @@ public class Ticket1225 extends Application {
     @Override
     public void init() {
 
-        final Window mainWin = new Window(
-                "Test app to break layout fuction in IE7");
+        final Window mainWin = new Window("Test app to break layout fuction in IE7");
         setMainWindow(mainWin);
 
         SplitPanel sp = new SplitPanel();
 
         sp.setFirstComponent(new Label("First"));
 
-        ExpandLayout el = new ExpandLayout();
+        VerticalLayout el = new VerticalLayout();
 
         sp.setSecondComponent(el);
         el.setMargin(true);
@@ -35,34 +35,29 @@ public class Ticket1225 extends Application {
 
         el.addComponent(new Label("Top"));
 
-        Table testTable = TestForTablesInitialColumnWidthLogicRendering
-                .getTestTable(5, 50);
+        Table testTable = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 50);
         testTable.setSizeFull();
 
         TabSheet ts = new TabSheet();
         ts.setSizeFull();
 
-        Label red = new Label(
-                "<div style='background:red;width:100%;height:100%;'>??</div>",
-                Label.CONTENT_XHTML);
+        Label red = new Label("<div style='background:red;width:100%;height:100%;'>??</div>", Label.CONTENT_XHTML);
         // red.setCaption("cap");
         // red.setSizeFull();
 
         // el.addComponent(testTable);
-        // el.expand(testTable);
+        // el.setExpandRatio(testTable,1);
 
         el.addComponent(ts);
-        el.expand(ts);
+        el.setExpandRatio(ts, 1);
         ts.addComponent(red);
-        ts.setTabCaption(red, "REd tab");
+        ts.getTab(red).setCaption("REd tab");
 
-        Label l = new Label("<div style='background:blue;'>sdf</div>",
-                Label.CONTENT_XHTML);
+        Label l = new Label("<div style='background:blue;'>sdf</div>", Label.CONTENT_XHTML);
         el.addComponent(l);
-        el.setComponentAlignment(l, ExpandLayout.ALIGNMENT_RIGHT,
-                ExpandLayout.ALIGNMENT_VERTICAL_CENTER);
+        el.setComponentAlignment(l, Alignment.MIDDLE_RIGHT);
 
-        mainWin.setLayout(sp);
+        mainWin.setContent(sp);
 
     }
 }
\ No newline at end of file
index 03e89aa3559d4a3cd3ca43f2a8612c7b8997dd05..82cc3748e226b5891e7cbf3a2ca1ea9592f6b68c 100644 (file)
@@ -116,12 +116,11 @@ public class Ticket1230 extends Application {
 
         }
 
-        w.addComponent(new Button("print select values",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        printState();
-                    }
-                }));
+        w.addComponent(new Button("print select values", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                printState();
+            }
+        }));
     }
 
     private Select createSelect() {
@@ -141,10 +140,8 @@ public class Ticket1230 extends Application {
     }
 
     void printState() {
-        System.out.println(" Select without null item "
-                + selectWithoutNullItem.getValue());
-        System.out.println(" Select with null item "
-                + selectWithNullItem.getValue());
+        System.out.println(" Select without null item " + selectWithoutNullItem.getValue());
+        System.out.println(" Select with null item " + selectWithNullItem.getValue());
 
     }
 
index c2a150b8baa3b5f35c6c7d6c1900ddaf7a347609..aa5ce8d8a234602add3fb49626103d642a0ec441 100644 (file)
@@ -5,10 +5,10 @@ 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.OrderedLayout;\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
 \r
 public class Ticket1245 extends com.vaadin.Application {\r
@@ -17,8 +17,7 @@ public class Ticket1245 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.addComponent(new TreeExample());\r
@@ -35,7 +34,7 @@ class TreeExample extends CustomComponent {
     Tree tree;\r
 \r
     public TreeExample() {\r
-        final OrderedLayout main = new OrderedLayout();\r
+        final VerticalLayout main = new VerticalLayout();\r
         setCompositionRoot(main);\r
 \r
         // Panel w/ Tree\r
index 5541b7259ff95834e9d47f8c08c9f4162766a265..a6f9cbf2af3f4367afb38fbb236f38ba2d8ea0b3 100644 (file)
@@ -16,9 +16,9 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Panel;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.Window.Notification;
 
@@ -46,20 +46,7 @@ public class Ticket1362Login extends Application {
 
         ApplicationResource loginPage = new ApplicationResource() {
 
-            private byte[] loginHTML = (""
-                    + "<html>"
-                    + "<head><script type='text/javascript'>"
-                    + "var setTarget = function() {document.getElementById('loginf').action = top.location;};"
-                    + "</script></head>"
-                    + "<body onload='setTarget();'>"
-                    + "Iframe generated by LoginBox. PW managers can autofill form. Form handled by LoginBox "
-                    + "that will fire LoginEvents. Will post into another iframe, from where the script "
-                    + "will find Vaadin client that will be force synced. <form id='loginf' target='logintarget'>"
-                    + "Username : <input type='text' name='username'>"
-                    + "Password : <input type='password' name='password'>"
-                    + "<input type='submit' value='login'>" + "</form>"
-                    + "<iframe name='logintarget'></iframe>" + "</body>"
-                    + "</html>").getBytes();
+            private byte[] loginHTML = ("" + "<html>" + "<head><script type='text/javascript'>" + "var setTarget = function() {document.getElementById('loginf').action = top.location;};" + "</script></head>" + "<body onload='setTarget();'>" + "Iframe generated by LoginBox. PW managers can autofill form. Form handled by LoginBox " + "that will fire LoginEvents. Will post into another iframe, from where the script " + "will find Vaadin client that will be force synced. <form id='loginf' target='logintarget'>" + "Username : <input type='text' name='username'>" + "Password : <input type='password' name='password'>" + "<input type='submit' value='login'>" + "</form>" + "<iframe name='logintarget'></iframe>" + "</body>" + "</html>").getBytes();
 
             public Application getApplication() {
                 return LoginBox.this.getApplication();
@@ -78,8 +65,7 @@ public class Ticket1362Login extends Application {
             }
 
             public DownloadStream getStream() {
-                return new DownloadStream(new ByteArrayInputStream(loginHTML),
-                        getMIMEType(), getFilename());
+                return new DownloadStream(new ByteArrayInputStream(loginHTML), getMIMEType(), getFilename());
             }
 
             public String getMIMEType() {
@@ -95,15 +81,13 @@ public class Ticket1362Login extends Application {
 
                     HashMap<String, String> params = new HashMap<String, String>();
                     // expecting single params
-                    for (Iterator<String> it = parameters.keySet().iterator(); it
-                            .hasNext();) {
+                    for (Iterator<String> it = parameters.keySet().iterator(); it.hasNext();) {
                         String key = it.next();
                         String value = (parameters.get(key))[0];
                         params.put(key, value);
                     }
                     LoginEvent event = new LoginEvent(params);
-                    for (Iterator<LoginListener> iterator = listeners
-                            .iterator(); iterator.hasNext();) {
+                    for (Iterator<LoginListener> iterator = listeners.iterator(); iterator.hasNext();) {
                         LoginListener listener = iterator.next();
                         listener.onLogin(event);
                     }
@@ -116,11 +100,7 @@ public class Ticket1362Login extends Application {
                 if (window != null) {
                     window.removeURIHandler(this);
                 }
-                return new DownloadStream(
-                        new ByteArrayInputStream(
-                                "<html><body>Login form handeled.<script type='text/javascript'>top.vaadin.forceSync();</script></body></html>"
-                                        .getBytes()), "text/html",
-                        "loginSuccesfull.html");
+                return new DownloadStream(new ByteArrayInputStream("<html><body>Login form handeled.<script type='text/javascript'>top.vaadin.forceSync();</script></body></html>".getBytes()), "text/html", "loginSuccesfull.html");
             }
         };
 
@@ -220,21 +200,20 @@ public class Ticket1362Login extends Application {
 
     private Panel mainPanel;
 
-    private ExpandLayout el;
+    private VerticalLayout el;
 
     @Override
     public void init() {
 
-        final Window mainWin = new Window(
-                "Test app with password manager savvy login functionality");
+        final Window mainWin = new Window("Test app with password manager savvy login functionality");
 
-        el = new ExpandLayout();
+        el = new VerticalLayout();
 
         currentUser.setCaption("Currennt user");
         el.addComponent(currentUser);
 
         el.addComponent(loginBox);
-        el.expand(loginBox);
+        el.setExpandRatio(loginBox, 1);
 
         mainWin.setLayout(el);
 
@@ -257,15 +236,11 @@ public class Ticket1362Login extends Application {
                 if (pw.equals("1234")) {
                     setUser(username);
                     currentUser.setValue(username);
-                    currentUser.getWindow().showNotification(
-                            "Logged in user: " + username);
-                    getMainWindow().getLayout().replaceComponent(loginBox,
-                            mainPanel);
-                    el.expand(mainPanel);
+                    currentUser.getWindow().showNotification("Logged in user: " + username);
+                    getMainWindow().getLayout().replaceComponent(loginBox, mainPanel);
+                    el.setExpandRatio(mainPanel, 1);
                 } else {
-                    getMainWindow().showNotification(
-                            "Wrong password. Hint, try '1234' ",
-                            Notification.TYPE_WARNING_MESSAGE);
+                    getMainWindow().showNotification("Wrong password. Hint, try '1234' ", Notification.TYPE_WARNING_MESSAGE);
                 }
             }
         });
index be549ebf8c2ac71816ac9cc283afb0c091a7fe66..77c7f30b51a47af8f0dfcdc8fac3220e726b4014 100644 (file)
@@ -15,8 +15,7 @@ public class Ticket1365 extends com.vaadin.Application implements Handler {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.addComponent(f);\r
@@ -26,19 +25,14 @@ public class Ticket1365 extends com.vaadin.Application implements Handler {
 \r
     }\r
 \r
-    final static private Action[] actions = new Action[] {\r
-            new ShortcutAction("Enter", ShortcutAction.KeyCode.ENTER,\r
-                    new int[] {}),\r
-            new ShortcutAction("CTRL-S", ShortcutAction.KeyCode.S,\r
-                    new int[] { ShortcutAction.ModifierKey.CTRL }), };\r
+    final static private Action[] actions = new Action[] { new ShortcutAction("Enter", ShortcutAction.KeyCode.ENTER, new int[] {}), new ShortcutAction("CTRL-S", ShortcutAction.KeyCode.S, new int[] { ShortcutAction.ModifierKey.CTRL }), };\r
 \r
     public Action[] getActions(Object target, Object sender) {\r
         return actions;\r
     }\r
 \r
     public void handleAction(Action action, Object sender, Object target) {\r
-        status.setValue("Pressed " + action.getCaption()\r
-                + " to fire shortcut. Texfield value: " + f.getValue());\r
+        status.setValue("Pressed " + action.getCaption() + " to fire shortcut. Texfield value: " + f.getValue());\r
         f.focus();\r
     }\r
 \r
index 282df33d894afdf1a6e24e87a0eae6cd63a94ec3..934be4e20d16de98dfe6a3dfa66687a2b0faecd2 100644 (file)
@@ -26,8 +26,7 @@ public class Ticket1397 extends Application {
         Panel panel = new Panel("PopupTest");
 
         // First test component
-        final ObjectProperty<String> prop = new ObjectProperty<String>(
-                "fooTextField");
+        final ObjectProperty<String> prop = new ObjectProperty<String>("fooTextField");
 
         PopupView.Content content = new PopupView.Content() {
             public String getMinimizedValueAsHTML() {
@@ -49,8 +48,7 @@ public class Ticket1397 extends Application {
         panel.addComponent(pe2);
 
         // Third test component
-        final ObjectProperty<StringBuffer> prop2 = new ObjectProperty<StringBuffer>(
-                new StringBuffer("Text for button"));
+        final ObjectProperty<StringBuffer> prop2 = new ObjectProperty<StringBuffer>(new StringBuffer("Text for button"));
 
         class myButton extends Button {
             public myButton() {
@@ -83,8 +81,7 @@ public class Ticket1397 extends Application {
         // Fourth test component
         final Panel panel3 = new Panel("Editor popup for a property");
         TextField tf2 = new TextField("TextField for editing a property");
-        final ObjectProperty<String> op = new ObjectProperty<String>(
-                "This is property text.");
+        final ObjectProperty<String> op = new ObjectProperty<String>("This is property text.");
         tf2.setPropertyDataSource(op);
         panel3.addComponent(tf2);
         PopupView.Content content3 = new PopupView.Content() {
@@ -126,9 +123,7 @@ public class Ticket1397 extends Application {
 
                 TextField tf = new TextField("Editor for line " + lineNum,
 
-                "Try to edit the contents for this textfield on line "
-                        + lineNum
-                        + " and see how the overview-version changes.");
+                "Try to edit the contents for this textfield on line " + lineNum + " and see how the overview-version changes.");
 
                 public String getMinimizedValueAsHTML() {
                     return "" + tf.toString().length() + " characters of info";
@@ -139,8 +134,7 @@ public class Ticket1397 extends Application {
                 }
 
             });
-            table.addItem(new Object[] { "1 " + i, "2 " + i, "3 " + i,
-                    "4 " + i, "5 " + i, pp, pp2 }, new Integer(i));
+            table.addItem(new Object[] { "1 " + i, "2 " + i, "3 " + i, "4 " + i, "5 " + i, pp, pp2 }, new Integer(i));
         }
 
         main.addComponent(table);
index 2d406e5a18d1b783c4610f68580713e142439d93..fea1000ffed097101bb7c7cf04115914c0e9544b 100644 (file)
@@ -6,12 +6,13 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
+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;
 import com.vaadin.ui.Window;
 
 public class Ticket1435 extends Application {
@@ -42,12 +43,11 @@ public class Ticket1435 extends Application {
      */
     public class ButtonPanel extends CustomComponent {
 
-        ExpandLayout root = new ExpandLayout();
+        VerticalLayout root = new VerticalLayout();
 
         // In header are the panel's title and the control buttons.
         // Panel title is expanded by default.
-        ExpandLayout header = new ExpandLayout(
-                ExpandLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout header = new HorizontalLayout();
 
         // This is where the actual data is put.
         Panel container = new Panel();
@@ -81,8 +81,7 @@ public class Ticket1435 extends Application {
                 buttonContainer = header;
 
             } else {
-                buttonContainer = new OrderedLayout(
-                        OrderedLayout.ORIENTATION_HORIZONTAL);
+                buttonContainer = new HorizontalLayout();
                 header.addComponent(buttonContainer);
 
             }
@@ -135,8 +134,7 @@ public class Ticket1435 extends Application {
                         } else {
                             root.setHeight(lastHeight, lastHeightUnit);
                         }
-                        event.getButton().setCaption(
-                                visible ? "Expand" : "Collapse");
+                        event.getButton().setCaption(visible ? "Expand" : "Collapse");
                     }
                 }
             });
@@ -160,7 +158,7 @@ public class Ticket1435 extends Application {
             container.getLayout().setMargin(false);
             container.getLayout().setSizeFull();
             root.addComponent(container);
-            root.expand(container);
+            root.setExpandRatio(container,1);
         }
 
         public void setHeight(int height, int unit) {
@@ -220,8 +218,7 @@ public class Ticket1435 extends Application {
 
         for (int i = 0; i < 10; i++) {
             String name = "Name " + i;
-            table.addItem(new Object[] { new CheckBox(), name,
-                    "02-22-2007 13:37" }, new Integer(i));
+            table.addItem(new Object[] { new CheckBox(), name, "02-22-2007 13:37" }, new Integer(i));
         }
 
         panel.setPanelComponent(table);
index 2944f460f69617305ee85f36b339e0b7624e28c0..d827f97e37dd0d38a7c27dee32b93016e1506b37 100644 (file)
@@ -2,7 +2,7 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1444 extends Application {
@@ -10,17 +10,14 @@ public class Ticket1444 extends Application {
     @Override
     public void init() {
 
-        final Window mainWin = new Window(
-                "Test app to break layout fuction in IE7");
+        final Window mainWin = new Window("Test app to break layout fuction in IE7");
         setMainWindow(mainWin);
 
-        OrderedLayout ol = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
         ol.setHeight("250px");
         ol.setWidth("500px");
 
-        Label red = new Label(
-                "<div style='background:red;width:100%;height:100%;'>??</div>",
-                Label.CONTENT_XHTML);
+        Label red = new Label("<div style='background:red;width:100%;height:100%;'>??</div>", Label.CONTENT_XHTML);
         red.setSizeFull();
 
         ol.addComponent(red);
index ff716aefc12b0ce3abe8710ac9b121d049ee2544..a11d4b03ad81601f35fa4d3207efeb297e6b12ba 100644 (file)
@@ -17,38 +17,29 @@ public class Ticket1465ModalNotification extends Application {
         final Window modal = new Window("Modal window");
         modal.setModal(true);
 
-        Button b = new Button("click to show notification",
-                new Button.ClickListener() {
+        Button b = new Button("click to show notification", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        modal.showNotification(
-                                "Try clicking the button in main window!",
-                                Window.Notification.TYPE_ERROR_MESSAGE);
+            public void buttonClick(ClickEvent event) {
+                modal.showNotification("Try clicking the button in main window!", Window.Notification.TYPE_ERROR_MESSAGE);
 
-                    }
-                });
+            }
+        });
         modal.addComponent(b);
 
-        b = new Button("click to warning notification",
-                new Button.ClickListener() {
+        b = new Button("click to warning notification", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        modal.showNotification(
-                                "Try clicking the button in main window!",
-                                Window.Notification.TYPE_WARNING_MESSAGE);
-                    }
-                });
+            public void buttonClick(ClickEvent event) {
+                modal.showNotification("Try clicking the button in main window!", Window.Notification.TYPE_WARNING_MESSAGE);
+            }
+        });
         modal.addComponent(b);
 
-        b = new Button("click to Humanized notification",
-                new Button.ClickListener() {
+        b = new Button("click to Humanized notification", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        modal.showNotification(
-                                "Try clicking the button in main window!",
-                                Window.Notification.TYPE_HUMANIZED_MESSAGE);
-                    }
-                });
+            public void buttonClick(ClickEvent event) {
+                modal.showNotification("Try clicking the button in main window!", Window.Notification.TYPE_HUMANIZED_MESSAGE);
+            }
+        });
         modal.addComponent(b);
 
         b = new Button("click to test modality!", new Button.ClickListener() {
index 37690612ed499370ec2443c2b18b7077cb0878e7..05c1a3d3c812854f9e3f0ecb065a57d56a7a98ce 100644 (file)
@@ -14,13 +14,10 @@ import com.vaadin.ui.Select;
 public class Ticket1506_Panel extends Panel {\r
 \r
     public Ticket1506_Panel() {\r
-        ObjectProperty<String> property1 = new ObjectProperty<String>(null,\r
-                String.class);\r
-        addComponent(initSelect(new Ticket1506_TestContainer(), "Test select",\r
-                property1));\r
+        ObjectProperty<String> property1 = new ObjectProperty<String>(null, String.class);\r
+        addComponent(initSelect(new Ticket1506_TestContainer(), "Test select", property1));\r
         addComponent(initButton(property1));\r
-        addComponent(initSelect(new Ticket1506_TestContainer2(),\r
-                "Test select 2", new ObjectProperty<String>(null, String.class)));\r
+        addComponent(initSelect(new Ticket1506_TestContainer2(), "Test select 2", new ObjectProperty<String>(null, String.class)));\r
     }\r
 \r
     private Component initButton(final ObjectProperty<?> property) {\r
@@ -33,8 +30,7 @@ public class Ticket1506_Panel extends Panel {
         return button;\r
     }\r
 \r
-    private Component initSelect(Container containerDataSource, String caption,\r
-            ObjectProperty<?> property) {\r
+    private Component initSelect(Container containerDataSource, String caption, ObjectProperty<?> property) {\r
         Select select = new Select(caption);\r
         select.setFilteringMode(Select.FILTERINGMODE_CONTAINS);\r
         select.setImmediate(true);\r
index b8b6cfe5ddb4ed40814161336aa8a1df319f0b93..bcb37b1fbe8bb6db0bb09b84f0d165da42c0fb11 100644 (file)
@@ -24,17 +24,13 @@ public class Ticket1506_TestContainer implements Container {
 \r
     private void loadItems() {\r
         final PropertysetItem item1 = new PropertysetItem();\r
-        item1.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>(\r
-                "value 1", String.class));\r
-        item1.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>(\r
-                "name 1", String.class));\r
+        item1.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>("value 1", String.class));\r
+        item1.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>("name 1", String.class));\r
         items.put(ITEM_1_ID, item1);\r
 \r
         final PropertysetItem item2 = new PropertysetItem();\r
-        item2.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>(\r
-                "value 2", String.class));\r
-        item2.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>(\r
-                "name 2", String.class));\r
+        item2.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>("value 2", String.class));\r
+        item2.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>("name 2", String.class));\r
         items.put(ITEM_2_ID, item2);\r
     }\r
 \r
@@ -105,18 +101,15 @@ public class Ticket1506_TestContainer implements Container {
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeItem(Object itemId)\r
-            throws UnsupportedOperationException {\r
+    public boolean removeItem(Object itemId) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean addContainerProperty(Object propertyId, Class<?> type,\r
-            Object defaultValue) throws UnsupportedOperationException {\r
+    public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeContainerProperty(Object propertyId)\r
-            throws UnsupportedOperationException {\r
+    public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
index c39454027ac472d495b735c40c1b2d5ad5edc138..121e30009c8a7aeccb413b2ba76deea876191522 100644 (file)
@@ -25,10 +25,8 @@ public class Ticket1506_TestContainer2 implements Container {
     private void loadItems() {\r
         for (int i = 1; i < 15; i++) {\r
             final PropertysetItem item = new PropertysetItem();\r
-            item.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>(\r
-                    "value " + i, String.class));\r
-            item.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>(\r
-                    "name " + i, String.class));\r
+            item.addItemProperty(PROPERTY_1_ID, new ObjectProperty<String>("value " + i, String.class));\r
+            item.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>("name " + i, String.class));\r
             items.put(String.valueOf(i), item);\r
         }\r
     }\r
@@ -97,18 +95,15 @@ public class Ticket1506_TestContainer2 implements Container {
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeItem(Object itemId)\r
-            throws UnsupportedOperationException {\r
+    public boolean removeItem(Object itemId) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean addContainerProperty(Object propertyId, Class<?> type,\r
-            Object defaultValue) throws UnsupportedOperationException {\r
+    public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeContainerProperty(Object propertyId)\r
-            throws UnsupportedOperationException {\r
+    public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
index b82c8469adc90021174ffe01ed3709dc5b714d41..39fb91b6eb0cc513ae6a6bd7b1576cda62c114ae 100644 (file)
@@ -17,8 +17,7 @@ public class Ticket1572 extends com.vaadin.Application {
     @Override\r
     public void init() {\r
 \r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         Panel p = new Panel("Test wrapper for gridlayout margin/spacing");\r
index 6780b3c9de56324ccbdf4809a18002d694d595fa..0be28d08bc8da285baf940d7672cc45be116d23f 100644 (file)
@@ -17,8 +17,7 @@ public class Ticket1581 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.addComponent(new Label("Test the second issue in ticket #1581"));\r
index 5a2bf0c793b2cbe260db4fce682a95f1fef230a7..88519ee64b7085a826a42fe293c8d22048dc24b0 100644 (file)
@@ -29,13 +29,9 @@ public class Ticket1589 extends Application {
 \r
         w.addURIHandler(res);\r
 \r
-        w.addComponent(new Link(\r
-                "Test (without Content-Disposition, should suggest generatedFile.png when saving, browser default for actual disposition)",\r
-                new ExternalResource("myresource")));\r
+        w.addComponent(new Link("Test (without Content-Disposition, should suggest generatedFile.png when saving, browser default for actual disposition)", new ExternalResource("myresource")));\r
 \r
-        w.addComponent(new Link(\r
-                "Test (with Content-Disposition, should popup download dialog that suggests  filename downloadedPNG.png)",\r
-                new ExternalResource("myresource_download")));\r
+        w.addComponent(new Link("Test (with Content-Disposition, should popup download dialog that suggests  filename downloadedPNG.png)", new ExternalResource("myresource_download")));\r
     }\r
 }\r
 \r
@@ -57,8 +53,7 @@ class MyDynamicResource implements URIHandler {
         }\r
 \r
         // Create an image and draw some background on it.\r
-        BufferedImage image = new BufferedImage(200, 200,\r
-                BufferedImage.TYPE_INT_RGB);\r
+        BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);\r
         Graphics drawable = image.getGraphics();\r
         drawable.setColor(Color.lightGray);\r
         drawable.fillRect(0, 0, 200, 200);\r
@@ -77,14 +72,11 @@ class MyDynamicResource implements URIHandler {
             ImageIO.write(image, "png", imagebuffer);\r
 \r
             // Return a stream from the buffer.\r
-            ByteArrayInputStream istream = new ByteArrayInputStream(\r
-                    imagebuffer.toByteArray());\r
-            DownloadStream downloadStream = new DownloadStream(istream,\r
-                    "image/png", "generatedFile.png");\r
+            ByteArrayInputStream istream = new ByteArrayInputStream(imagebuffer.toByteArray());\r
+            DownloadStream downloadStream = new DownloadStream(istream, "image/png", "generatedFile.png");\r
 \r
             if (relativeUri.startsWith("myresource_download")) {\r
-                downloadStream.setParameter("Content-Disposition",\r
-                        "attachment; filename=\"downloadedPNG.png\"");\r
+                downloadStream.setParameter("Content-Disposition", "attachment; filename=\"downloadedPNG.png\"");\r
             }\r
             return downloadStream;\r
         } catch (IOException e) {\r
index 20f1d4d98515eeaa83698a79e79e5616d3aa920c..b41609083486be59841e4100a9ae5cd061366010 100644 (file)
@@ -41,39 +41,33 @@ public class Ticket1598 extends Application {
         MenuItem firstSubItem1 = first.getChildren().get(1);
 
         for (int i = 0; i < 3; i++) {
-            firstSubItem1.addItem(new String("Subsubmenu item" + i), null,
-                    new Command() {
-
-                        public void menuSelected(MenuItem selected) {
-                            main.showNotification("Action "
-                                    + selected.getText());
-                        }
-                    });
+            firstSubItem1.addItem(new String("Subsubmenu item" + i), null, new Command() {
+
+                public void menuSelected(MenuItem selected) {
+                    main.showNotification("Action " + selected.getText());
+                }
+            });
         }
         MenuItem firstSubItem2 = first.getChildren().get(3);
 
         for (int i = 0; i < 3; i++) {
-            firstSubItem2.addItem(new String("Subsubmenu item" + i), null,
-                    new Command() {
-
-                        public void menuSelected(MenuItem selected) {
-                            main.showNotification("Action "
-                                    + selected.getText());
-                        }
-                    });
+            firstSubItem2.addItem(new String("Subsubmenu item" + i), null, new Command() {
+
+                public void menuSelected(MenuItem selected) {
+                    main.showNotification("Action " + selected.getText());
+                }
+            });
         }
 
         MenuItem second = menuBar.getItems().get(1);
 
         for (int i = 0; i < 5; i++) {
-            second.addItem(new String("Second submenu item" + i), null,
-                    new Command() {
-
-                        public void menuSelected(MenuItem selected) {
-                            main.showNotification("Action "
-                                    + selected.getText());
-                        }
-                    });
+            second.addItem(new String("Second submenu item" + i), null, new Command() {
+
+                public void menuSelected(MenuItem selected) {
+                    main.showNotification("Action " + selected.getText());
+                }
+            });
         }
 
         MenuItem third = menuBar.getItems().get(2);
index 8bba5a103e4129afb6f04bb02f1ea60edee87cf7..43669da762470acbd603a42a6b760b372b3bdb81 100644 (file)
@@ -12,23 +12,18 @@ public class Ticket1659 extends Application {
     public void init() {
         final Window mainWin = new Window();
         setMainWindow(mainWin);
-        mainWin.addComponent(new Button(
-                "Change URI using Application.getURL()",
-                new Button.ClickListener() {
+        mainWin.addComponent(new Button("Change URI using Application.getURL()", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        mainWin.open(new ExternalResource(getURL() + "#"
-                                + System.currentTimeMillis()));
-                    }
-                }));
-        mainWin.addComponent(new Button("Change URI uring Window.getURL()",
-                new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                mainWin.open(new ExternalResource(getURL() + "#" + System.currentTimeMillis()));
+            }
+        }));
+        mainWin.addComponent(new Button("Change URI uring Window.getURL()", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        mainWin.open(new ExternalResource(mainWin.getURL()
-                                + "#" + System.currentTimeMillis()));
-                    }
-                }));
+            public void buttonClick(ClickEvent event) {
+                mainWin.open(new ExternalResource(mainWin.getURL() + "#" + System.currentTimeMillis()));
+            }
+        }));
     }
 
 }
index e7b98a4c995c95f0d3f4dee7eafdd3b81ddfa7b3..d3734f7ba049c407e0835f2c86d87e24b86f998a 100644 (file)
@@ -14,8 +14,7 @@ public class Ticket1663 extends com.vaadin.Application {
 \r
         TextField tf = new TextField("First name");\r
         tf.setDescription("The first name is used for the administration user interfaces only.");\r
-        tf.setComponentError(new SystemError(\r
-                "You must enter only one first name."));\r
+        tf.setComponentError(new SystemError("You must enter only one first name."));\r
 \r
         main.addComponent(tf);\r
     }\r
index f0d0476d0815fc7651124e15cb4b81b2f4740177..dbeabfbef0330c4aa52bca3fda2adc75b24b1cbf 100644 (file)
@@ -5,7 +5,6 @@ import java.util.Iterator;
 import com.vaadin.data.Property;\r
 import com.vaadin.data.Property.ValueChangeEvent;\r
 import com.vaadin.data.util.MethodProperty;\r
-import com.vaadin.terminal.Sizeable;\r
 import com.vaadin.terminal.SystemError;\r
 import com.vaadin.terminal.ThemeResource;\r
 import com.vaadin.ui.AbstractComponent;\r
@@ -13,16 +12,16 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;\r
 import com.vaadin.ui.ComponentContainer;\r
 import com.vaadin.ui.DateField;\r
-import com.vaadin.ui.ExpandLayout;\r
 import com.vaadin.ui.Form;\r
 import com.vaadin.ui.GridLayout;\r
+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.NativeSelect;\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
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1710 extends com.vaadin.Application {\r
@@ -32,102 +31,80 @@ public class Ticket1710 extends com.vaadin.Application {
 \r
         setTheme("tests-tickets");\r
 \r
-        OrderedLayout lo = new OrderedLayout();\r
+        VerticalLayout lo = new VerticalLayout();\r
         setMainWindow(new Window("#1710", lo));\r
         lo.setMargin(true);\r
         lo.setSpacing(true);\r
         lo.setWidth("100%");\r
 \r
         // Hiding controls\r
-        OrderedLayout hidingControls = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout hidingControls = new HorizontalLayout();\r
         lo.addComponent(hidingControls);\r
 \r
         // OrderedLayout\r
-        final OrderedLayout orderedLayout = new OrderedLayout();\r
-        LayoutTestingPanel oltp = new LayoutTestingPanel("OrderedLayout",\r
-                orderedLayout);\r
-        hidingControls.addComponent(new Button("OrderedLayout",\r
-                new MethodProperty<Boolean>(oltp, "visible")));\r
+        final VerticalLayout orderedLayout = new VerticalLayout();\r
+        LayoutTestingPanel oltp = new LayoutTestingPanel("OrderedLayout", orderedLayout);\r
+        hidingControls.addComponent(new Button("OrderedLayout", new MethodProperty<Boolean>(oltp, "visible")));\r
         lo.addComponent(oltp);\r
         orderedLayout.setSpacing(false);\r
         addFields(orderedLayout);\r
-        final Button orientationButton = new Button("horizontal orientation",\r
-                false);\r
-        orientationButton.addListener(new Property.ValueChangeListener() {\r
-            public void valueChange(ValueChangeEvent event) {\r
-                orderedLayout.setOrientation(orientationButton.booleanValue() ? OrderedLayout.ORIENTATION_HORIZONTAL\r
-                        : OrderedLayout.ORIENTATION_VERTICAL);\r
-            }\r
-        });\r
-        orientationButton.setImmediate(true);\r
-        oltp.controls.addComponent(orientationButton);\r
 \r
         // GridLayout\r
         GridLayout grid = new GridLayout(1, 1);\r
         Panel g1tp = new LayoutTestingPanel("Gridlayout with 1 column", grid);\r
-        hidingControls.addComponent(new Button("GridLayout (1col)",\r
-                new MethodProperty<Boolean>(g1tp, "visible")));\r
+        hidingControls.addComponent(new Button("GridLayout (1col)", new MethodProperty<Boolean>(g1tp, "visible")));\r
         g1tp.setVisible(false);\r
         lo.addComponent(g1tp);\r
         grid.setSpacing(true);\r
         addFields(grid);\r
         GridLayout grid2 = new GridLayout(2, 1);\r
         Panel g2tp = new LayoutTestingPanel("Gridlayout with 2 columns", grid2);\r
-        hidingControls.addComponent(new Button("GridLayout (2cols)",\r
-                new MethodProperty<Boolean>(g2tp, "visible")));\r
+        hidingControls.addComponent(new Button("GridLayout (2cols)", new MethodProperty<Boolean>(g2tp, "visible")));\r
         g2tp.setVisible(false);\r
         lo.addComponent(g2tp);\r
         grid2.setSpacing(true);\r
         addFields(grid2);\r
 \r
         // ExpandLayout\r
-        ExpandLayout el = new ExpandLayout();\r
-        Panel elp = new LayoutTestingPanel(\r
-                "ExpandLayout width first component expanded", el);\r
-        hidingControls.addComponent(new Button("ExpandLayout (vertical)",\r
-                new MethodProperty<Boolean>(elp, "visible")));\r
+        VerticalLayout el = new VerticalLayout();\r
+        Panel elp = new LayoutTestingPanel("ExpandLayout width first component expanded", el);\r
+        hidingControls.addComponent(new Button("ExpandLayout (vertical)", new MethodProperty<Boolean>(elp, "visible")));\r
         elp.setVisible(false);\r
-        el.setHeight(700);\r
+        el.setHeight("700px");\r
         addFields(el);\r
         Component firstComponent = el.getComponentIterator().next();\r
         firstComponent.setSizeFull();\r
-        el.expand(firstComponent);\r
+        el.setExpandRatio(firstComponent, 1);\r
         lo.addComponent(elp);\r
-        ExpandLayout elh = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-        Panel elhp = new LayoutTestingPanel(\r
-                "ExpandLayout width first component expanded; horizontal", elh);\r
-        hidingControls.addComponent(new Button("ExpandLayout (horizontal)",\r
-                new MethodProperty<Boolean>(elhp, "visible")));\r
+        HorizontalLayout elh = new HorizontalLayout();\r
+        Panel elhp = new LayoutTestingPanel("ExpandLayout width first component expanded; horizontal", elh);\r
+        hidingControls.addComponent(new Button("ExpandLayout (horizontal)", new MethodProperty<Boolean>(elhp, "visible")));\r
         elhp.setVisible(false);\r
         elhp.setScrollable(true);\r
-        elh.setWidth(2000);\r
-        elh.setHeight(100);\r
+        elh.setWidth("2000px");\r
+        elh.setHeight("100px");\r
         addFields(elh);\r
         Component firstComponentElh = elh.getComponentIterator().next();\r
         firstComponentElh.setSizeFull();\r
-        elh.expand(firstComponentElh);\r
+        elh.setExpandRatio(firstComponentElh, 1);\r
         lo.addComponent(elhp);\r
 \r
         // CustomLayout\r
-        OrderedLayout cl = new OrderedLayout();\r
+        VerticalLayout cl = new VerticalLayout();\r
         Panel clp = new LayoutTestingPanel("CustomLayout", cl);\r
-        hidingControls.addComponent(new Button("CustomLayout",\r
-                new MethodProperty<Boolean>(clp, "visible")));\r
+        hidingControls.addComponent(new Button("CustomLayout", new MethodProperty<Boolean>(clp, "visible")));\r
         clp.setVisible(false);\r
         lo.addComponent(clp);\r
         cl.addComponent(new Label("<<< Add customlayout testcase here >>>"));\r
 \r
         // Form\r
         Panel formPanel = new Panel("Form");\r
-        hidingControls.addComponent(new Button("Form",\r
-                new MethodProperty<Boolean>(formPanel, "visible")));\r
+        hidingControls.addComponent(new Button("Form", new MethodProperty<Boolean>(formPanel, "visible")));\r
         formPanel.setVisible(false);\r
         formPanel.addComponent(getFormPanelExample());\r
         lo.addComponent(formPanel);\r
 \r
-        for (Iterator<Component> i = hidingControls.getComponentIterator(); i\r
-                .hasNext();) {\r
+        for (Iterator<Component> i = hidingControls.getComponentIterator(); i.hasNext();) {\r
             ((AbstractComponent) i.next()).setImmediate(true);\r
         }\r
 \r
@@ -200,16 +177,14 @@ public class Ticket1710 extends com.vaadin.Application {
         TextField t5 = new TextField();\r
         t5.setValue("Without caption,  WIDE");\r
         t5.setComponentError(new SystemError("Error"));\r
-        t5.setWidth(100);\r
-        t5.setWidthUnits(Sizeable.UNITS_PERCENTAGE);\r
+        t5.setWidth("100%");\r
         lo.addComponent(t5);\r
 \r
         TextField t6 = new TextField();\r
         t6.setValue("Without caption, With required, WIDE");\r
         t6.setComponentError(new SystemError("Error"));\r
         t6.setRequired(true);\r
-        t6.setWidth(100);\r
-        t6.setWidthUnits(Sizeable.UNITS_PERCENTAGE);\r
+        t6.setWidth("100%");\r
         lo.addComponent(t6);\r
 \r
         TextField t7 = new TextField();\r
@@ -219,8 +194,7 @@ public class Ticket1710 extends com.vaadin.Application {
         t7.setIcon(new ThemeResource("../runo/icons/16/ok.png"));\r
         lo.addComponent(t7);\r
 \r
-        DateField d1 = new DateField(\r
-                "Datefield with caption and icon, next one without caption");\r
+        DateField d1 = new DateField("Datefield with caption and icon, next one without caption");\r
         d1.setComponentError(new SystemError("Error"));\r
         d1.setRequired(true);\r
         d1.setIcon(new ThemeResource("../runo/icons/16/ok.png"));\r
@@ -236,20 +210,19 @@ public class Ticket1710 extends com.vaadin.Application {
 \r
         Layout testedLayout;\r
 \r
-        OrderedLayout controls = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout controls = new HorizontalLayout();\r
         Button marginLeft = new Button("m-left", false);\r
         Button marginRight = new Button("m-right", false);\r
         Button marginTop = new Button("m-top", false);\r
         Button marginBottom = new Button("m-bottom", false);\r
         Button spacing = new Button("spacing", false);\r
-        OrderedLayout testPanelLayout = new OrderedLayout();\r
+        VerticalLayout testPanelLayout = new VerticalLayout();\r
 \r
         LayoutTestingPanel(String caption, Layout layout) {\r
             super(caption);\r
-            OrderedLayout internalLayout = new OrderedLayout();\r
+            VerticalLayout internalLayout = new VerticalLayout();\r
             internalLayout.setWidth("100%");\r
-            setLayout(internalLayout);\r
+            setContent(internalLayout);\r
             testedLayout = layout;\r
             testPanelLayout.setWidth("100%");\r
             Panel controlWrapper = new Panel();\r
@@ -267,15 +240,11 @@ public class Ticket1710 extends com.vaadin.Application {
             controls.setSpacing(true);\r
             controls.setMargin(false);\r
             controls.addComponent(new Label("width"));\r
-            controls.addComponent(new TextField(new MethodProperty<Float>(\r
-                    testedLayout, "width")));\r
-            controls.addComponent(new Button("%", new MethodProperty<Boolean>(\r
-                    this, "widthPercents")));\r
+            controls.addComponent(new TextField(new MethodProperty<Float>(testedLayout, "width")));\r
+            controls.addComponent(new Button("%", new MethodProperty<Boolean>(this, "widthPercents")));\r
             controls.addComponent(new Label("height"));\r
-            controls.addComponent(new TextField(new MethodProperty<Float>(\r
-                    testedLayout, "height")));\r
-            controls.addComponent(new Button("%", new MethodProperty<Boolean>(\r
-                    this, "heightPercents")));\r
+            controls.addComponent(new TextField(new MethodProperty<Float>(testedLayout, "height")));\r
+            controls.addComponent(new Button("%", new MethodProperty<Boolean>(this, "heightPercents")));\r
             controls.addComponent(marginLeft);\r
             controls.addComponent(marginRight);\r
             controls.addComponent(marginTop);\r
@@ -302,12 +271,12 @@ public class Ticket1710 extends com.vaadin.Application {
             testedLayout.setStyleName("tested-layout");\r
             setStyleName("layout-testing-panel");\r
 \r
-            for (Iterator<Component> i = controls.getComponentIterator(); i\r
-                    .hasNext();) {\r
+            for (Iterator<Component> i = controls.getComponentIterator(); i.hasNext();) {\r
                 ((AbstractComponent) i.next()).setImmediate(true);\r
             }\r
         }\r
 \r
+        @SuppressWarnings("deprecation")\r
         private void addAlignmentControls() {\r
             if (!(testedLayout instanceof Layout.AlignmentHandler)) {\r
                 return;\r
@@ -324,33 +293,22 @@ public class Ticket1710 extends com.vaadin.Application {
             vAlign.setNullSelectionAllowed(false);\r
 \r
             vAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_TOP));\r
-            vAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_TOP), "top");\r
-            vAlign.addItem(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_VERTICAL_CENTER));\r
-            vAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_VERTICAL_CENTER),\r
-                    "center");\r
+            vAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_TOP), "top");\r
+            vAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_VERTICAL_CENTER));\r
+            vAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_VERTICAL_CENTER), "center");\r
             vAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_BOTTOM));\r
-            vAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_BOTTOM), "bottom");\r
+            vAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_BOTTOM), "bottom");\r
 \r
             hAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_LEFT));\r
-            hAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_LEFT), "left");\r
-            hAlign.addItem(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER));\r
-            hAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER),\r
-                    "center");\r
+            hAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_LEFT), "left");\r
+            hAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER));\r
+            hAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER), "center");\r
             hAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT));\r
-            hAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
+            hAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
 \r
             Property.ValueChangeListener alignmentChangeListener = new Property.ValueChangeListener() {\r
                 public void valueChange(ValueChangeEvent event) {\r
-                    updateAlignments(((Integer) hAlign.getValue()).intValue(),\r
-                            ((Integer) vAlign.getValue()).intValue());\r
+                    updateAlignments(((Integer) hAlign.getValue()).intValue(), ((Integer) vAlign.getValue()).intValue());\r
                 }\r
 \r
             };\r
@@ -365,63 +323,32 @@ public class Ticket1710 extends com.vaadin.Application {
             controls.addComponent(lAlign);\r
             lAlign.setNullSelectionAllowed(false);\r
             lAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_LEFT));\r
-            lAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_LEFT), "left");\r
-            lAlign.addItem(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER));\r
-            lAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER),\r
-                    "center");\r
+            lAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_LEFT), "left");\r
+            lAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER));\r
+            lAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_HORIZONTAL_CENTER), "center");\r
             lAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT));\r
-            lAlign.setItemCaption(new Integer(\r
-                    Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
+            lAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
 \r
             lAlign.addListener(new Property.ValueChangeListener() {\r
                 public void valueChange(ValueChangeEvent event) {\r
-                    testPanelLayout.setComponentAlignment(testedLayout,\r
-                            ((Integer) lAlign.getValue()).intValue(),\r
-                            OrderedLayout.ALIGNMENT_TOP);\r
+                    testPanelLayout.setComponentAlignment(testedLayout, ((Integer) lAlign.getValue()).intValue(), VerticalLayout.ALIGNMENT_TOP);\r
                 }\r
             });\r
         }\r
 \r
+        @SuppressWarnings("deprecation")\r
         private void updateAlignments(int h, int v) {\r
-            for (Iterator<Component> i = testedLayout.getComponentIterator(); i\r
-                    .hasNext();) {\r
-                ((Layout.AlignmentHandler) testedLayout).setComponentAlignment(\r
-                        i.next(), h, v);\r
+            for (Iterator<Component> i = testedLayout.getComponentIterator(); i.hasNext();) {\r
+                ((Layout.AlignmentHandler) testedLayout).setComponentAlignment(i.next(), h, v);\r
             }\r
         }\r
 \r
         private void updateMarginsAndSpacing() {\r
-            testedLayout.setMargin(\r
-                    ((Boolean) marginTop.getValue()).booleanValue(),\r
-                    ((Boolean) marginRight.getValue()).booleanValue(),\r
-                    ((Boolean) marginBottom.getValue()).booleanValue(),\r
-                    ((Boolean) marginLeft.getValue()).booleanValue());\r
+            testedLayout.setMargin(((Boolean) marginTop.getValue()).booleanValue(), ((Boolean) marginRight.getValue()).booleanValue(), ((Boolean) marginBottom.getValue()).booleanValue(), ((Boolean) marginLeft.getValue()).booleanValue());\r
             if (testedLayout instanceof Layout.SpacingHandler) {\r
-                ((Layout.SpacingHandler) testedLayout)\r
-                        .setSpacing(((Boolean) spacing.getValue())\r
-                                .booleanValue());\r
+                ((Layout.SpacingHandler) testedLayout).setSpacing(((Boolean) spacing.getValue()).booleanValue());\r
             }\r
         }\r
 \r
-        public boolean getWidthPercents() {\r
-            return testedLayout.getWidthUnits() == Sizeable.UNITS_PERCENTAGE;\r
-        }\r
-\r
-        public void setWidthPercents(boolean b) {\r
-            testedLayout.setWidthUnits(b ? Sizeable.UNITS_PERCENTAGE\r
-                    : Sizeable.UNITS_PIXELS);\r
-        }\r
-\r
-        public boolean getHeightPercents() {\r
-            return testedLayout.getHeightUnits() == Sizeable.UNITS_PERCENTAGE;\r
-        }\r
-\r
-        public void setHeightPercents(boolean b) {\r
-            testedLayout.setHeightUnits(b ? Sizeable.UNITS_PERCENTAGE\r
-                    : Sizeable.UNITS_PIXELS);\r
-        }\r
     }\r
 }\r
index cc44e43c46f3901856499cfaf12faee7735c0fa1..5e29182b7ac1e255e0e95782343a89badb59da64 100644 (file)
@@ -6,9 +6,9 @@ import com.vaadin.terminal.ClassResource;
 import com.vaadin.terminal.DownloadStream;
 import com.vaadin.terminal.Resource;
 import com.vaadin.ui.Embedded;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Panel;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1737 extends Application {
@@ -28,20 +28,16 @@ public class Ticket1737 extends Application {
     @Override
     public void init() {
 
-        final Window main = new Window(getClass().getName().substring(
-                getClass().getName().lastIndexOf(".") + 1));
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));
         setMainWindow(main);
 
-        ExpandLayout el = new ExpandLayout();
+        VerticalLayout el = new VerticalLayout();
         main.setLayout(el);
 
         Panel p = new Panel("Test panel");
         p.setSizeFull();
 
-        p.addComponent(new Label(
-                "Second component is embedded with a slow resource "
-                        + "and thus should break layout if Embedded cannot"
-                        + " request re-layout after load."));
+        p.addComponent(new Label("Second component is embedded with a slow resource " + "and thus should break layout if Embedded cannot" + " request re-layout after load."));
 
         Embedded em = new Embedded("TestEmbedded", slowRes);
 
index a65a601175dad8584ac5e1cc39500f6e00631497..f2c2ab0680f1497a5599193847d6bb073a9c056a 100644 (file)
@@ -8,8 +8,7 @@ public class Ticket1767 extends com.vaadin.Application {
     @Override\r
     public void init() {\r
 \r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         ComboBox cb = new ComboBox(" '<' item is not seen in populist?");\r
index 68e00e7f94d3e62dd3bede3c41c16bae23a4ef60..e8c1ea8b1f0ba98c49278757a6e3568e88a395be 100644 (file)
@@ -11,8 +11,7 @@ public class Ticket1772 extends com.vaadin.Application {
     @Override\r
     public void init() {\r
 \r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         Button b = new Button("Add content");\r
@@ -26,8 +25,7 @@ public class Ticket1772 extends com.vaadin.Application {
 \r
             public void buttonClick(ClickEvent event) {\r
 \r
-                gridLayout\r
-                        .addComponent(new TextField("Content " + (++counter)));\r
+                gridLayout.addComponent(new TextField("Content " + (++counter)));\r
 \r
             }\r
         });\r
index 8d8740895de4542b956852f5e7570eb5c5f2e0bf..9c4a32eb52ec9dc250bdd5aff85ccf5783ace377 100644 (file)
@@ -39,8 +39,7 @@ public class Ticket1804 extends com.vaadin.Application {
         s = new Select("Testcase from the ticket #1804");\r
         s.setNullSelectionAllowed(false);\r
         s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));\r
-        s.addValidator(new EmptyStringValidator(\r
-                "Selection required for test-field"));\r
+        s.addValidator(new EmptyStringValidator("Selection required for test-field"));\r
         s.setRequired(true);\r
         listOfAllFields.add(s);\r
 \r
@@ -50,22 +49,18 @@ public class Ticket1804 extends com.vaadin.Application {
         s.setRequired(true);\r
         listOfAllFields.add(s);\r
 \r
-        s = new Select(\r
-                "Testcase from the ticket #1804, but with required=false");\r
+        s = new Select("Testcase from the ticket #1804, but with required=false");\r
         s.setNullSelectionAllowed(false);\r
         s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));\r
-        s.addValidator(new EmptyStringValidator(\r
-                "Selection required for test-field"));\r
+        s.addValidator(new EmptyStringValidator("Selection required for test-field"));\r
         listOfAllFields.add(s);\r
 \r
-        s = new Select(\r
-                "Testcase from the ticket #1804, but without validator and with required=false");\r
+        s = new Select("Testcase from the ticket #1804, but without validator and with required=false");\r
         s.setNullSelectionAllowed(false);\r
         s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));\r
         listOfAllFields.add(s);\r
 \r
-        s = new Select(\r
-                "Required=true, custom error message, null selection not allowed");\r
+        s = new Select("Required=true, custom error message, null selection not allowed");\r
         s.setRequired(true);\r
         s.setNullSelectionAllowed(false);\r
         s.setPropertyDataSource(new MethodProperty<String>(new TestPojo(), "id"));\r
@@ -92,16 +87,14 @@ public class Ticket1804 extends com.vaadin.Application {
 \r
             public void buttonClick(ClickEvent event) {\r
                 StringBuffer msg = new StringBuffer();\r
-                for (Iterator<Select> i = listOfAllFields.iterator(); i\r
-                        .hasNext();) {\r
+                for (Iterator<Select> i = listOfAllFields.iterator(); i.hasNext();) {\r
                     AbstractField af = i.next();\r
                     msg.append("<h1>" + af.getCaption() + "</h1>\n");\r
                     msg.append("Value=" + af.getValue() + "<br/>\n");\r
                     if (af.isValid()) {\r
                         msg.append("VALID\n<hr/>");\r
                     } else {\r
-                        msg.append("INVALID<br/><i>" + af.getErrorMessage()\r
-                                + "</i><hr/>");\r
+                        msg.append("INVALID<br/><i>" + af.getErrorMessage() + "</i><hr/>");\r
                     }\r
                 }\r
                 Window w = new Window("Status of the fields");\r
index ef8090485484cc1d0420db789b6041f35078ebfb..f8906daaa707ad1058adb73bdbc9c474d2bf18f1 100644 (file)
@@ -12,16 +12,11 @@ public class Ticket1805 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
         main.getLayout().setMargin(false);\r
 \r
-        Label description = new Label(\r
-                "GridLayout with 100% (no height), is wanted to "\r
-                        + "share all available width with columns "\r
-                        + "relatively to their natural width. And it "\r
-                        + "should still work with margins and spacings");\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
 \r
         final GridLayout grid = new GridLayout(4, 1);\r
@@ -48,8 +43,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,\r
-                GridLayout.ALIGNMENT_TOP);\r
+        grid.setComponentAlignment(label, GridLayout.ALIGNMENT_RIGHT, GridLayout.ALIGNMENT_TOP);\r
         main.addComponent(grid);\r
     }\r
 \r
index f3406a915593397313096729aee48199b4d07b7d..b592cdc4ef04afc62d1411fe77595a162d5efd83 100644 (file)
@@ -10,36 +10,30 @@ public class Ticket1806 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         final ObjectProperty<String> prop = new ObjectProperty<String>("");\r
-        final TextField tf1 = new TextField(\r
-                "Buffered TextField bound to ObjectProperty");\r
+        final TextField tf1 = new TextField("Buffered TextField bound to ObjectProperty");\r
         tf1.setWriteThrough(false);\r
         tf1.setReadThrough(false);\r
         tf1.setPropertyDataSource(prop);\r
         main.addComponent(tf1);\r
-        main.addComponent(new Button(\r
-                "This button does nothing (but flushes queued variable changes)"));\r
-        main.addComponent(new Button("Commit the field to property",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        tf1.commit();\r
-                    }\r
-                }));\r
-        main.addComponent(new Button("Show property value",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        main.showNotification("'" + prop.getValue() + "'");\r
-                    }\r
-                }));\r
-        main.addComponent(new Button("Show field value",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        main.showNotification("'" + tf1.getValue() + "'");\r
-                    }\r
-                }));\r
+        main.addComponent(new Button("This button does nothing (but flushes queued variable changes)"));\r
+        main.addComponent(new Button("Commit the field to property", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                tf1.commit();\r
+            }\r
+        }));\r
+        main.addComponent(new Button("Show property value", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                main.showNotification("'" + prop.getValue() + "'");\r
+            }\r
+        }));\r
+        main.addComponent(new Button("Show field value", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                main.showNotification("'" + tf1.getValue() + "'");\r
+            }\r
+        }));\r
     }\r
 }
\ No newline at end of file
index 307db4f47a12751e8d5e6a9b50d11eea3b2f95b2..e8e08188dffe2d555d639532e959abdeeedd0025 100644 (file)
@@ -21,26 +21,21 @@ public class Ticket1811 extends com.vaadin.Application {
         final Window main = new Window("#1811");\r
         setMainWindow(main);\r
 \r
-        Validator strLenValidator = new StringLengthValidator(\r
-                "String must be at least 3 chars long and non-null", 3, -1,\r
-                false);\r
+        Validator strLenValidator = new StringLengthValidator("String must be at least 3 chars long and non-null", 3, -1, false);\r
 \r
-        TextField tf1 = new TextField(\r
-                "Text field with default settings (required=false)");\r
+        TextField tf1 = new TextField("Text field with default settings (required=false)");\r
         listOfAllFields.add(tf1);\r
 \r
         TextField tf2 = new TextField("Text field with required=true");\r
         tf2.setRequired(true);\r
         listOfAllFields.add(tf2);\r
 \r
-        TextField tf3 = new TextField(\r
-                "Text field with required=true and strlen >= 3");\r
+        TextField tf3 = new TextField("Text field with required=true and strlen >= 3");\r
         tf3.setRequired(true);\r
         tf3.addValidator(strLenValidator);\r
         listOfAllFields.add(tf3);\r
 \r
-        TextField tf4 = new TextField(\r
-                "Text field with required=false (default) and strlen >= 3");\r
+        TextField tf4 = new TextField("Text field with required=false (default) and strlen >= 3");\r
         tf4.addValidator(strLenValidator);\r
         listOfAllFields.add(tf4);\r
 \r
@@ -56,15 +51,13 @@ public class Ticket1811 extends com.vaadin.Application {
 \r
             public void buttonClick(ClickEvent event) {\r
                 StringBuffer msg = new StringBuffer();\r
-                for (Iterator<TextField> i = listOfAllFields\r
-                        .iterator(); i.hasNext();) {\r
+                for (Iterator<TextField> i = listOfAllFields.iterator(); i.hasNext();) {\r
                     TextField tf = i.next();\r
                     msg.append("<h1>" + tf.getCaption() + "</h1>\n");\r
                     if (tf.isValid()) {\r
                         msg.append("VALID\n<hr/>");\r
                     } else {\r
-                        msg.append("INVALID<br/><i>" + tf.getErrorMessage()\r
-                                + "</i><hr/>");\r
+                        msg.append("INVALID<br/><i>" + tf.getErrorMessage() + "</i><hr/>");\r
                     }\r
                 }\r
                 Window w = new Window("Status of the fields");\r
index 6f06055fc4dd134451cb196bb9f657737e733a78..797e6c62281a786bacc191bb750c32219f44cf9c 100644 (file)
@@ -47,8 +47,7 @@ public class Ticket1819 extends com.vaadin.Application {
 \r
             public void buttonClick(ClickEvent event) {\r
                 StringBuffer msg = new StringBuffer();\r
-                for (Iterator<Select> i = listOfAllFields.iterator(); i\r
-                        .hasNext();) {\r
+                for (Iterator<Select> i = listOfAllFields.iterator(); i.hasNext();) {\r
                     AbstractField af = i.next();\r
                     msg.append("<h1>" + af.getCaption() + "</h1>\n");\r
                     msg.append("Value=" + af.getValue() + "<br/>\n");\r
index 985d52936b2f53b8d10abee91ba484e2e50d738f..ee389d7a334ca8540a004b850196459fe4be55ac 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.Button.ClickListener;\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
@@ -18,20 +18,17 @@ public class Ticket1834PanelScrolling extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
-        OrderedLayout currentState = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout currentState = new HorizontalLayout();\r
 \r
         currentState.addComponent(state);\r
         Button b = new Button("update");\r
         currentState.addComponent(b);\r
         b.addListener(new ClickListener() {\r
             public void buttonClick(ClickEvent event) {\r
-                state.setValue("ScrollTop: " + p.getScrollTop()\r
-                        + " ScrollLeft: " + p.getScrollLeft());\r
+                state.setValue("ScrollTop: " + p.getScrollTop() + " ScrollLeft: " + p.getScrollLeft());\r
             }\r
         });\r
         main.addComponent(currentState);\r
@@ -41,8 +38,7 @@ public class Ticket1834PanelScrolling extends com.vaadin.Application {
             public void buttonClick(ClickEvent event) {\r
                 p.setScrollLeft(p.getScrollLeft() + 50);\r
                 p.setScrollTop(p.getScrollTop() + 50);\r
-                state.setValue("ScrollTop: " + p.getScrollTop()\r
-                        + " ScrollLeft: " + p.getScrollLeft());\r
+                state.setValue("ScrollTop: " + p.getScrollTop() + " ScrollLeft: " + p.getScrollLeft());\r
             }\r
         });\r
 \r
@@ -72,10 +68,7 @@ public class Ticket1834PanelScrolling extends com.vaadin.Application {
         p.setScrollable(true);\r
 \r
         for (int i = 0; i < ROWS; i++) {\r
-            p.addComponent(new Label(\r
-                    "Label"\r
-                            + i\r
-                            + "................................................................................................................."));\r
+            p.addComponent(new Label("Label" + i + "................................................................................................................."));\r
         }\r
 \r
         p.setHeight("300px");\r
index 74278af70bfa50485c91b1fdbf4aa6645aa45b86..81555d0e7e9b6de3a7312312713a28a947efff92 100644 (file)
@@ -6,9 +6,9 @@ import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.event.Action;
 import com.vaadin.event.Action.Handler;
 import com.vaadin.ui.Button;
-import com.vaadin.ui.ExpandLayout;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1857 extends Application implements Handler {
@@ -18,7 +18,7 @@ public class Ticket1857 extends Application implements Handler {
 
         setTheme("tests-tickets");
 
-        ExpandLayout el = new ExpandLayout();
+        VerticalLayout el = new VerticalLayout();
         Window main = new Window("Testcase for #1857", el);
         setMainWindow(main);
         el.setMargin(true);
@@ -26,13 +26,12 @@ public class Ticket1857 extends Application implements Handler {
 
         final Table t = new Table();
         el.addComponent(t);
-        el.expand(t);
+        el.setExpandRatio(t,1);
         t.setSizeFull();
         addContentsToTable(t);
         t.setStyleName("foo");
 
-        OrderedLayout footer = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout footer = new HorizontalLayout();
         el.addComponent(footer);
         footer.setSpacing(true);
 
@@ -57,14 +56,12 @@ public class Ticket1857 extends Application implements Handler {
                 if (((Boolean) cellStylesEnabler.getValue()).booleanValue()) {
                     t.setCellStyleGenerator(new Table.CellStyleGenerator() {
                         public String getStyle(Object itemId, Object propertyId) {
-                            Object cell = t.getContainerProperty(itemId,
-                                    propertyId).getValue();
+                            Object cell = t.getContainerProperty(itemId, propertyId).getValue();
                             if (!(cell instanceof Integer)) {
                                 return null;
                             }
                             int age = ((Integer) cell).intValue();
-                            return age > 65 ? "old" : (age < 18 ? "young"
-                                    : null);
+                            return age > 65 ? "old" : (age < 18 ? "young" : null);
                         }
                     });
                 } else {
@@ -82,17 +79,11 @@ public class Ticket1857 extends Application implements Handler {
         t.addContainerProperty("Last name", String.class, "");
         t.addContainerProperty("Age", Integer.class, "");
 
-        String firstNames[] = { "Quentin", "Marc", "Peter", "David", "Mary",
-                "Jani", "Jane", "Brita" };
-        String lastNames[] = { "Heiskanen", "Bjorn", "Torwalds", "Autere",
-                "Smith", "Lindström" };
+        String firstNames[] = { "Quentin", "Marc", "Peter", "David", "Mary", "Jani", "Jane", "Brita" };
+        String lastNames[] = { "Heiskanen", "Bjorn", "Torwalds", "Autere", "Smith", "Lindström" };
 
         for (int i = 0; i < 1000; i++) {
-            t.addItem(new Object[] {
-                    firstNames[((int) (Math.random() * firstNames.length))],
-                    lastNames[((int) (Math.random() * lastNames.length))],
-                    new Integer((int) (Math.random() * 100) + 10) },
-                    new Integer(i));
+            t.addItem(new Object[] { firstNames[((int) (Math.random() * firstNames.length))], lastNames[((int) (Math.random() * lastNames.length))], new Integer((int) (Math.random() * 100) + 10) }, new Integer(i));
         }
     }
 
index 3b68146df34ec8482cea28e087a047f5d73eb5e3..481f93f2ea4366a98703d3ec3684cbf0415a0122 100644 (file)
@@ -10,8 +10,7 @@ public class Ticket1868 extends com.vaadin.Application {
 \r
         setMainWindow(new Window("#1868"));\r
 \r
-        Panel p = new Panel(\r
-                "This is a really long caption for the panel, too long in fact!");\r
+        Panel p = new Panel("This is a really long caption for the panel, too long in fact!");\r
         p.setWidth(300);\r
         p.setHeight(300);\r
 \r
index 452006b201183c0b4bee75e60aa0e66692c446c8..f21a843f55de80e9edc1ac3a1cf85984259e727f 100644 (file)
@@ -1,11 +1,10 @@
 package com.vaadin.tests.tickets;\r
 \r
-import java.util.LinkedList;\r
-\r
 import com.vaadin.ui.Button;\r
-import com.vaadin.ui.ExpandLayout;\r
 import com.vaadin.ui.GridLayout;\r
+import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Panel;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1869 extends com.vaadin.Application {\r
@@ -18,16 +17,15 @@ public class Ticket1869 extends com.vaadin.Application {
         lo.setMargin(true);\r
         lo.setSpacing(true);\r
 \r
-        ExpandLayout el = new ExpandLayout();\r
-        Panel elp = new Panel(\r
-                "Vertical ExpandLayout /w first component expanded", el);\r
+        VerticalLayout el = new VerticalLayout();\r
+        Panel elp = new Panel("Vertical ExpandLayout /w first component expanded", el);\r
         el.setHeight(1000);\r
         for (int i = 0; i < 3; i++) {\r
             Button b = new Button("x");\r
             el.addComponent(b);\r
             if (i == 0) {\r
                 b.setSizeFull();\r
-                el.expand(b);\r
+                el.setExpandRatio(b,1);\r
             }\r
         }\r
         lo.addComponent(elp);\r
@@ -35,16 +33,15 @@ public class Ticket1869 extends com.vaadin.Application {
         elp.setHeight(300);\r
         elp.setScrollable(true);\r
 \r
-        ExpandLayout elh = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
-        Panel elph = new Panel(\r
-                "Horizontal ExpandLayout /w first component expanded", elh);\r
+        HorizontalLayout elh = new HorizontalLayout();\r
+        Panel elph = new Panel("Horizontal ExpandLayout /w first component expanded", elh);\r
         elh.setWidth(1000);\r
         for (int i = 0; i < 3; i++) {\r
             Button b = new Button("x");\r
             elh.addComponent(b);\r
             if (i == 0) {\r
                 b.setSizeFull();\r
-                elh.expand(b);\r
+                elh.setExpandRatio(b,1);\r
             }\r
         }\r
         lo.addComponent(elph);\r
index 8de24cbdcf06e18201b1f0f533a89d89c06b7d8e..f06d3c27061be62e24ba439b7c2c44a6b2f3c411 100644 (file)
@@ -14,16 +14,17 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.Component;\r
-import com.vaadin.ui.ExpandLayout;\r
 import com.vaadin.ui.Field;\r
 import com.vaadin.ui.Form;\r
 import com.vaadin.ui.FormLayout;\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.TextField;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1878 extends Application {\r
@@ -48,22 +49,20 @@ public class Ticket1878 extends Application {
         gridLayout = createGL();\r
         formLayout = createForms();\r
 \r
-        switchToGridButton = new Button("Switch to GridLayout",\r
-                new ClickListener() {\r
+        switchToGridButton = new Button("Switch to GridLayout", new ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        changeLayout(switchToGridButton, gridLayout);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                changeLayout(switchToGridButton, gridLayout);\r
+            }\r
 \r
-                });\r
-        switchToOrderedButton = new Button("Switch to OrderedLayout",\r
-                new ClickListener() {\r
+        });\r
+        switchToOrderedButton = new Button("Switch to OrderedLayout", new ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        changeLayout(switchToOrderedButton, orderedLayout);\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                changeLayout(switchToOrderedButton, orderedLayout);\r
+            }\r
 \r
-                });\r
+        });\r
         switchToOrderedButton.setEnabled(false);\r
 \r
         switchToFormsButton = new Button("Switch to Form", new ClickListener() {\r
@@ -74,8 +73,7 @@ public class Ticket1878 extends Application {
 \r
         });\r
 \r
-        OrderedLayout buttonLayout = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout buttonLayout = new HorizontalLayout();\r
         buttonLayout.addComponent(switchToOrderedButton);\r
         buttonLayout.addComponent(switchToGridButton);\r
         buttonLayout.addComponent(switchToFormsButton);\r
@@ -89,25 +87,15 @@ public class Ticket1878 extends Application {
         GridLayout layout = new GridLayout(1, 5);\r
 \r
         GridLayout l1 = new GridLayout(1, 3);\r
-        createLayout(l1,\r
-                new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL),\r
-                "1000px", "150px", "100%", null, true);\r
-        createLayout(l1,\r
-                new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL),\r
-                "1000px", "150px", "50px", null, false);\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
         GridLayout l2 = new GridLayout(6, 1);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL),\r
-                "200px", "500px", true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL),\r
-                "200px", "500px", "100%", null, true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL),\r
-                "150px", "500px", true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL),\r
-                "150px", "500px", "100%", null, true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL),\r
-                "100px", "500px", true);\r
-        createLayout(l2, new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL),\r
-                "100px", "500px", "100%", null, true);\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
         layout.addComponent(l1);\r
         layout.addComponent(l2);\r
 \r
@@ -118,20 +106,15 @@ public class Ticket1878 extends Application {
         GridLayout layout = new GridLayout(1, 5);\r
 \r
         GridLayout l1 = new GridLayout(1, 3);\r
-        createLayout(l1, new GridLayout(8, 1), "1000px", "150px", "100%", null,\r
-                true);\r
-        createLayout(l1, new GridLayout(8, 1), "1000px", "150px", "50px", null,\r
-                false);\r
+        createLayout(l1, new GridLayout(8, 1), "1000px", "150px", "100%", null, true);\r
+        createLayout(l1, new GridLayout(8, 1), "1000px", "150px", "50px", null, false);\r
         GridLayout l2 = new GridLayout(6, 1);\r
         createLayout(l2, new GridLayout(1, 8), "200px", "500px", true);\r
-        createLayout(l2, new GridLayout(1, 8), "200px", "500px", "100%", null,\r
-                true);\r
+        createLayout(l2, new GridLayout(1, 8), "200px", "500px", "100%", null, true);\r
         createLayout(l2, new GridLayout(1, 8), "150px", "500px", true);\r
-        createLayout(l2, new GridLayout(1, 8), "150px", "500px", "100%", null,\r
-                true);\r
+        createLayout(l2, new GridLayout(1, 8), "150px", "500px", "100%", null, true);\r
         createLayout(l2, new GridLayout(1, 8), "100px", "500px", true);\r
-        createLayout(l2, new GridLayout(1, 8), "100px", "500px", "100%", null,\r
-                true);\r
+        createLayout(l2, new GridLayout(1, 8), "100px", "500px", "100%", null, true);\r
         layout.addComponent(l1);\r
         layout.addComponent(l2);\r
 \r
@@ -255,33 +238,27 @@ public class Ticket1878 extends Application {
         mainLayout.replaceComponent(l, newLayout);\r
     }\r
 \r
-    private static void createLayout(GridLayout parentLayout, Layout newLayout,\r
-            String w, String h, boolean align) {\r
+    private static void createLayout(GridLayout parentLayout, Layout newLayout, String w, String h, boolean align) {\r
         createLayout(parentLayout, newLayout, w, h, null, null, align);\r
     }\r
 \r
-    private static void createLayout(GridLayout parentLayout, Layout newLayout,\r
-            String w, String h, String componentWidth, String componentHeight,\r
-            boolean align) {\r
+    private static void createLayout(GridLayout parentLayout, Layout newLayout, String w, String h, String componentWidth, String componentHeight, boolean align) {\r
         int dir;\r
         String type;\r
-        if (newLayout instanceof ExpandLayout) {\r
-            dir = ((ExpandLayout) newLayout).getOrientation();\r
-            type = "EL";\r
+        if (newLayout instanceof VerticalLayout) {\r
+            dir = OrderedLayout.ORIENTATION_VERTICAL;\r
+            type = "OL";\r
         } else if (newLayout instanceof OrderedLayout) {\r
-            dir = ((OrderedLayout) newLayout).getOrientation();\r
+            dir = OrderedLayout.ORIENTATION_HORIZONTAL;\r
             type = "OL";\r
         } else {\r
-            dir = ((GridLayout) newLayout).getColumns() == 1 ? OrderedLayout.ORIENTATION_VERTICAL\r
-                    : OrderedLayout.ORIENTATION_HORIZONTAL;\r
+            dir = ((GridLayout) newLayout).getColumns() == 1 ? OrderedLayout.ORIENTATION_VERTICAL : OrderedLayout.ORIENTATION_HORIZONTAL;\r
             type = "GL";\r
         }\r
-        String dirText = (dir == OrderedLayout.ORIENTATION_HORIZONTAL ? "H"\r
-                : "V");\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"\r
-                + h + cWidth, newLayout);\r
+        Panel p = new Panel(type + "/" + dirText + alignText + " " + w + "x" + h + cWidth, newLayout);\r
 \r
         p.setWidth(w);\r
         p.setHeight(h);\r
@@ -289,15 +266,13 @@ public class Ticket1878 extends Application {
         newLayout.setSizeFull();\r
 \r
         String captions[] = new String[] { "TextField with caption", null };\r
-        Resource icons[] = new Resource[] {\r
-                new ThemeResource("icons/16/document-delete.png"), null };\r
+        Resource icons[] = new Resource[] { new ThemeResource("icons/16/document-delete.png"), null };\r
         boolean required[] = new boolean[] { true, false };\r
         TextField fields[][] = new TextField[captions.length][icons.length];\r
         for (int caption = 0; caption < captions.length; caption++) {\r
             for (int icon = 0; icon < icons.length; icon++) {\r
                 for (int req = 0; req < required.length; req++) {\r
-                    TextField tf = createTextFieldWithError(captions[caption],\r
-                            icons[icon], required[req]);\r
+                    TextField tf = createTextFieldWithError(captions[caption], icons[icon], required[req]);\r
 \r
                     fields[caption][icon] = tf;\r
                     if (componentWidth != null) {\r
@@ -313,9 +288,7 @@ public class Ticket1878 extends Application {
                     p.addComponent(tf);\r
 \r
                     if (align) {\r
-                        ((AlignmentHandler) newLayout).setComponentAlignment(\r
-                                tf, OrderedLayout.ALIGNMENT_RIGHT,\r
-                                OrderedLayout.ALIGNMENT_BOTTOM);\r
+                        ((AlignmentHandler) newLayout).setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_BOTTOM);\r
                     }\r
                 }\r
             }\r
@@ -380,8 +353,7 @@ public class Ticket1878 extends Application {
     //\r
     // }\r
 \r
-    private static TextField createTextFieldWithError(String caption,\r
-            Resource icon, boolean required) {\r
+    private static TextField createTextFieldWithError(String caption, Resource icon, boolean required) {\r
         TextField tf = new TextField();\r
         tf.setCaption(caption);\r
         tf.setIcon(icon);\r
index 2047b4698c4b4c63e4ab7def7a74a74fe13b18fe..1500d324c932fba903f064183327db35c7ea3c1c 100644 (file)
@@ -25,8 +25,7 @@ public class Ticket1900 extends Application {
             main.addComponent(f[i]);
             f[i].addListener(new Property.ValueChangeListener() {
                 public void valueChange(ValueChangeEvent event) {
-                    main.showNotification("Validity test", "Testcase " + j
-                            + " is " + (f[j].isValid() ? "valid" : "invalid"));
+                    main.showNotification("Validity test", "Testcase " + j + " is " + (f[j].isValid() ? "valid" : "invalid"));
                 }
             });
             f[i].addValidator(new ContainsValidator("1"));
@@ -42,12 +41,10 @@ public class Ticket1900 extends Application {
         f[2].setDescription("Field is non-empty, validators do not give validation error: *");
         f[2].setValue("valid 12");
 
-        f[3].setDescription("Field is non-empty, requiredError(null), validators "
-                + "give validation error: * ! (popup shows the validation error)");
+        f[3].setDescription("Field is non-empty, requiredError(null), validators " + "give validation error: * ! (popup shows the validation error)");
         f[3].setValue("invalid");
 
-        f[4].setDescription("Field is non-empty, requiredError(\"foo\"), validators "
-                + "give validation error: * ! (popup shows the validation error)");
+        f[4].setDescription("Field is non-empty, requiredError(\"foo\"), validators " + "give validation error: * ! (popup shows the validation error)");
         f[4].setValue("invalid");
         f[4].setRequiredError("The field must not be empty");
 
index 87ea8eeb1f5be56156fb0c57e49058183949392f..8240e7e9f4344a178cee228852d5a53f48c78ce4 100644 (file)
@@ -1,9 +1,11 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Button;
+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;
 
 public class Ticket1904 extends Application {
@@ -19,7 +21,12 @@ public class Ticket1904 extends Application {
     }
 
     private void addOL(String descr, String style, boolean horizontal) {
-        OrderedLayout ol = new OrderedLayout();
+        AbstractOrderedLayout ol;
+        if (horizontal) {
+            ol = new HorizontalLayout();
+        } else {
+            ol = new VerticalLayout();
+        }
         ol.setMargin(true);
         ol.setSpacing(true);
         if (style != null) {
@@ -33,9 +40,6 @@ public class Ticket1904 extends Application {
             }
             ol.addComponent(b);
         }
-        if (horizontal) {
-            ol.setOrientation(OrderedLayout.ORIENTATION_HORIZONTAL);
-        }
         getMainWindow().addComponent(ol);
     }
 
index 99763936647adbd9edf08ee71ab892a322cfccba..578aa103f4ab2715f3704fb7fa4b1683c6f6378f 100644 (file)
@@ -2,6 +2,7 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 import com.vaadin.terminal.UserError;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.Window;
@@ -11,17 +12,14 @@ public class Ticket1916 extends Application {
     @Override
     public void init() {
 
-        OrderedLayout test = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout test = new HorizontalLayout();
         test.setSizeFull();
 
         TextField tf = new TextField();
         tf.setComponentError(new UserError("Error message"));
 
         test.addComponent(tf);
-        test.setComponentAlignment(tf,
-                OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER,
-                OrderedLayout.ALIGNMENT_VERTICAL_CENTER);
+        test.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_HORIZONTAL_CENTER, OrderedLayout.ALIGNMENT_VERTICAL_CENTER);
 
         Window w = new Window("Test #1916", test);
         setMainWindow(w);
index bf9b826b38fe286a3bb447878c494e2d931546e3..02935f9ea19019ca2ca0fad14bb874eb83c5f2c4 100644 (file)
@@ -13,8 +13,7 @@ public class Ticket1919 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.setTheme("tests-tickets");\r
index f9477f9df00b56a034c987b4434a51afbb4077ec..4286a796c4b63b0f942be4cbeac0bbdc558211a6 100644 (file)
@@ -6,7 +6,7 @@ import com.vaadin.Application;
 import com.vaadin.terminal.ParameterHandler;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1921 extends Application implements ParameterHandler {
@@ -14,15 +14,15 @@ public class Ticket1921 extends Application implements ParameterHandler {
     int state = -1;
     int round = 1;
     Button button;
-    OrderedLayout outer, inner;
+    VerticalLayout outer, inner;
 
     @Override
     public void init() {
 
-        outer = new OrderedLayout();
+        outer = new VerticalLayout();
         setMainWindow(new Window("#1921", outer));
         setTheme("tests-tickets");
-        inner = new OrderedLayout();
+        inner = new VerticalLayout();
         outer.addComponent(inner);
         button = new Button("foo", this, "newState");
         inner.addComponent(button);
@@ -37,7 +37,7 @@ public class Ticket1921 extends Application implements ParameterHandler {
 
     public void newState() {
 
-        if (state >= 8) {
+        if (state >= 6) {
             state = 0;
             round++;
         } else {
@@ -77,28 +77,9 @@ public class Ticket1921 extends Application implements ParameterHandler {
             break;
 
         case 6:
-            inner.setOrientation(inner.getOrientation() == OrderedLayout.ORIENTATION_HORIZONTAL ? OrderedLayout.ORIENTATION_VERTICAL
-                    : OrderedLayout.ORIENTATION_HORIZONTAL);
-            getMainWindow()
-                    .showNotification(
-                            "inner swithed to "
-                                    + (inner.getOrientation() == OrderedLayout.ORIENTATION_HORIZONTAL ? "horizontal"
-                                            : "vertical"));
-            break;
-
-        case 7:
             outer.addComponent(new Label("Added at " + button.getCaption()));
             break;
 
-        case 8:
-            outer.setOrientation(outer.getOrientation() == OrderedLayout.ORIENTATION_HORIZONTAL ? OrderedLayout.ORIENTATION_VERTICAL
-                    : OrderedLayout.ORIENTATION_HORIZONTAL);
-            getMainWindow()
-                    .showNotification(
-                            "outer swithed to "
-                                    + (outer.getOrientation() == OrderedLayout.ORIENTATION_HORIZONTAL ? "horizontal"
-                                            : "vertical"));
-            break;
         }
     }
 
@@ -115,8 +96,7 @@ public class Ticket1921 extends Application implements ParameterHandler {
             int rr = Integer.parseInt(v[0]);
             int rs = Integer.parseInt(v[1]);
             if (rr < round || (rr == round && rs < state)) {
-                getMainWindow().showNotification(
-                        "Already past requested " + s[0]);
+                getMainWindow().showNotification("Already past requested " + s[0]);
                 return;
             }
             while (round < rr || state < rs) {
index cbbaed6c9d4c3691ed19c4147ef91881672ea408..6ba41cad8ba1418cd5ff7ec2b06fabfd6ea77c3e 100644 (file)
@@ -1,8 +1,8 @@
 package com.vaadin.tests.tickets;\r
 \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
 \r
 public class Ticket1923 extends com.vaadin.Application {\r
@@ -13,8 +13,7 @@ public class Ticket1923 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         p = new Panel("TestPanel 250x300");\r
@@ -22,10 +21,7 @@ public class Ticket1923 extends com.vaadin.Application {
         p.setScrollable(true);\r
         // p.setLayout(new GridLayout(1, 100));\r
         for (int i = 0; i < ROWS; i++) {\r
-            p.addComponent(new Label(\r
-                    "Label"\r
-                            + i\r
-                            + " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));\r
+            p.addComponent(new Label("Label" + i + " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));\r
         }\r
         // main.getLayout().setSizeFull();\r
 \r
@@ -38,25 +34,24 @@ public class Ticket1923 extends com.vaadin.Application {
 \r
         main.addComponent(p);\r
 \r
-        OrderedLayout ol = new OrderedLayout();\r
+        VerticalLayout ol = new VerticalLayout();\r
         p = new Panel("a");\r
         p.addComponent(new Label("Longer than caption"));\r
         ol.addComponent(p);\r
 \r
         main.addComponent(ol);\r
 \r
-        ol = new OrderedLayout();\r
+        ol = new VerticalLayout();\r
         p = new Panel("captionasdfjahsdjfh this should be clipped god damn it");\r
         // p.getLayout().setSizeFull();\r
         p.setWidth("50px");\r
         p.setHeight("100px");\r
-        p.addComponent(new Label(\r
-                "aasdfaasdfja dslkfj lakfdj lakjdf lkaj dflkaj ldfkj alsdfj laksdj flkajs dflkj sdfsadfasdfasd"));\r
+        p.addComponent(new Label("aasdfaasdfja dslkfj lakfdj lakjdf lkaj dflkaj ldfkj alsdfj laksdj flkajs dflkj sdfsadfasdfasd"));\r
         ol.addComponent(p);\r
 \r
         main.addComponent(ol);\r
 \r
-        ol = new OrderedLayout();\r
+        ol = new VerticalLayout();\r
         p = new Panel("300x-1");\r
         // p.getLayout().setSizeFull();\r
         p.setWidth("300px");\r
index 981fd9cd5cfc8d930e7fcdf1624ca8388e1fb5f5..db666299d11d5d03c6aa33c317f2b0c35189d4a7 100644 (file)
@@ -16,8 +16,7 @@ public class Ticket1924ThemeChanging extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         l.setStyleName("red");\r
index cd1b844976efe4adb72fc80c12270fed8ab7daa8..945c599ccad094ef6cf73693cde3e2fd789c89c7 100644 (file)
@@ -3,8 +3,8 @@ package com.vaadin.tests.tickets;
 import com.vaadin.Application;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1939 extends Application {
@@ -14,7 +14,7 @@ public class Ticket1939 extends Application {
         Window w = new Window(getClass().getName());
         setMainWindow(w);
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
         l.setWidth(400);
         l.setHeight(100);
         l.addComponent(new TextField("This one works fine"));
@@ -24,12 +24,11 @@ public class Ticket1939 extends Application {
         l.addComponent(t);
         w.addComponent(l);
 
-        w.addComponent(new Button("show me the bug",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        l.setWidth(-1);
-                    }
-                }));
+        w.addComponent(new Button("show me the bug", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                l.setWidth(-1);
+            }
+        }));
 
     }
 
index 129a761e1cbea498534a36ed92e7834dca904295..14419fd5078fd7dcb740a38797dcd0946a6a15ac 100644 (file)
@@ -1,8 +1,8 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1940 extends Application {
@@ -12,7 +12,7 @@ public class Ticket1940 extends Application {
         final Window w = new Window(getClass().getName());
         setMainWindow(w);
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
         l.setWidth(200);
         l.setHeight(-1);
         TextField t = new TextField();
index 43e7f10220187a7c7a1c5dcf9eeb4582ddf9640e..aea444848743b87dd71a32be57c2da2e64de8ded 100644 (file)
@@ -16,8 +16,7 @@ public class Ticket1953 extends Application {
     @Override
     public void init() {
 
-        final Window main = new Window(getClass().getName().substring(
-                getClass().getName().lastIndexOf(".") + 1));
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));
         setMainWindow(main);
 
         main.setTheme("tests-tickets");
index b89610c1f69ff90557fbc176331466e605eefd1c..bde7e848a8b0ea70d6b9766f9859a84f2a91c701 100644 (file)
@@ -4,12 +4,15 @@ import java.util.HashMap;
 import java.util.Map;\r
 \r
 import com.vaadin.Application;\r
+import com.vaadin.ui.AbstractOrderedLayout;\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
@@ -81,7 +84,7 @@ public class Ticket1966 extends Application {
         Panel p = new Panel("OrderedLayout");\r
         layout.addComponent(p);\r
 \r
-        OrderedLayout ol = new OrderedLayout();\r
+        AbstractOrderedLayout ol = new VerticalLayout();\r
         ol.setCaption("Horizontal");\r
         // ol.setWidth("100%");\r
 \r
@@ -96,7 +99,7 @@ public class Ticket1966 extends Application {
 \r
         /* VERTICAL */\r
 \r
-        ol = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        ol = new HorizontalLayout();\r
         ol.setCaption("Vertical");\r
 \r
         addButtons(ol);\r
@@ -116,9 +119,7 @@ public class Ticket1966 extends Application {
     }\r
 \r
     private Button getButton(Layout l, int hAlign, int vAlign) {\r
-        Button b = new Button("Narrow Button - "\r
-                + names.get(new Integer(hAlign)) + " - "\r
-                + names.get(new Integer(vAlign)));\r
+        Button b = new Button("Narrow Button - " + names.get(new Integer(hAlign)) + " - " + names.get(new Integer(vAlign)));\r
         b.setWidth("100px");\r
         ((AlignmentHandler) l).setComponentAlignment(b, hAlign, vAlign);\r
 \r
index 444eb5fea7e0cf07a4f33fb078b1cd039a82c9f7..af869a4071e661e3e4c4a87d38fe894e80b18d3c 100644 (file)
@@ -4,13 +4,15 @@ import java.util.HashMap;
 import java.util.Map;\r
 \r
 import com.vaadin.Application;\r
+import com.vaadin.ui.AbstractOrderedLayout;\r
 import com.vaadin.ui.Button;\r
-import com.vaadin.ui.ExpandLayout;\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
@@ -109,7 +111,7 @@ public class Ticket1966_2 extends Application {
         p.getLayout().setWidth("100%");\r
         layout.addComponent(p);\r
 \r
-        OrderedLayout ol = new OrderedLayout();\r
+        AbstractOrderedLayout ol = new VerticalLayout();\r
         // ol.setCaption("Horizontal");\r
         ol.setWidth("100%");\r
         addButtons(ol);\r
@@ -117,7 +119,7 @@ public class Ticket1966_2 extends Application {
 \r
         /* VERTICAL */\r
 \r
-        ol = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        ol = new HorizontalLayout();\r
         // ol.setCaption("Vertical");\r
         ol.setHeight(200);\r
         addButtons(ol);\r
@@ -134,7 +136,7 @@ public class Ticket1966_2 extends Application {
         p.getLayout().setWidth("500");\r
         p.getLayout().setHeight("400");\r
 \r
-        ExpandLayout el = new ExpandLayout(ExpandLayout.ORIENTATION_VERTICAL);\r
+        AbstractOrderedLayout el = new VerticalLayout();\r
         // el.setCaption("Horizontal");\r
         // el.setSizeUndefined();\r
         // el.setWidth("100%");\r
@@ -144,7 +146,7 @@ public class Ticket1966_2 extends Application {
         b = new Button("Wide button");\r
         b.setWidth("100%");\r
         // b.setHeight(200);\r
-        // el.expand(b);\r
+        // el.setExpandRatio(b,1);\r
         // el.addComponent(b);\r
 \r
         addButtons(el);\r
@@ -152,14 +154,14 @@ public class Ticket1966_2 extends Application {
 \r
         /* VERTICAL */\r
 \r
-        el = new ExpandLayout(ExpandLayout.ORIENTATION_HORIZONTAL);\r
+        el = new HorizontalLayout();\r
         // el.setHeight(400);\r
         // el.setWidth("100%");\r
         // el.setCaption("Vertical");\r
 \r
         addButtons(el);\r
         // b = new Button("High button");\r
-        // el.expand(b);\r
+        // el.setExpandRatio(b,1);\r
         // b.setHeight(100);\r
         // el.addComponent(b);\r
 \r
@@ -175,8 +177,7 @@ public class Ticket1966_2 extends Application {
     }\r
 \r
     private Button getButton(Layout l, int hAlign, int vAlign) {\r
-        Button b = new Button(names.get(new Integer(hAlign)) + " - "\r
-                + names.get(new Integer(vAlign)));\r
+        Button b = new Button(names.get(new Integer(hAlign)) + " - " + names.get(new Integer(vAlign)));\r
         // b.setWidth("100");\r
         ((AlignmentHandler) l).setComponentAlignment(b, hAlign, vAlign);\r
 \r
index 6cd552b6b22fb01a945d96a7e9b4d646ed8ab59e..c4bc05b1cbeee3c974b2232e64be33f6cf60b8ad 100644 (file)
@@ -7,6 +7,7 @@ import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.TextField;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1966_3 extends Application {\r
@@ -22,7 +23,7 @@ public class Ticket1966_3 extends Application {
     }\r
 \r
     private void createUI(GridLayout layout) {\r
-        OrderedLayout ol = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);\r
+        VerticalLayout ol = new VerticalLayout();\r
         Panel p = new Panel(ol);\r
         p.setWidth("300px");\r
         p.setHeight("300px");\r
@@ -32,16 +33,14 @@ public class Ticket1966_3 extends Application {
         tf.setWidth("100px");\r
 \r
         ol.addComponent(tf);\r
-        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT,\r
-                OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\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,\r
-                OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\r
 \r
         tf = new TextField("Short caption");\r
         tf.setComponentError(new UserError("error message"));\r
@@ -50,16 +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,\r
-                OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\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,\r
-                OrderedLayout.ALIGNMENT_TOP);\r
+        ol.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_RIGHT, OrderedLayout.ALIGNMENT_TOP);\r
 \r
         layout.addComponent(p);\r
     }\r
index a1528efc08f29476a0b4b7a64c5d803339e76480..6b8c84d8c4a11739c04b340ec499e68dd33b3df0 100644 (file)
@@ -5,17 +5,16 @@ import com.vaadin.tests.TestForTablesInitialColumnWidthLogicRendering;
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.TabSheet;\r
 import com.vaadin.ui.Table;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1969 extends com.vaadin.Application {\r
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.getLayout().setSizeFull();\r
@@ -23,19 +22,17 @@ public class Ticket1969 extends com.vaadin.Application {
         TabSheet ts = new TabSheet();\r
         ts.setSizeFull();\r
 \r
-        final Table t = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(7, 2000);\r
+        final Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(7, 2000);\r
         t.setSizeFull();\r
         ts.addTab(t, "Table, scrollins should not flash", null);\r
 \r
-        final Label testContent = new Label(\r
-                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        final Label testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
         ts.addTab(testContent);\r
 \r
-        final OrderedLayout actions = new OrderedLayout();\r
+        final VerticalLayout actions = new VerticalLayout();\r
 \r
         actions.setCaption("Test actions");\r
 \r
@@ -43,21 +40,18 @@ public class Ticket1969 extends com.vaadin.Application {
 \r
         Button b;\r
 \r
-        b = new Button(\r
-                "change introduction caption (should add * to tab name)",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        testContent.setCaption(testContent.getCaption() + "*");\r
-                    }\r
-                });\r
+        b = new Button("change introduction caption (should add * to tab name)", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                testContent.setCaption(testContent.getCaption() + "*");\r
+            }\r
+        });\r
         actions.addComponent(b);\r
 \r
-        b = new Button("change tab caption (should add * to tab name)",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        actions.setCaption(actions.getCaption() + "*");\r
-                    }\r
-                });\r
+        b = new Button("change tab caption (should add * to tab name)", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                actions.setCaption(actions.getCaption() + "*");\r
+            }\r
+        });\r
 \r
         actions.addComponent(b);\r
 \r
index 1442c9ea5b6beb6cb9d612cd66ed7efa568eb56f..771e573369550698b9018fc74c2baceb6fc043a9 100644 (file)
@@ -33,22 +33,18 @@ public class Ticket1970 extends Application {
         final Window w = new Window("Extra window: " + name);
         w.setName(name);
         addWindow(w);
-        w.addComponent(new Label(
-                "This window has been created on fly for name: " + name));
-        w.addComponent(new Button("Show open windows",
-                new Button.ClickListener() {
+        w.addComponent(new Label("This window has been created on fly for name: " + name));
+        w.addComponent(new Button("Show open windows", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        String openWindows = "";
-                        for (Iterator<Window> i = getWindows().iterator(); i
-                                .hasNext();) {
-                            Window t = i.next();
-                            openWindows += (openWindows.length() > 0 ? "," : "")
-                                    + t.getName();
-                        }
-                        w.showNotification(openWindows);
-                    }
-                }));
+            public void buttonClick(ClickEvent event) {
+                String openWindows = "";
+                for (Iterator<Window> i = getWindows().iterator(); i.hasNext();) {
+                    Window t = i.next();
+                    openWindows += (openWindows.length() > 0 ? "," : "") + t.getName();
+                }
+                w.showNotification(openWindows);
+            }
+        }));
         w.addListener(new Window.CloseListener() {
             public void windowClose(CloseEvent e) {
                 removeWindow(w);
@@ -60,19 +56,13 @@ public class Ticket1970 extends Application {
 
     private Window createWindow() {
         final Window w = new Window();
-        w.addComponent(new Button("Show the name of the application",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        w.showNotification("Name of this window = "
-                                + w.getName());
-                    }
-                }));
-        w.addComponent(new Label("<a href='" + getURL().toExternalForm() + "'>"
-                + getURL().toExternalForm() + "</a>", Label.CONTENT_XHTML));
-        w.addComponent(new Label(
-                "<h2>How to reproduce</h2>Open the above link in another browser"
-                        + " window and then press the Show-button on this window.",
-                Label.CONTENT_XHTML));
+        w.addComponent(new Button("Show the name of the application", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                w.showNotification("Name of this window = " + w.getName());
+            }
+        }));
+        w.addComponent(new Label("<a href='" + getURL().toExternalForm() + "'>" + getURL().toExternalForm() + "</a>", Label.CONTENT_XHTML));
+        w.addComponent(new Label("<h2>How to reproduce</h2>Open the above link in another browser" + " window and then press the Show-button on this window.", Label.CONTENT_XHTML));
 
         return w;
     }
index 4e93ef57b40681bb77aabae637e97c06fbc0fc03..c756ca12c3700a00cf9b7f2e30567169a59bbe95 100644 (file)
@@ -4,8 +4,8 @@ import com.vaadin.data.Item;
 import com.vaadin.data.util.IndexedContainer;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Component;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.Table;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket1973 extends com.vaadin.Application {\r
@@ -43,7 +43,7 @@ public class Ticket1973 extends com.vaadin.Application {
     public void fill(IndexedContainer container, int size, String prefix) {\r
         for (int i = 0; i < size; i++) {\r
             Item item = container.addItem(new Integer(i));\r
-            OrderedLayout layout = new OrderedLayout();\r
+            VerticalLayout layout = new VerticalLayout();\r
             layout.addComponent(new Button(prefix + i));\r
             item.getItemProperty("layout").setValue(layout);\r
         }\r
index 875cc70bc6d73e1672d7e53397c9805fa20a3449..5cffdbd5db01dddc7b34aff2c46ea67039ab7ece 100644 (file)
@@ -5,8 +5,8 @@ import com.vaadin.data.Item;
 import com.vaadin.data.util.IndexedContainer;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Component;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket1973_2 extends Application {
@@ -45,7 +45,7 @@ public class Ticket1973_2 extends Application {
         for (int i = 0; i < size; i++) {
             int randInt = i;
             Item item = container.addItem(new Integer(i));
-            OrderedLayout layout = new OrderedLayout();
+            VerticalLayout layout = new VerticalLayout();
             layout.setDebugId("lo" + i);
             layout.addComponent(new Button("Test " + randInt));
             item.getItemProperty("layout").setValue(layout);
index 9a423c905695e4853f9a85bb161a81efe0df85af..2ea60f314fbec5ba0ef24fd77f919f179fdc5e2b 100644 (file)
@@ -35,20 +35,17 @@ public class Ticket1975 extends Application {
             layout.addComponent(cl1);\r
             WebApplicationContext wc = ((WebApplicationContext) getContext());\r
 \r
-            layout.addComponent(new Button("Disable/Enable",\r
-                    new ClickListener() {\r
+            layout.addComponent(new Button("Disable/Enable", new ClickListener() {\r
 \r
-                        public void buttonClick(ClickEvent event) {\r
-                            boolean e = cl1.isEnabled();\r
+                public void buttonClick(ClickEvent event) {\r
+                    boolean e = cl1.isEnabled();\r
 \r
-                            cl1.setEnabled(!e);\r
-                            cl2.setEnabled(!e);\r
-                        }\r
+                    cl1.setEnabled(!e);\r
+                    cl2.setEnabled(!e);\r
+                }\r
 \r
-                    }));\r
-            File f = new File(wc.getBaseDirectory().getAbsoluteFile()\r
-                    + "/VAADIN/themes/" + getTheme()\r
-                    + "/layouts/Ticket1975.html");\r
+            }));\r
+            File f = new File(wc.getBaseDirectory().getAbsoluteFile() + "/VAADIN/themes/" + getTheme() + "/layouts/Ticket1975.html");\r
 \r
             cl2 = new CustomLayout(new FileInputStream(f));\r
             layout.addComponent(cl2);\r
index fe5f759428601a91860e9b2753272ffbec3b7a2b..68bdbeb38891c9c950d71350f87998fed84993be 100644 (file)
@@ -7,8 +7,8 @@ import com.vaadin.Application;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Window;
 
@@ -47,14 +47,14 @@ public class Ticket1982 extends Application {
         gl.addComponent(components.get(3));
     }
 
-    private class TitleBar extends ExpandLayout {
+    private class TitleBar extends HorizontalLayout {
 
         private Button max = new Button("Max");
         private Button min = new Button("Min");
         private GridLayout layout;
 
         public TitleBar(String title, GridLayout layout) {
-            super(ExpandLayout.ORIENTATION_HORIZONTAL);
+            super();
             this.layout = layout;
             addComponent(new Label(title));
             addComponent(max);
@@ -66,8 +66,7 @@ public class Ticket1982 extends Application {
                     min.setVisible(true);
                     max.setVisible(false);
                     TitleBar.this.layout.removeAllComponents();
-                    TitleBar.this.layout
-                            .addComponent(TitleBar.this, 0, 0, 1, 1);
+                    TitleBar.this.layout.addComponent(TitleBar.this, 0, 0, 1, 1);
                 }
             });
             min.addListener(new ClickListener() {
index ec26328f6f9fee08175cd13146cd491285cda424..be4e5f3fcf558bb005430553980977f4ea176401 100644 (file)
@@ -6,9 +6,9 @@ import com.vaadin.terminal.Sizeable;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.SplitPanel;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -39,7 +39,7 @@ public class Ticket1983 extends Application {
             final SplitPanel leftSide = initLeftSide();
             setFirstComponent(leftSide);
 
-            final Layout rightSide = new OrderedLayout();
+            final Layout rightSide = new VerticalLayout();
             rightSide.setHeight("100%");
             setSecondComponent(rightSide);
         }
@@ -52,27 +52,13 @@ public class Ticket1983 extends Application {
             dataSource.addContainerProperty(propId, String.class, null);
             dataSource.addContainerProperty(propId2, String.class, null);
             final Object itemId = dataSource.addItem();
-            dataSource
-                    .getItem(itemId)
-                    .getItemProperty(propId)
-                    .setValue(
-                            "Very long value that makes a scrollbar appear for sure");
-            dataSource
-                    .getItem(itemId)
-                    .getItemProperty(propId2)
-                    .setValue(
-                            "Very long value that makes a scrollbar appear for sure");
+            dataSource.getItem(itemId).getItemProperty(propId).setValue("Very long value that makes a scrollbar appear for sure");
+            dataSource.getItem(itemId).getItemProperty(propId2).setValue("Very long value that makes a scrollbar appear for sure");
 
             for (int i = 0; i < 150; i++) {
                 Object id = dataSource.addItem();
-                dataSource
-                        .getItem(id)
-                        .getItemProperty(propId)
-                        .setValue(
-                                (i == 100 ? "Very long value that makes a scrollbar appear for sure"
-                                        : "Short"));
-                dataSource.getItem(id).getItemProperty(propId2)
-                        .setValue("Short");
+                dataSource.getItem(id).getItemProperty(propId).setValue((i == 100 ? "Very long value that makes a scrollbar appear for sure" : "Short"));
+                dataSource.getItem(id).getItemProperty(propId2).setValue("Short");
             }
 
             table.setSizeFull();
@@ -87,22 +73,12 @@ public class Ticket1983 extends Application {
                     // Change the column value to a short one --> Should remove
                     // the scrollbar
                     if (isLong) {
-                        dataSource.getItem(itemId).getItemProperty(propId)
-                                .setValue("Short value");
-                        dataSource.getItem(itemId).getItemProperty(propId2)
-                                .setValue("Short value");
+                        dataSource.getItem(itemId).getItemProperty(propId).setValue("Short value");
+                        dataSource.getItem(itemId).getItemProperty(propId2).setValue("Short value");
                         isLong = false;
                     } else {
-                        dataSource
-                                .getItem(itemId)
-                                .getItemProperty(propId)
-                                .setValue(
-                                        "Very long value that makes a scrollbar appear for sure");
-                        dataSource
-                                .getItem(itemId)
-                                .getItemProperty(propId2)
-                                .setValue(
-                                        "Very long value that makes a scrollbar appear for sure");
+                        dataSource.getItem(itemId).getItemProperty(propId).setValue("Very long value that makes a scrollbar appear for sure");
+                        dataSource.getItem(itemId).getItemProperty(propId2).setValue("Very long value that makes a scrollbar appear for sure");
                         isLong = true;
                     }
                     // Works the same way with or without repaint request
@@ -110,7 +86,7 @@ public class Ticket1983 extends Application {
                 }
             });
 
-            OrderedLayout ol = new OrderedLayout();
+            VerticalLayout ol = new VerticalLayout();
             ol.addComponent(button);
             leftSide.setFirstComponent(ol);
 
index 430c54ec92dd0f80026d4f4419defb68f5727842..b4748fff8a52186241147e0c279c01fa593dade1 100644 (file)
@@ -8,8 +8,7 @@ public class Ticket1991 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         Table t = new Table("Test table");\r
index 93f16ca52774342a090c91cfc2746ca4b9831c54..6f67cfc2916f7e9a2e7ff6060c5a7c6df71e1dee 100644 (file)
@@ -28,25 +28,22 @@ public class Ticket1995 extends Application {
         item = table.addItem("2");\r
         item.getItemProperty(PROPERTY_1).setValue("Row 2");\r
 \r
-        Filterable filterable = (Container.Filterable) table\r
-                .getContainerDataSource();\r
+        Filterable filterable = (Container.Filterable) table.getContainerDataSource();\r
         filterable.addContainerFilter(PROPERTY_1, "Row", true, false);\r
 \r
         table.setColumnHeader(PROPERTY_1, "Test (filter: Row)");\r
 \r
         mainWin.addComponent(table);\r
-        mainWin.addComponent(new Button("Add item",\r
-                new com.vaadin.ui.Button.ClickListener() {\r
+        mainWin.addComponent(new Button("Add item", new com.vaadin.ui.Button.ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        addItem();\r
-                    }\r
-                }));\r
+            public void buttonClick(ClickEvent event) {\r
+                addItem();\r
+            }\r
+        }));\r
     }\r
 \r
     protected void addItem() {\r
-        Filterable filterable = (Container.Filterable) table\r
-                .getContainerDataSource();\r
+        Filterable filterable = (Container.Filterable) table.getContainerDataSource();\r
 \r
         Item i = table.addItem("abc");\r
         String res = "";\r
index 51f1a938b998509cb6b32d38f766306f153fb71b..6c1531b823d4056165972664ff08c82aaa8867c2 100644 (file)
@@ -53,13 +53,11 @@ public class Ticket20 extends Application {
 
             public void validate(Object value) throws InvalidValueException {
                 if (!isValid(value)) {
-                    throw new InvalidValueException(value
-                            + " is not a non-negative number");
+                    throw new InvalidValueException(value + " is not a non-negative number");
                 }
             }
         });
-        CompositeValidator v2 = new CompositeValidator(
-                CompositeValidator.MODE_OR, null);
+        CompositeValidator v2 = new CompositeValidator(CompositeValidator.MODE_OR, null);
         v2.addValidator(v);
         v2.addValidator(new Validator() {
 
@@ -75,24 +73,18 @@ public class Ticket20 extends Application {
         });
         tx.addValidator(v2);
 
-        final String[] visibleProps = { "required", "invalidAllowed",
-                "readOnly", "readThrough", "invalidCommitted",
-                "validationVisible" };
+        final String[] visibleProps = { "required", "invalidAllowed", "readOnly", "readThrough", "invalidCommitted", "validationVisible" };
         for (int i = 0; i < visibleProps.length; i++) {
-            Button b = new Button(visibleProps[i], new MethodProperty<Boolean>(
-                    tx, visibleProps[i]));
+            Button b = new Button(visibleProps[i], new MethodProperty<Boolean>(tx, visibleProps[i]));
             b.setImmediate(true);
             mainWin.addComponent(b);
         }
 
-        mainWin.addComponent(new Button("Validate integer",
-                new Button.ClickListener() {
-                    public void buttonClick(
-                            com.vaadin.ui.Button.ClickEvent event) {
-                        mainWin.showNotification("The field is "
-                                + (tx.isValid() ? "" : "not ") + "valid");
-                    };
-                }));
+        mainWin.addComponent(new Button("Validate integer", new Button.ClickListener() {
+            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
+                mainWin.showNotification("The field is " + (tx.isValid() ? "" : "not ") + "valid");
+            };
+        }));
     }
 
 }
index f3fbb4c50852954e413a97d948f9525165d239f8..5469b115348e177d29dcab07ff8536c243a7e33a 100644 (file)
@@ -5,7 +5,7 @@ import com.vaadin.data.Property;
 import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2001 extends Application {
@@ -15,7 +15,7 @@ public class Ticket2001 extends Application {
         final Window w = new Window(getClass().getName());
         setMainWindow(w);
 
-        final OrderedLayout l = new OrderedLayout();
+        final VerticalLayout l = new VerticalLayout();
         l.addComponent(new Label("row 1"));
         l.addComponent(new Label("row 2"));
         w.addComponent(l);
index 76f9bca5ba5027aeba157d1261fc2f9fe0400bfc..1e3b4e241a3650c4b9b79067c7cfab7213e87485 100644 (file)
@@ -34,12 +34,10 @@ public class Ticket2002 extends Application {
         GridLayout layout = new GridLayout(2, 2);\r
         layout.setSpacing(true);\r
 \r
-        TextField f1 = new TextField("Non-immediate/Long text field",\r
-                new MethodProperty<Long>(this, "long1"));\r
+        TextField f1 = new TextField("Non-immediate/Long text field", new MethodProperty<Long>(this, "long1"));\r
         f1.setImmediate(false);\r
         f1.setNullSettingAllowed(true);\r
-        TextField f2 = new TextField("Immediate/Long text field",\r
-                new MethodProperty<Long>(this, "long2"));\r
+        TextField f2 = new TextField("Immediate/Long text field", new MethodProperty<Long>(this, "long2"));\r
         f2.setImmediate(true);\r
         f2.setNullSettingAllowed(true);\r
 \r
index 84dafb41f36d43866b8f87d2b8021b2aa3105c2b..62f304705bc51c6eeb97d2aa9bd83071dd0343c7 100644 (file)
@@ -15,14 +15,12 @@ public class Ticket2007 extends Application {
 
         final Window main = new Window("Main window for #2007");
         setMainWindow(main);
-        main.addComponent(new Button("Open another (non-main) window",
-                new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        Window c = new Window("Non-main browser window "
-                                + (++childs));
-                        addWindow(c);
-                        main.open(new ExternalResource(c.getURL()), "_new");
-                    }
-                }));
+        main.addComponent(new Button("Open another (non-main) window", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                Window c = new Window("Non-main browser window " + (++childs));
+                addWindow(c);
+                main.open(new ExternalResource(c.getURL()), "_new");
+            }
+        }));
     }
 }
index f6d01d284c220825a156be292b98c6b633e1cad1..8aa55db731b868df83ad2e297663777f9e65d397 100644 (file)
@@ -5,12 +5,13 @@ import com.vaadin.event.ItemClickEvent;
 import com.vaadin.tests.TestForTablesInitialColumnWidthLogicRendering;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Button.ClickEvent;\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.Table;\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
 \r
 public class Ticket2009 extends com.vaadin.Application {\r
@@ -19,12 +20,10 @@ public class Ticket2009 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
-        OrderedLayout ol = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout ol = new HorizontalLayout();\r
         main.setLayout(ol);\r
         ol.setSizeFull();\r
 \r
@@ -36,15 +35,11 @@ public class Ticket2009 extends com.vaadin.Application {
         t.addItem("Foo");\r
         t.addItem("Bar");\r
 \r
-        final OrderedLayout events = new OrderedLayout();\r
+        final VerticalLayout events = new VerticalLayout();\r
 \r
         t.addListener(new ItemClickEvent.ItemClickListener() {\r
             public void itemClick(ItemClickEvent event) {\r
-                events.addComponent(new Label(new Label("Click:"\r
-                        + (event.isDoubleClick() ? "double" : "single")\r
-                        + " button:" + event.getButton() + " propertyId:"\r
-                        + event.getPropertyId() + " itemID:"\r
-                        + event.getItemId() + " item:" + event.getItem())));\r
+                events.addComponent(new Label(new Label("Click:" + (event.isDoubleClick() ? "double" : "single") + " button:" + event.getButton() + " propertyId:" + event.getPropertyId() + " itemID:" + event.getItemId() + " item:" + event.getItem())));\r
 \r
             }\r
         });\r
@@ -56,17 +51,12 @@ public class Ticket2009 extends com.vaadin.Application {
         Panel p2 = new Panel("Table test (try dbl click also)");\r
         p2.setSizeFull();\r
 \r
-        final OrderedLayout events2 = new OrderedLayout();\r
-        Table table = TestForTablesInitialColumnWidthLogicRendering\r
-                .getTestTable(5, 100);\r
+        final VerticalLayout events2 = new VerticalLayout();\r
+        Table table = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 100);\r
         table.setRowHeaderMode(Table.ROW_HEADER_MODE_ID);\r
         table.addListener(new ItemClickEvent.ItemClickListener() {\r
             public void itemClick(ItemClickEvent event) {\r
-                events2.addComponent(new Label("Click:"\r
-                        + (event.isDoubleClick() ? "double" : "single")\r
-                        + " button:" + event.getButton() + " propertyId:"\r
-                        + event.getPropertyId() + " itemID:"\r
-                        + event.getItemId() + " item:" + event.getItem()));\r
+                events2.addComponent(new Label("Click:" + (event.isDoubleClick() ? "double" : "single") + " button:" + event.getButton() + " propertyId:" + event.getPropertyId() + " itemID:" + event.getItemId() + " item:" + event.getItem()));\r
                 if (event.isDoubleClick()) {\r
                     new PropertyEditor(event);\r
                 }\r
@@ -100,8 +90,7 @@ public class Ticket2009 extends com.vaadin.Application {
 \r
             setCaption("Editing " + itemid + " : " + propertyid);\r
 \r
-            editor.setPropertyDataSource(c.getContainerProperty(itemid,\r
-                    propertyid));\r
+            editor.setPropertyDataSource(c.getContainerProperty(itemid, propertyid));\r
             addComponent(editor);\r
             addComponent(done);\r
 \r
index 74b3fa3641d9f5ce748446d473c46bfd9f297b95..703870a6dcbc02ee377a9dfeb9c63f5e1ac3866d 100644 (file)
@@ -7,13 +7,13 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.GridLayout;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Panel;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2014 extends Application {\r
 \r
-    private OrderedLayout innerLayout1;\r
+    private HorizontalLayout innerLayout1;\r
     private Button b1;\r
     private Panel panel;\r
 \r
@@ -23,21 +23,20 @@ public class Ticket2014 extends Application {
         setMainWindow(w);\r
         // setTheme("tests-ticket");\r
         GridLayout layout = new GridLayout(10, 10);\r
-        w.setLayout(layout);\r
+        w.setContent(layout);\r
         createUI(layout);\r
     }\r
 \r
     private void createUI(GridLayout layout) {\r
         createPanel(layout);\r
 \r
-        layout.addComponent(new Button("Change class name",\r
-                new ClickListener() {\r
+        layout.addComponent(new Button("Change class name", new ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        b1.setStyleName(UUID.randomUUID().toString());\r
-                    }\r
+            public void buttonClick(ClickEvent event) {\r
+                b1.setStyleName(UUID.randomUUID().toString());\r
+            }\r
 \r
-                }));\r
+        }));\r
 \r
     }\r
 \r
@@ -45,7 +44,7 @@ public class Ticket2014 extends Application {
         panel = new Panel("panel caption");\r
         layout.addComponent(panel);\r
 \r
-        innerLayout1 = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        innerLayout1 = new HorizontalLayout();\r
         innerLayout1.setSpacing(true);\r
         panel.addComponent(innerLayout1);\r
 \r
index 5fb6f89baf889b41b152d8e7ffa1e3091740e122..e761f7e8586f7698994e64129483a3b9f107ba54 100644 (file)
@@ -2,51 +2,48 @@ package com.vaadin.tests.tickets;
 \r
 import com.vaadin.Application;\r
 import com.vaadin.ui.AbstractComponent;\r
+import com.vaadin.ui.AbstractOrderedLayout;\r
 import com.vaadin.ui.Button;\r
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Button.ClickListener;\r
-import com.vaadin.ui.ExpandLayout;\r
 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
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2021 extends Application {\r
 \r
     private TextField tf1, tf2, tf3;\r
 \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"\r
-            + ""\r
-            + "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."\r
-            + "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."\r
-            + "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
+    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
 \r
     @Override\r
     public void init() {\r
         Window w = new Window(getClass().getSimpleName());\r
-        w.setLayout(new GridLayout(2, 2));\r
+        w.setContent(new GridLayout(2, 2));\r
         setMainWindow(w);\r
 \r
         Panel p = new Panel();\r
         p.setCaption("ExpandLayout");\r
         p.setWidth("500px");\r
         p.setHeight("500px");\r
-        p.setLayout(new ExpandLayout());\r
-        p.getLayout().setSizeFull();\r
+        p.setContent(new VerticalLayout());\r
+        p.getContent().setSizeFull();\r
 \r
-        w.getLayout().addComponent(p);\r
+        w.getContent().addComponent(p);\r
 \r
         tf1 = new TextField();\r
         tf1.setRows(5);\r
         tf1.setSizeFull();\r
         tf1.setValue(contents);\r
         tf1.setCaption("TextField caption");\r
-        p.getLayout().addComponent(tf1);\r
+        p.getContent().addComponent(tf1);\r
 \r
         /*\r
          * \r
@@ -57,17 +54,17 @@ public class Ticket2021 extends Application {
         p2.setCaption("OrderedLayout");\r
         p2.setWidth("500px");\r
         p2.setHeight("500px");\r
-        p2.setLayout(new OrderedLayout());\r
-        p2.getLayout().setSizeFull();\r
+        p2.setContent(new OrderedLayout());\r
+        p2.getContent().setSizeFull();\r
 \r
-        w.getLayout().addComponent(p2);\r
+        w.getContent().addComponent(p2);\r
 \r
         tf2 = new TextField();\r
         tf2.setRows(5);\r
         tf2.setSizeFull();\r
         tf2.setValue(contents);\r
         tf2.setCaption("TextField caption");\r
-        p2.getLayout().addComponent(tf2);\r
+        p2.getContent().addComponent(tf2);\r
 \r
         /*\r
          * \r
@@ -78,56 +75,54 @@ public class Ticket2021 extends Application {
         p3.setCaption("GridLayout");\r
         p3.setWidth(500);\r
         p3.setHeight(500);\r
-        // p3.setLayout(new GridLayout());\r
-        p3.getLayout().setSizeFull();\r
-        p3.getLayout().setMargin(false);\r
+        // p3.setContent(new GridLayout());\r
+        p3.getContent().setSizeFull();\r
+        ((Layout) p3.getContent()).setMargin(false);\r
 \r
         GridLayout gl = new GridLayout();\r
         gl.setSizeFull();\r
         gl.setMargin(false);\r
-        p3.getLayout().addComponent(gl);\r
-        w.getLayout().addComponent(p3);\r
+        p3.getContent().addComponent(gl);\r
+        w.getContent().addComponent(p3);\r
 \r
         tf3 = new TextField();\r
         tf3.setRows(5);\r
         tf3.setSizeFull();\r
         tf3.setValue(contents);\r
         tf3.setCaption("TextField caption");\r
-        // p3.getLayout().addComponent(tf3);\r
+        // p3.getContent().addComponent(tf3);\r
         gl.addComponent(tf3);\r
 \r
         // Panel pp = new Panel();\r
         // pp.setCaption("OrderedLayout");\r
         // pp.setWidth("500px");\r
         // pp.setHeight("500px");\r
-        // pp.getLayout().setSizeFull();\r
-        // orderedLayout = new OrderedLayout();\r
-        // pp.getLayout().addComponent(orderedLayout);\r
-        // w.getLayout().addComponent(pp);\r
+        // pp.getContent().setSizeFull();\r
+        // orderedLayout = new VerticalLayout();\r
+        // pp.getContent().addComponent(orderedLayout);\r
+        // w.getContent().addComponent(pp);\r
         // createUI(orderedLayout);\r
     }\r
 \r
     @SuppressWarnings("unused")\r
     private void createUI(Layout layout) {\r
         Label l = new Label("Label");\r
-        Button b = new Button("Enable/disable caption and watch button move",\r
-                new ClickListener() {\r
-\r
-                    public void buttonClick(ClickEvent event) {\r
-                        System.out.println("Enable/disable caption");\r
-                        for (AbstractComponent l : new AbstractComponent[] {\r
-                                tf1, tf2, tf3 }) {\r
-                            // AbstractComponent l = tf2;\r
-                            // Layout l = (Layout) event.getButton().getData();\r
-                            if (l.getCaption() == null) {\r
-                                l.setCaption("Expand layout caption");\r
-                            } else {\r
-                                l.setCaption(null);\r
-                            }\r
-                        }\r
+        Button b = new Button("Enable/disable caption and watch button move", new ClickListener() {\r
+\r
+            public void buttonClick(ClickEvent event) {\r
+                System.out.println("Enable/disable caption");\r
+                for (AbstractComponent l : new AbstractComponent[] { tf1, tf2, tf3 }) {\r
+                    // AbstractComponent l = tf2;\r
+                    // Layout l = (Layout) event.getButton().getData();\r
+                    if (l.getCaption() == null) {\r
+                        l.setCaption("Expand layout caption");\r
+                    } else {\r
+                        l.setCaption(null);\r
                     }\r
+                }\r
+            }\r
 \r
-                });\r
+        });\r
         b.setData(layout);\r
         Label l2 = new Label("This should always be visible");\r
 \r
@@ -135,8 +130,8 @@ public class Ticket2021 extends Application {
         layout.addComponent(b);\r
         layout.addComponent(l2);\r
 \r
-        if (layout instanceof ExpandLayout) {\r
-            ((ExpandLayout) layout).expand(l);\r
+        if (layout instanceof AbstractOrderedLayout) {\r
+            ((AbstractOrderedLayout) layout).setExpandRatio(l, 1);\r
 \r
         }\r
     }\r
index ac80ef602bd887f7f8593913a1b385846185db39..1f4f0ffba57afe0812b69e44aac796bf6453de2d 100644 (file)
@@ -6,8 +6,7 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Window;
 
-public class Ticket2023 extends com.vaadin.Application implements
-        Button.ClickListener {
+public class Ticket2023 extends com.vaadin.Application implements Button.ClickListener {
 
     AbstractComponent c = new Button();
 
@@ -17,8 +16,7 @@ public class Ticket2023 extends com.vaadin.Application implements
         setMainWindow(main);
 
         String[] sizes = { "20", "100", "1", "0", "-1", "", "z" };
-        String[] units = { "%", "px", "em", "ex", "in", "cm", "mm", "pt", "pc",
-                "", "p", "zyx" };
+        String[] units = { "%", "px", "em", "ex", "in", "cm", "mm", "pt", "pc", "", "p", "zyx" };
 
         GridLayout gl = new GridLayout(units.length, sizes.length);
         main.addComponent(gl);
index ffc6022f0a72e9cfc0642da0c5c4480434e47e00..b07a1a0c3d4e2a2d4debffcc09f17e8dd3888dc6 100644 (file)
@@ -3,8 +3,8 @@ package com.vaadin.tests.tickets;
 import com.vaadin.Application;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.TextField;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2024 extends Application {\r
@@ -21,11 +21,10 @@ public class Ticket2024 extends Application {
         w.getLayout().setHeight("2000");\r
         w.getLayout().addComponent(layout);\r
 \r
-        layout.addComponent(new Label(\r
-                "This should NOT get stuck when scrolling down"));\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
 \r
-        OrderedLayout ol = new OrderedLayout();\r
+        VerticalLayout ol = new VerticalLayout();\r
         ol.setHeight("1000");\r
         ol.setWidth("200");\r
         w.getLayout().addComponent(ol);\r
index 4c53e2cd9e1e8ebd2539b1207dc0f5ca8d53a085..9bf975f2baaf581eeb799fcdd3ea79c87e92823c 100644 (file)
@@ -8,9 +8,11 @@ import com.vaadin.data.Property.ValueChangeListener;
 import com.vaadin.terminal.UserError;\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
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2029 extends Application {\r
@@ -39,8 +41,7 @@ public class Ticket2029 extends Application {
         p.setWidth(DIM1 + "px");\r
         p.setHeight(DIM2 + "px");\r
 \r
-        OrderedLayout layout = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout layout = new HorizontalLayout();\r
         p.setLayout(layout);\r
         p.getLayout().setSizeFull();\r
 \r
@@ -56,8 +57,7 @@ public class Ticket2029 extends Application {
                 tf.setComponentError(new UserError("Error"));\r
             }\r
             tf.setWidth("100%");\r
-            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT,\r
-                    OrderedLayout.ALIGNMENT_BOTTOM);\r
+            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);\r
             p.addComponent(tf);\r
 \r
         }\r
@@ -95,8 +95,7 @@ public class Ticket2029 extends Application {
                 tf.setComponentError(new UserError("Error"));\r
             }\r
             tf.setWidth("100%");\r
-            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT,\r
-                    OrderedLayout.ALIGNMENT_VERTICAL_CENTER);\r
+            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_VERTICAL_CENTER);\r
             p.addComponent(tf);\r
 \r
         }\r
@@ -109,8 +108,7 @@ public class Ticket2029 extends Application {
         p.setWidth("" + DIM2 + "px");\r
         p.setHeight("" + DIM1 + "px");\r
 \r
-        OrderedLayout layout = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_VERTICAL);\r
+        VerticalLayout layout = new VerticalLayout();\r
         p.setLayout(layout);\r
         p.getLayout().setSizeFull();\r
 \r
@@ -129,8 +127,7 @@ public class Ticket2029 extends Application {
             tf.setRows(2);\r
             tf.setSizeFull();\r
 \r
-            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT,\r
-                    OrderedLayout.ALIGNMENT_BOTTOM);\r
+            layout.setComponentAlignment(tf, OrderedLayout.ALIGNMENT_LEFT, OrderedLayout.ALIGNMENT_BOTTOM);\r
             p.addComponent(tf);\r
 \r
         }\r
index 7cbb3802da597bc7a8564b2dc8c296f47e6412ce..f191274cb726a3338a683d2e5d24967fa114ff33 100644 (file)
@@ -4,7 +4,7 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Label;\r
 import com.vaadin.ui.Layout;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2037 extends com.vaadin.Application {\r
@@ -14,10 +14,9 @@ public class Ticket2037 extends com.vaadin.Application {
         Window main = new Window();\r
         setMainWindow(main);\r
 \r
-        main.addComponent(new Label(\r
-                "Use debug dialog and trac number of registered paintables. It should not grow on subsequant b clicks."));\r
+        main.addComponent(new Label("Use debug dialog and trac number of registered paintables. It should not grow on subsequant b clicks."));\r
 \r
-        final Layout lo = new OrderedLayout();\r
+        final Layout lo = new VerticalLayout();\r
 \r
         Button b = new Button("b");\r
 \r
index ff5ceb22e7c00e5a03244b88ed1073a6ea996214..98f9a5a01fbe30f5604985bbef1b0ffee4c52af2 100644 (file)
@@ -15,29 +15,23 @@ public class Ticket2038 extends Application {
         final Window w = new Window("Testing for #2038");
         setMainWindow(w);
 
-        final TextField tf = new TextField(
-                "Test-field, enter someting and click outside the field to activate");
+        final TextField tf = new TextField("Test-field, enter someting and click outside the field to activate");
         tf.setRequired(true);
         tf.setImmediate(true);
         tf.addListener(new Property.ValueChangeListener() {
 
             public void valueChange(ValueChangeEvent event) {
-                w.showNotification("TextField is " + (tf.isValid() ? "" : "in")
-                        + "valid, with error: " + tf.getErrorMessage(),
-                        Notification.TYPE_WARNING_MESSAGE);
+                w.showNotification("TextField is " + (tf.isValid() ? "" : "in") + "valid, with error: " + tf.getErrorMessage(), Notification.TYPE_WARNING_MESSAGE);
             }
         });
         w.addComponent(tf);
 
-        final Button b = new Button(
-                "Field should use error message. (!) should be shown when invalid.",
-                false);
+        final Button b = new Button("Field should use error message. (!) should be shown when invalid.", false);
         w.addComponent(b);
         b.setImmediate(true);
         b.addListener(new Property.ValueChangeListener() {
             public void valueChange(ValueChangeEvent event) {
-                tf.setRequiredError(b.booleanValue() ? "Field must not be empty"
-                        : null);
+                tf.setRequiredError(b.booleanValue() ? "Field must not be empty" : null);
             }
         });
     }
index e5300d5eed90488987f0d44001b093c139e746b5..9bea084de2912e90c2edec75175fff9bfaf4d09a 100644 (file)
@@ -31,8 +31,7 @@ public class Ticket2040 extends com.vaadin.Application {
         l.setSizeFull();\r
         ts.addTab(l, "100% h component", null);\r
 \r
-        Label testContent = new Label(\r
-                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        Label testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
@@ -51,8 +50,7 @@ public class Ticket2040 extends com.vaadin.Application {
         l.setSizeFull();\r
         ts.addTab(l, "200px h component", null);\r
 \r
-        testContent = new Label(\r
-                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
@@ -71,8 +69,7 @@ public class Ticket2040 extends com.vaadin.Application {
         l.setSizeFull();\r
         ts.addTab(l, "50% h component", null);\r
 \r
-        testContent = new Label(\r
-                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
index aad3cb554afa951a695a8cd75a97df2251f987b4..3a2ce269de8b29235c32fafa6f3abcd2ffd5b23a 100644 (file)
@@ -19,9 +19,7 @@ public class Ticket2043 extends Application {
     }\r
 \r
     private void createUI(GridLayout layout) {\r
-        Link l = new Link("Vaadin home (new 200x200 window, no decor, icon)",\r
-                new ExternalResource("http://www.vaadin.com"), "_blank", 200,\r
-                200, Link.TARGET_BORDER_NONE);\r
+        Link l = new Link("Vaadin home (new 200x200 window, no decor, icon)", new ExternalResource("http://www.vaadin.com"), "_blank", 200, 200, Link.TARGET_BORDER_NONE);\r
 \r
         layout.addComponent(l);\r
     }\r
index 12cb4269a56ba73d7ff628f2a53c3f1eb5879f0c..5ad2ef79c443ab8662fd22963db51f26efc1d22c 100644 (file)
@@ -9,9 +9,9 @@ import com.vaadin.ui.Embedded;
 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.SplitPanel;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2048 extends Application {\r
@@ -20,7 +20,7 @@ public class Ticket2048 extends Application {
     private Panel p;\r
     private SplitPanel splitPanel;\r
     private GridLayout gridLayout;\r
-    private OrderedLayout orderedLayout;\r
+    private VerticalLayout orderedLayout;\r
 \r
     @Override\r
     public void init() {\r
@@ -33,7 +33,7 @@ public class Ticket2048 extends Application {
         // GridLayout layout = new GridLayout(10, 10);\r
         // w.setLayout(layout);\r
         // gridLayout = new GridLayout(1, 1);\r
-        orderedLayout = new OrderedLayout();\r
+        orderedLayout = new VerticalLayout();\r
 \r
         getMainWindow().setLayout(orderedLayout);\r
         // getMainWindow().setLayout(new GridLayout(1, 1));\r
@@ -67,31 +67,25 @@ public class Ticket2048 extends Application {
         l.setHeight("400px");\r
         p.addComponent(l);\r
 \r
-        embedded = new Embedded(null, new ThemeResource(\r
-                "icons/64/folder-add.png"));\r
+        embedded = new Embedded(null, new ThemeResource("icons/64/folder-add.png"));\r
         layout.addComponent(embedded);\r
-        Button b = new Button(\r
-                "Replace image with new embedded component (flashes)",\r
-                new ClickListener() {\r
+        Button b = new Button("Replace image with new embedded component (flashes)", new ClickListener() {\r
 \r
-                    public void buttonClick(ClickEvent event) {\r
-                        Embedded newEmbedded = new Embedded(null,\r
-                                new ThemeResource("icons/64/folder-add.png"));\r
-                        getMainWindow().getLayout().replaceComponent(embedded,\r
-                                newEmbedded);\r
-                        embedded = newEmbedded;\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
+                embedded = newEmbedded;\r
 \r
-                    }\r
+            }\r
 \r
-                });\r
+        });\r
         p.addComponent(b);\r
 \r
         b = new Button("Change image source (is fine)", new ClickListener() {\r
 \r
             public void buttonClick(ClickEvent event) {\r
                 String img = "folder-add";\r
-                if (((ThemeResource) embedded.getSource()).getResourceId()\r
-                        .contains("folder-add")) {\r
+                if (((ThemeResource) embedded.getSource()).getResourceId().contains("folder-add")) {\r
                     img = "folder-delete";\r
                 }\r
                 embedded.setSource(new ThemeResource("icons/64/" + img + ".png"));\r
index f784b40aedccfb3cb412890f50bade2afc19353e..1c06962c63694900c57f1af5390e814fe0381234 100644 (file)
@@ -22,9 +22,7 @@ public class Ticket2053 extends Application {
         setMainWindow(main);
         Button nothing = new Button("Do nothing");
         main.addComponent(nothing);
-        nothing.setDescription("Even though no action is taked, this window is refreshed to "
-                + "draw changes not originating from this window. Such changes include changes "
-                + "made by other browser-windows.");
+        nothing.setDescription("Even though no action is taked, this window is refreshed to " + "draw changes not originating from this window. Such changes include changes " + "made by other browser-windows.");
         Button add = new Button("Add a window", new Button.ClickListener() {
             public void buttonClick(ClickEvent event) {
                 final String name = "Child " + (++childs);
@@ -41,33 +39,26 @@ public class Ticket2053 extends Application {
                 c.addComponent(tf);
                 tf.addListener(new Property.ValueChangeListener() {
                     public void valueChange(ValueChangeEvent event) {
-                        main.addComponent(new Label(name + " send text:"
-                                + tf.toString()));
+                        main.addComponent(new Label(name + " send text:" + tf.toString()));
                     }
                 });
                 for (int i = 0; i < 3; i++) {
                     final String caption = "Slow button " + i;
-                    c.addComponent(new Button(caption,
-                            new Button.ClickListener() {
-                                public synchronized void buttonClick(
-                                        ClickEvent event) {
-                                    try {
-                                        this.wait(2000);
-                                    } catch (InterruptedException e) {
-                                    }
-                                    main.addComponent(new Label(caption
-                                            + " pressed"));
-                                }
-                            }));
+                    c.addComponent(new Button(caption, new Button.ClickListener() {
+                        public synchronized void buttonClick(ClickEvent event) {
+                            try {
+                                this.wait(2000);
+                            } catch (InterruptedException e) {
+                            }
+                            main.addComponent(new Label(caption + " pressed"));
+                        }
+                    }));
                 }
 
             }
         });
         main.addComponent(add);
-        add.setDescription("This button opens a new browser window. Closing the browser "
-                + "window should do two things: 1) submit all unsubmitted state to server "
-                + "(print any changes to textfield to main window) and 2) call window.close()"
-                + " on the child window (print closed on the main window)");
+        add.setDescription("This button opens a new browser window. Closing the browser " + "window should do two things: 1) submit all unsubmitted state to server " + "(print any changes to textfield to main window) and 2) call window.close()" + " on the child window (print closed on the main window)");
 
     }
 }
index 70f55afbf99f83931ceb94eaa0c8f0270158a974..672c0b8957d175c923f54ccf9b4f50ba357dd80d 100644 (file)
@@ -5,7 +5,7 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;\r
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.GridLayout;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.HorizontalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2060 extends Application {\r
@@ -25,8 +25,7 @@ public class Ticket2060 extends Application {
     }\r
 \r
     private void createUI(GridLayout layout) {\r
-        OrderedLayout buttonLayout = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout buttonLayout = new HorizontalLayout();\r
         button1 = new Button("Button which is 50px wide");\r
         button1.setWidth("50px");\r
         button2 = new Button("Button without width");\r
index b6c8f1fb38384b08e1dc42801cd95797cd9e3b25..a8d33b6f343883b5a239f1d484ea0cdd60433ccf 100644 (file)
@@ -8,9 +8,9 @@ import com.vaadin.data.util.HierarchicalContainer;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2061 extends Application {
@@ -33,8 +33,7 @@ public class Ticket2061 extends Application {
         MyTable table3 = new MyTable(24, "table3");
         table3.loadTable(1000);
 
-        MyAccordion accordion = new MyAccordion(new Component[] { table1,
-                table2 }, "Test");
+        MyAccordion accordion = new MyAccordion(new Component[] { table1, table2 }, "Test");
 
         Tabs tab = new Tabs(new Component[] { accordion, table3 });
 
@@ -46,7 +45,7 @@ public class Ticket2061 extends Application {
 
         private Table table = new Table();
         private String[] columns;
-        private ExpandLayout layout = new ExpandLayout();
+        private VerticalLayout layout = new VerticalLayout();
 
         public MyTable(int columnNumber, String id) {
             setDebugId(id);
@@ -72,8 +71,7 @@ public class Ticket2061 extends Application {
                 Item rowItem = table.addItem(j);
                 if (rowItem != null) {
                     for (int i = 0; i < columns.length; i++) {
-                        rowItem.getItemProperty(columns[i]).setValue(
-                                "Value" + j);
+                        rowItem.getItemProperty(columns[i]).setValue("Value" + j);
                     }
                 }
             }
index 3cefb28841ff050d46bbf546196397f1b0195786..f553a68d2b3395e7d728bae66d2a1160ae2a1a57 100644 (file)
@@ -8,7 +8,6 @@ import com.vaadin.data.util.HierarchicalContainer;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
@@ -18,10 +17,10 @@ import com.vaadin.ui.TabSheet.SelectedTabChangeEvent;
 import com.vaadin.ui.TabSheet.SelectedTabChangeListener;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
-public class Ticket2061b extends Application implements
-        SelectedTabChangeListener {
+public class Ticket2061b extends Application implements SelectedTabChangeListener {
 
     private Window mainWindow;
     private Panel p;
@@ -97,7 +96,7 @@ public class Ticket2061b extends Application implements
 
         private Table table = new Table();
         private String[] columns;
-        private ExpandLayout layout = new ExpandLayout();
+        private VerticalLayout layout = new VerticalLayout();
 
         public MyTable(int columnNumber, String id) {
             setDebugId(id);
@@ -123,8 +122,7 @@ public class Ticket2061b extends Application implements
                 Item rowItem = table.addItem(j);
                 if (rowItem != null) {
                     for (int i = 0; i < columns.length; i++) {
-                        rowItem.getItemProperty(columns[i]).setValue(
-                                "Value" + j);
+                        rowItem.getItemProperty(columns[i]).setValue("Value" + j);
                     }
                 }
             }
index 4cca9792684e8e07a62449e146999bd54198e444..0fae77855283bc2dec9e48a7394921eac562b1c4 100644 (file)
@@ -17,8 +17,7 @@ import com.vaadin.ui.Table;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
-public class Ticket2061c extends Application implements
-        SelectedTabChangeListener {
+public class Ticket2061c extends Application implements SelectedTabChangeListener {
 
     private Window mainWindow;
     private Panel p;
@@ -88,8 +87,7 @@ public class Ticket2061c extends Application implements
                 Item rowItem = table.addItem(j);
                 if (rowItem != null) {
                     for (int i = 0; i < columns.length; i++) {
-                        rowItem.getItemProperty(columns[i]).setValue(
-                                "Value" + j);
+                        rowItem.getItemProperty(columns[i]).setValue("Value" + j);
                     }
                 }
             }
index e074210fecc07db2c8d9b9578588e9bc35edabfe..fd9c94743bf25b1511dea904567a021c46955de7 100644 (file)
@@ -19,8 +19,7 @@ public class Ticket2083 extends Application {
     }\r
 \r
     private void createUI(GridLayout layout) {\r
-        Panel p = new Panel(\r
-                "This is a panel with a longer caption than it should have");\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
         layout.addComponent(p);\r
index 5bc69e0a64c1778677432883dcdf4fc515c9706f..1adde824bbafdf30a38bb9d62f6e78b54f67550e 100644 (file)
@@ -53,10 +53,7 @@ public class Ticket2090 extends Application {
     }
 
     private void updateLabel() {
-        label.setValue("width: " + target.getWidth()
-                + Sizeable.UNIT_SYMBOLS[target.getWidthUnits()] + ", height: "
-                + target.getHeight()
-                + Sizeable.UNIT_SYMBOLS[target.getHeightUnits()]);
+        label.setValue("width: " + target.getWidth() + Sizeable.UNIT_SYMBOLS[target.getWidthUnits()] + ", height: " + target.getHeight() + Sizeable.UNIT_SYMBOLS[target.getHeightUnits()]);
     }
 
 }
index f1add9088671d3b9c3248dd7c3e389bb11f8c562..b4a5f2c450059b49038456c711f40d0b30d582d9 100644 (file)
@@ -6,14 +6,14 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.GridLayout;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
 import com.vaadin.ui.TabSheet;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2099 extends Application {\r
 \r
     private Label l1, l2, l3;\r
-    private OrderedLayout ol1, ol2, ol3;\r
+    private VerticalLayout ol1, ol2, ol3;\r
     private Window popup;\r
 \r
     @Override\r
@@ -52,9 +52,9 @@ public class Ticket2099 extends Application {
     private Window createPopup() {\r
         Window w = new Window("Popup");\r
         TabSheet ts = new TabSheet();\r
-        ol1 = new OrderedLayout();\r
-        ol2 = new OrderedLayout();\r
-        ol3 = new OrderedLayout();\r
+        ol1 = new VerticalLayout();\r
+        ol2 = new VerticalLayout();\r
+        ol3 = new VerticalLayout();\r
         l1 = new Label("111");\r
         l2 = new Label("222");\r
         l3 = new Label("333");\r
index 9a260635cf9b523fd9aabf551220c55323a3127c..7f59d899c47b0512651ded642f0925cb91f1db95 100644 (file)
@@ -11,8 +11,7 @@ public class Ticket2101 extends Application {
         Window w = new Window(getClass().getSimpleName());\r
         setMainWindow(w);\r
 \r
-        Button b = new Button(\r
-                "Button with a long text which will not fit on 50 pixels");\r
+        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
index 3e655b6753520109abfb89aedc54861d4caf63b6..599b5e9769493a4c14c14244ec1b20ddbaeb1665 100644 (file)
@@ -5,8 +5,8 @@ import com.vaadin.data.Item;
 import com.vaadin.data.util.HierarchicalContainer;
 import com.vaadin.ui.Accordion;
 import com.vaadin.ui.Component;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2103 extends Application {
@@ -15,17 +15,16 @@ public class Ticket2103 extends Application {
     @Override
     public void init() {
         mainWindow = new Window(getClass().getSimpleName());
-        mainWindow.setLayout(new ExpandLayout());
+        mainWindow.setContent(new VerticalLayout());
         mainWindow.setSizeFull();
-        mainWindow.getLayout().setSizeFull();
+        mainWindow.getContent().setSizeFull();
 
         MyTable table1 = new MyTable(4, "table1");
         table1.loadTable(100);
         MyTable table2 = new MyTable(4, "table2");
         table2.loadTable(100);
 
-        MyAccordion a = new MyAccordion(new Component[] { table1, table2 },
-                "FDSF");
+        MyAccordion a = new MyAccordion(new Component[] { table1, table2 }, "FDSF");
         mainWindow.addComponent(a);
         setMainWindow(mainWindow);
         // mainWindow.addComponent(table1);
@@ -48,7 +47,7 @@ public class Ticket2103 extends Application {
 
         private Table table = this;
         private String[] columns;
-        private ExpandLayout layout = new ExpandLayout();
+        private VerticalLayout layout = new VerticalLayout();
 
         public MyTable(int columnNumber, String id) {
             setDebugId(id);
@@ -72,8 +71,7 @@ public class Ticket2103 extends Application {
                 Item rowItem = table.addItem(j);
                 if (rowItem != null) {
                     for (int i = 0; i < columns.length; i++) {
-                        rowItem.getItemProperty(columns[i]).setValue(
-                                "Value" + j);
+                        rowItem.getItemProperty(columns[i]).setValue("Value" + j);
                     }
                 }
             }
index b7af4ed4016ef6b3020409f60685278e235d0064..018ba80985dabd969e4513392315576e547419d8 100644 (file)
@@ -7,17 +7,15 @@ import com.vaadin.event.ItemClickEvent.ItemClickListener;
 import com.vaadin.terminal.ExternalResource;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.Window;
 
 public class Ticket2104 extends Application {
 
-    private static final Label info = new Label(
-            "Click event should _always_ come trough. Switching features on/off should immediatly affect the tree (verify w/ debug window)",
-            Label.CONTENT_RAW);
+    private static final Label info = new Label("Click event should _always_ come trough. Switching features on/off should immediatly affect the tree (verify w/ debug window)", Label.CONTENT_RAW);
 
     Tree tree = new Tree();
     Table table = new Table();
@@ -29,23 +27,18 @@ public class Ticket2104 extends Application {
 
         main.addComponent(info);
 
-        OrderedLayout ol = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout ol = new HorizontalLayout();
         main.addComponent(ol);
-        Button b = new Button("immediate", new MethodProperty<Boolean>(tree,
-                "immediate"));
+        Button b = new Button("immediate", new MethodProperty<Boolean>(tree, "immediate"));
         b.setImmediate(true);
         ol.addComponent(b);
-        b = new Button("selectable", new MethodProperty<Boolean>(tree,
-                "selectable"));
+        b = new Button("selectable", new MethodProperty<Boolean>(tree, "selectable"));
         b.setImmediate(true);
         ol.addComponent(b);
-        b = new Button("nullsel", new MethodProperty<Boolean>(tree,
-                "nullSelectionAllowed"));
+        b = new Button("nullsel", new MethodProperty<Boolean>(tree, "nullSelectionAllowed"));
         b.setImmediate(true);
         ol.addComponent(b);
-        b = new Button("multi",
-                new MethodProperty<Boolean>(tree, "multiSelect"));
+        b = new Button("multi", new MethodProperty<Boolean>(tree, "multiSelect"));
         b.setImmediate(true);
         ol.addComponent(b);
         b = new Button("icon", new Button.ClickListener() {
@@ -73,35 +66,27 @@ public class Ticket2104 extends Application {
         tree.setParent("2. Child 1", "Root 2");
         tree.addItem("2. Child 2");
         tree.setParent("2. Child 2", "Root 2");
-        tree.addContainerProperty("icon", ExternalResource.class,
-                new ExternalResource(
-                        "http://www.itmill.com/res/images/itmill_logo.gif"));
+        tree.addContainerProperty("icon", ExternalResource.class, new ExternalResource("http://www.itmill.com/res/images/itmill_logo.gif"));
 
         tree.addListener(new ItemClickListener() {
             public void itemClick(ItemClickEvent event) {
-                getMainWindow().addComponent(
-                        new Label(event.toString() + " // " + event.getItemId()
-                                + "//" + event.getSource()));
+                getMainWindow().addComponent(new Label(event.toString() + " // " + event.getItemId() + "//" + event.getSource()));
 
             }
         });
 
-        ol = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
+        ol = new HorizontalLayout();
         main.addComponent(ol);
-        b = new Button("immediate", new MethodProperty<Boolean>(table,
-                "immediate"));
+        b = new Button("immediate", new MethodProperty<Boolean>(table, "immediate"));
         b.setImmediate(true);
         ol.addComponent(b);
-        b = new Button("selectable", new MethodProperty<Boolean>(table,
-                "selectable"));
+        b = new Button("selectable", new MethodProperty<Boolean>(table, "selectable"));
         b.setImmediate(true);
         ol.addComponent(b);
-        b = new Button("nullsel", new MethodProperty<Boolean>(table,
-                "nullSelectionAllowed"));
+        b = new Button("nullsel", new MethodProperty<Boolean>(table, "nullSelectionAllowed"));
         b.setImmediate(true);
         ol.addComponent(b);
-        b = new Button("multi", new MethodProperty<Boolean>(table,
-                "multiSelect"));
+        b = new Button("multi", new MethodProperty<Boolean>(table, "multiSelect"));
         b.setImmediate(true);
         ol.addComponent(b);
         main.addComponent(table);
@@ -114,9 +99,7 @@ public class Ticket2104 extends Application {
         }
         table.addListener(new ItemClickListener() {
             public void itemClick(ItemClickEvent event) {
-                getMainWindow().addComponent(
-                        new Label(event.toString() + " // " + event.getItemId()
-                                + "//" + event.getSource()));
+                getMainWindow().addComponent(new Label(event.toString() + " // " + event.getItemId() + "//" + event.getSource()));
 
             }
         });
index 92908aa66d0ae075f8131a0fa91e8fce9090a244..8b9a3478c184468345e840d53d2fe1066afb861e 100644 (file)
@@ -25,14 +25,11 @@ public class Ticket2106 extends Application {
     @Override
     public void init() {
         setMainWindow(new Window("#2106"));
-        getMainWindow().addComponent(
-                new Button("Do nothing", new Button.ClickListener() {
-                    public void buttonClick(ClickEvent event) {
-                        getMainWindow().addComponent(
-                                new Label("Last time did nothing: "
-                                        + new Date()));
-                    }
-                }));
+        getMainWindow().addComponent(new Button("Do nothing", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                getMainWindow().addComponent(new Label("Last time did nothing: " + new Date()));
+            }
+        }));
     }
 
 }
index 4c185801c3c82ac645c742afa4b97480efc37bbc..314cb0bd2ba74281f954425bc772ecdff2e3a655 100644 (file)
@@ -16,17 +16,14 @@ public class Ticket2107 extends Application {
         final Window w = new Window("Testing for #2107");
         setMainWindow(w);
 
-        final TextField tf = new TextField(
-                "Required field that validated the input");
+        final TextField tf = new TextField("Required field that validated the input");
         tf.setDescription("Enter someting and click outside the field to activate");
         tf.setRequired(true);
         tf.setImmediate(true);
         tf.addListener(new Property.ValueChangeListener() {
 
             public void valueChange(ValueChangeEvent event) {
-                w.showNotification("TextField is " + (tf.isValid() ? "" : "in")
-                        + "valid, with error: " + tf.getErrorMessage(),
-                        Notification.TYPE_WARNING_MESSAGE);
+                w.showNotification("TextField is " + (tf.isValid() ? "" : "in") + "valid, with error: " + tf.getErrorMessage(), Notification.TYPE_WARNING_MESSAGE);
             }
         });
         tf.addValidator(new Validator() {
@@ -37,22 +34,18 @@ public class Ticket2107 extends Application {
 
             public void validate(Object value) throws InvalidValueException {
                 if (!isValid(value)) {
-                    throw new InvalidValueException(
-                            "Text length must exceed 3 characters");
+                    throw new InvalidValueException("Text length must exceed 3 characters");
                 }
             }
         });
         w.addComponent(tf);
 
-        final Button b = new Button(
-                "Field should use error message. (!) should be shown when empty.",
-                false);
+        final Button b = new Button("Field should use error message. (!) should be shown when empty.", false);
         w.addComponent(b);
         b.setImmediate(true);
         b.addListener(new Property.ValueChangeListener() {
             public void valueChange(ValueChangeEvent event) {
-                tf.setRequiredError(b.booleanValue() ? "Field must not be empty"
-                        : null);
+                tf.setRequiredError(b.booleanValue() ? "Field must not be empty" : null);
             }
         });
     }
index 974b3c45721451dcc82b10be3353a22bd5623cac..8dd003baef99ce557437fd649f43077ffd7a60a8 100644 (file)
@@ -33,10 +33,8 @@ public class Ticket2117 extends Application {
         final Window w = new Window("Extra window: " + name);
         w.setName(name);
         addWindow(w);
-        w.addComponent(new Label(
-                "This window has been created on fly for name: " + name));
-        w.addComponent(new Label("It has also been redirected to " + w.getURL()
-                + " to support reloading"));
+        w.addComponent(new Label("This window has been created on fly for name: " + name));
+        w.addComponent(new Label("It has also been redirected to " + w.getURL() + " to support reloading"));
         w.addComponent(new Button("button", new ClickListener() {
             public void buttonClick(ClickEvent event) {
                 w.showNotification("Button clicked");
@@ -48,13 +46,7 @@ public class Ticket2117 extends Application {
 
     private Window createWindow() {
         final Window w = new Window();
-        w.addComponent(new Label(
-                "Click this link: <a target=\"_blank\" href='"
-                        + getURL().toExternalForm()
-                        + "'>"
-                        + getURL().toExternalForm()
-                        + "</a> which opens new windows to this uri. They should end up having a separate Window and URL.",
-                Label.CONTENT_XHTML));
+        w.addComponent(new Label("Click this link: <a target=\"_blank\" href='" + getURL().toExternalForm() + "'>" + getURL().toExternalForm() + "</a> which opens new windows to this uri. They should end up having a separate Window and URL.", Label.CONTENT_XHTML));
         return w;
     }
 }
index 7d3fea439ba6e6d882913281e82f26fdc1bde23f..3c516a6ee56d92b6d153d70a9fe67b2427cfbe58 100644 (file)
@@ -7,8 +7,8 @@ import com.vaadin.terminal.ExternalResource;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.Layout;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Select;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 /**
@@ -48,14 +48,8 @@ public class Ticket2119 extends Application {
     }
 
     private Layout testLayout() {
-        final Layout layout = new OrderedLayout();
-        final Label label = new Label(
-                "Instructions to reproduce:\n"
-                        + "  - Open this application in two browser windows\n"
-                        + "  - Click the Button in first Window\n"
-                        + "  - Go to the second Window\n"
-                        + "     - Click the arrow in the Select\n"
-                        + "  --> The opened list correctly shows the new value but the old one is shown in the \"input\" part");
+        final Layout layout = new VerticalLayout();
+        final Label label = new Label("Instructions to reproduce:\n" + "  - Open this application in two browser windows\n" + "  - Click the Button in first Window\n" + "  - Go to the second Window\n" + "     - Click the arrow in the Select\n" + "  --> The opened list correctly shows the new value but the old one is shown in the \"input\" part");
         label.setContentMode(Label.CONTENT_PREFORMATTED);
         layout.addComponent(label);
 
@@ -67,8 +61,7 @@ public class Ticket2119 extends Application {
         select.addItem("2");
         select.addItem("3");
 
-        final ObjectProperty<String> valueProperty = new ObjectProperty<String>(
-                "1", String.class);
+        final ObjectProperty<String> valueProperty = new ObjectProperty<String>("1", String.class);
         select.setPropertyDataSource(valueProperty);
         layout.addComponent(select);
 
index 378952489f38e8b0b52a25851ba11e2c87dc7544..23df8bb13bed4331d6c9e3957923d642ba4c52a1 100644 (file)
@@ -22,8 +22,7 @@ public class Ticket2125 extends Application {
         MainWindow(String caption) {
             super(caption);
 
-            addComponent(new Label(
-                    "Inspect w/ Firebug: row 5 should have a MYROW -style on the row, and MYCELL on all cells"));
+            addComponent(new Label("Inspect w/ Firebug: row 5 should have a MYROW -style on the row, and MYCELL on all cells"));
 
             Table table = new Table();
             table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
@@ -34,8 +33,7 @@ public class Ticket2125 extends Application {
             table.addContainerProperty("String", String.class, "a string");
             table.addContainerProperty("Boolean", Boolean.class, Boolean.TRUE);
             table.addGeneratedColumn("Generated", new ColumnGenerator() {
-                public Component generateCell(Table source, Object itemId,
-                        Object columnId) {
+                public Component generateCell(Table source, Object itemId, Object columnId) {
                     return new Label("Item " + itemId);
                 }
             });
@@ -52,8 +50,7 @@ public class Ticket2125 extends Application {
                 }
 
             });
-            Button b = new Button("editmode", new MethodProperty<Boolean>(
-                    table, "editable"));
+            Button b = new Button("editmode", new MethodProperty<Boolean>(table, "editable"));
             b.setImmediate(true);
             addComponent(b);
         }
index 526394da65a9d632e23789a39397338537ed831e..fad246399f8c429707843e64d0b8d3240605f84c 100644 (file)
@@ -65,11 +65,9 @@ public class Ticket2151 extends Application {
         }
 
         if (ok) {
-            status.setValue(status.getValue() + " "
-                    + class1.getClass().getSimpleName() + ": OK");
+            status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + ": OK");
         } else {
-            status.setValue(status.getValue() + " "
-                    + class1.getClass().getSimpleName() + ": FAILED");
+            status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + ": FAILED");
         }
 
     }
@@ -83,8 +81,7 @@ public class Ticket2151 extends Application {
             try {
                 b.setWriteThrough(true);
                 b.setReadThrough(true);
-                ObjectProperty<String> prop = new ObjectProperty<String>(
-                        "ABC 123");
+                ObjectProperty<String> prop = new ObjectProperty<String>("ABC 123");
                 /*
                  * This should throw an exception or somehow tell that the
                  * property was invalid (wrong type). See #2223.
@@ -99,11 +96,9 @@ public class Ticket2151 extends Application {
         }
 
         if (ok) {
-            status.setValue(status.getValue() + " "
-                    + class1.getClass().getSimpleName() + "/DB: OK");
+            status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + "/DB: OK");
         } else {
-            status.setValue(status.getValue() + " "
-                    + class1.getClass().getSimpleName() + "/DB: FAILED");
+            status.setValue(status.getValue() + " " + class1.getClass().getSimpleName() + "/DB: FAILED");
         }
 
     }
index c4f6ff30d398ef0d784a3ca2ae06fbf2a84aef54..302f01e0b896d97dad84e10716b7ca73185f77f5 100644 (file)
@@ -4,6 +4,7 @@ import com.vaadin.Application;
 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;
 
 public class Ticket2157 extends Application {
@@ -17,11 +18,11 @@ public class Ticket2157 extends Application {
     }
 
     private void createUI(OrderedLayout layout) {
-        OrderedLayout ol;
+        VerticalLayout ol;
         Panel p;
         ComboBox cb;
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox without width");
         // p.setWidth("100px");
@@ -31,7 +32,7 @@ public class Ticket2157 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox without width with caption");
         // p.setWidth("100px");
@@ -42,7 +43,7 @@ public class Ticket2157 extends Application {
         layout.addComponent(p);
 
         //
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100px wide");
         // p.setWidth("100px");
@@ -52,7 +53,7 @@ public class Ticket2157 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100px wide with caption");
         // p.setWidth("100px");
@@ -62,7 +63,7 @@ public class Ticket2157 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 500px wide");
         // p.setWidth("500px");
@@ -72,7 +73,7 @@ public class Ticket2157 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 500px wide with caption");
         // p.setWidth("500px");
@@ -82,7 +83,7 @@ public class Ticket2157 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100% wide");
         p.setWidth("200px");
@@ -93,7 +94,7 @@ public class Ticket2157 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100% wide with caption");
         p.setWidth("200px");
index c663b2977802d7a6b337dbcb8fcd0dfbec79921c..4c803bba5a0e78e4170066ba8b07c6251f6f950d 100644 (file)
@@ -4,6 +4,7 @@ import com.vaadin.Application;
 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;
 
 public class Ticket2178 extends Application {
@@ -17,11 +18,11 @@ public class Ticket2178 extends Application {
     }
 
     private void createUI(OrderedLayout layout) {
-        OrderedLayout ol;
+        VerticalLayout ol;
         Panel p;
         ComboBox cb;
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox without width");
         // p.setWidth("100px");
@@ -31,7 +32,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox without width with caption");
         // p.setWidth("100px");
@@ -41,7 +42,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100px wide");
         // p.setWidth("100px");
@@ -51,7 +52,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100px wide with caption");
         // p.setWidth("100px");
@@ -61,7 +62,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 500px wide");
         // p.setWidth("500px");
@@ -71,7 +72,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 500px wide with caption");
         // p.setWidth("500px");
@@ -81,7 +82,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100% wide inside 200px panel");
         p.setWidth("200px");
@@ -93,7 +94,7 @@ public class Ticket2178 extends Application {
         p.addComponent(cb);
         layout.addComponent(p);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         p = new Panel(ol);
         p.setCaption("Combobox 100% wide inside 200px panel with caption");
         p.setWidth("200px");
index 165e770307c6bce1fe4ff6938c73b0b644c925b3..9473a8e50e199ac3a82b10f6d9967693d497e777 100644 (file)
@@ -26,8 +26,7 @@ public class Ticket2179 extends Application {
         f.addListener(new Property.ValueChangeListener() {
 
             public void valueChange(ValueChangeEvent event) {
-                main.showNotification("Test field is "
-                        + (f.isValid() ? "valid" : "invalid"));
+                main.showNotification("Test field is " + (f.isValid() ? "valid" : "invalid"));
             }
         });
 
index 9f5e2a2de145dba0a18e49b1e32e1367ee4cda65..16fd13b3f94da4a14cb0ee6535ef80ab335e8d4c 100644 (file)
@@ -22,8 +22,7 @@ public class Ticket2180 extends Application {
         button.setWidth("100%");
         Label label1 = new Label("Lorem ipsum");
         Label label2 = new Label("Lorem");
-        Label label3 = new Label(
-                "Lorema jsdfhak sjdfh kajsdh fkajhd kfjah dkfjah ksfdjh kajsfh kj 1 2 3 4 5 6 7 8 9 10");
+        Label label3 = new Label("Lorema jsdfhak sjdfh kajsdh fkajhd kfjah dkfjah ksfdjh kajsfh kj 1 2 3 4 5 6 7 8 9 10");
 
         label3.setWidth("800px");
         tabSheet.addTab(label1, "Tab 1", null);
index 2754ad2541bfd4e297fd3d8a294537c199c21a71..90d9926991dd6e325758f31f9699fb89348367c7 100644 (file)
@@ -12,8 +12,8 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.OptionGroup;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2181 extends Application implements Button.ClickListener {
@@ -41,12 +41,12 @@ public class Ticket2181 extends Application implements Button.ClickListener {
     @Override
     public void init() {
         setMainWindow(main);
-        OrderedLayout ol;
-        ol = new OrderedLayout();
+        VerticalLayout ol;
+        ol = new VerticalLayout();
         ol.addComponent(tf1);
         main.addComponent(ol);
 
-        ol = new OrderedLayout();
+        ol = new VerticalLayout();
         ol.setWidth("150px");
         tf2.setWidth("150px");
         ol.addComponent(tf2);
@@ -91,8 +91,7 @@ public class Ticket2181 extends Application implements Button.ClickListener {
                     tf.setCaption(caption);
                 } else if (value.equals("Icon")) {
                     String timestamp = String.valueOf(new Date().getTime());
-                    tf.setIcon(new ThemeResource(icons.get(random.nextInt(icons
-                            .size())) + "?" + timestamp));
+                    tf.setIcon(new ThemeResource(icons.get(random.nextInt(icons.size())) + "?" + timestamp));
                 } else if (value.equals("Required")) {
                     tf.setRequired(true);
                 } else if (value.equals("Error")) {
index 55eff60fefdc588bcdaed11f9cc59ad285a83d94..ce06f4576bbb8e8f4824d5637fff303dc7da1068 100644 (file)
@@ -1,10 +1,11 @@
 package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
-import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2186 extends Application {
@@ -14,11 +15,10 @@ public class Ticket2186 extends Application {
         Window main = new Window("Quick test");
         setMainWindow(main);
 
-        OrderedLayout base = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout base = new HorizontalLayout();
         main.setLayout(base);
 
-        OrderedLayout content = new OrderedLayout();
+        VerticalLayout content = new VerticalLayout();
 
         content.addComponent(new Label("Content."));
         content.setWidth("500px");
index 0ba1b5e34633b89dfb83336bbb7fb032ffacccd0..59a88fe182c9b730ff77ea516ccf8ed94cb33cec 100644 (file)
@@ -112,7 +112,7 @@ public class Ticket2204 extends Application {
             return null;
         }
         // if (c == OrderedLayout.class) {
-        // cc = new OrderedLayout();
+        // cc = new VerticalLayout();
         // } else
         if (c == Accordion.class) {
             // Label l = new Label("Filler");
@@ -132,8 +132,7 @@ public class Ticket2204 extends Application {
                     return createField();
                 }
 
-                public Field createField(Item item, Object propertyId,
-                        Component uiContext) {
+                public Field createField(Item item, Object propertyId, Component uiContext) {
                     return createField();
                 }
 
@@ -143,8 +142,7 @@ public class Ticket2204 extends Application {
                     return formTextArea;
                 }
 
-                public Field createField(Container container, Object itemId,
-                        Object propertyId, Component uiContext) {
+                public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {
                     return createField();
                 }
 
index a326a0c3813ca8cf76a73dd1da7bd333a9f83ee4..c290e915626c628dae35aeeaf884604f175259e9 100644 (file)
@@ -25,11 +25,9 @@ public class Ticket2208 extends Application {
         t.setHeight("150px");\r
         t.addGeneratedColumn("col 3 (green)", new ColumnGenerator() {\r
 \r
-            public Component generateCell(Table source, Object itemId,\r
-                    Object columnId) {\r
+            public Component generateCell(Table source, Object itemId, Object columnId) {\r
                 Item item = source.getItem(itemId);\r
-                String col1 = (String) item.getItemProperty("col 1 (red)")\r
-                        .getValue();\r
+                String col1 = (String) item.getItemProperty("col 1 (red)").getValue();\r
                 String col2 = (String) item.getItemProperty("col 2").getValue();\r
                 return new Label(col1 + "-" + col2);\r
             }\r
@@ -51,12 +49,9 @@ public class Ticket2208 extends Application {
             }\r
         });\r
 \r
-        t.addItem(new Object[] { "Col 1-1", "Col 2-1", "Col 4-1" },\r
-                new Object());\r
-        t.addItem(new Object[] { "Col 1-2", "Col 2-2", "Col 4-2" },\r
-                new Object());\r
-        t.addItem(new Object[] { "Col 1-3", "Col 2-3", "Col 4-3" },\r
-                new Object());\r
+        t.addItem(new Object[] { "Col 1-1", "Col 2-1", "Col 4-1" }, new Object());\r
+        t.addItem(new Object[] { "Col 1-2", "Col 2-2", "Col 4-2" }, new Object());\r
+        t.addItem(new Object[] { "Col 1-3", "Col 2-3", "Col 4-3" }, new Object());\r
 \r
         t.setColumnReorderingAllowed(true);\r
         t.setColumnCollapsingAllowed(true);\r
index 7ee8a0740503dd116e14d4b7bdcbd8ee52d0bf1a..194ac42bf6bf970f5e519d1dd1c900a4b4b89110 100644 (file)
@@ -24,8 +24,7 @@ public class Ticket2209 extends Application {
         getMainWindow().addComponent(gl);\r
         setTheme("tests-tickets");\r
         combo = new ComboBox("Combo caption");\r
-        labelLong = new Label(\r
-                "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");\r
+        labelLong = new Label("A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");\r
         gl.addComponent(combo);\r
         gl.addComponent(labelLong);\r
 \r
index b9a44f6d9312fa4ca102990f58cd8992725f758c..1234175fc8e459556bbf24616464cc57094a7ca1 100644 (file)
@@ -6,12 +6,12 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.ComboBox;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2209OL extends Application {\r
 \r
-    private OrderedLayout gl;\r
+    private VerticalLayout gl;\r
     private ComboBox combo;\r
     private Label labelLong;\r
 \r
@@ -19,20 +19,12 @@ public class Ticket2209OL extends Application {
     public void init() {\r
         setMainWindow(new Window());\r
         getMainWindow().getLayout().setWidth("250px");\r
-        gl = new OrderedLayout();\r
+        gl = new VerticalLayout();\r
         gl.setStyleName("borders");\r
         getMainWindow().addComponent(gl);\r
         setTheme("tests-tickets");\r
         combo = new ComboBox("Combo caption");\r
-        labelLong = new Label(\r
-                "This should stay on one line or to wrap to multiple lines? At leas it should display all the text?. "\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");\r
+        labelLong = new Label("This should stay on one line or to wrap to multiple lines? At leas it should display all the text?. " + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");\r
         gl.addComponent(combo);\r
         gl.addComponent(labelLong);\r
 \r
index 0b8152b00390e88a6ffdb97d82f4a57063ac0eae..3f2531b80d662374a993b33dbd23f8c29c3fb69e 100644 (file)
@@ -6,12 +6,12 @@ import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;\r
 import com.vaadin.ui.ComboBox;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2209OL2 extends Application {\r
 \r
-    private OrderedLayout gl;\r
+    private VerticalLayout gl;\r
     private ComboBox combo;\r
     private Label labelLong;\r
 \r
@@ -19,26 +19,13 @@ public class Ticket2209OL2 extends Application {
     public void init() {\r
         setMainWindow(new Window());\r
         getMainWindow().getLayout().setWidth("250px");\r
-        gl = new OrderedLayout();\r
+        gl = new VerticalLayout();\r
         gl.setSizeUndefined();\r
         gl.setStyleName("borders");\r
         getMainWindow().addComponent(gl);\r
         setTheme("tests-tickets");\r
         combo = new ComboBox("Combo caption");\r
-        labelLong = new Label(\r
-                "This should stay on one line or to wrap to multiple lines? At leas it should display all the text?. "\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?"\r
-                        + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");\r
+        labelLong = new Label("This should stay on one line or to wrap to multiple lines? At leas it should display all the text?. " + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?" + "A long label, longer than the combo box. Why doesn't it affect the width? And why is the gridlayout so high?");\r
         gl.addComponent(combo);\r
         gl.addComponent(labelLong);\r
 \r
index 51b0236ad072c0666bc85315d1c8d5258a7bda81..700422910b5143969b49f42bcd633948a839b733 100644 (file)
@@ -2,8 +2,8 @@ package com.vaadin.tests.tickets;
 \r
 import com.vaadin.Application;\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
 \r
 public class Ticket2215 extends Application {\r
@@ -12,7 +12,7 @@ public class Ticket2215 extends Application {
     public void init() {\r
         setMainWindow(new Window());\r
 \r
-        OrderedLayout ol = new OrderedLayout();\r
+        VerticalLayout ol = new VerticalLayout();\r
         Panel p = new Panel("Test");\r
         p.addComponent(new Label("Panel1"));\r
         p.setHeight("500px");\r
index 8d53951959b688b0b142836751e536e1bf3b57fb..c12afec884198ced95f7a663e1e8c0ce179a7e51 100644 (file)
@@ -10,6 +10,7 @@ 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;
 import com.vaadin.ui.Window;
 
 public class Ticket2221 extends Application {
@@ -29,7 +30,7 @@ public class Ticket2221 extends Application {
 
     public class Invoice extends CustomComponent {
 
-        Layout main = new OrderedLayout();
+        Layout main = new VerticalLayout();
 
         private TextField tf;
 
@@ -42,23 +43,22 @@ public class Ticket2221 extends Application {
 
             setCompositionRoot(main);
             main.setSizeFull();
-            Button b = new Button("Switch textfield/panel",
-                    new ClickListener() {
+            Button b = new Button("Switch textfield/panel", new ClickListener() {
 
-                        public void buttonClick(ClickEvent event) {
-                            Component visible = tf;
+                public void buttonClick(ClickEvent event) {
+                    Component visible = tf;
 
-                            if (tf.isVisible()) {
-                                visible = outerPanel;
-                            }
+                    if (tf.isVisible()) {
+                        visible = outerPanel;
+                    }
 
-                            outerPanel.setVisible(false);
-                            tf.setVisible(false);
+                    outerPanel.setVisible(false);
+                    tf.setVisible(false);
 
-                            visible.setVisible(true);
-                        }
+                    visible.setVisible(true);
+                }
 
-                    });
+            });
             main.addComponent(b);
 
             tf = new TextField("TextField");
index 40980fcef273c2f67243840dbcc9d39d56b14d12..53001f0048a8c4ebb690c7ce7dd52b0e44b2d4fd 100644 (file)
@@ -2,8 +2,10 @@ package com.vaadin.tests.tickets;
 
 import com.vaadin.Application;
 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;
 
 public class Ticket2222 extends Application {
@@ -17,8 +19,7 @@ public class Ticket2222 extends Application {
     }
 
     private void createUI(OrderedLayout layout) {
-        OrderedLayout horiz = new OrderedLayout(
-                OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout horiz = new HorizontalLayout();
         horiz.setSpacing(true);
         horiz.setMargin(true);
         horiz.setStyleName("ticket2222");
@@ -30,8 +31,7 @@ public class Ticket2222 extends Application {
         horiz.addComponent(new Label("Margin-bottom: 30px;"));
         horiz.addStyleName("borders");
 
-        OrderedLayout vert = new OrderedLayout(
-                OrderedLayout.ORIENTATION_VERTICAL);
+        VerticalLayout vert = new VerticalLayout();
         vert.setSizeUndefined();
         vert.setSpacing(true);
         vert.setMargin(false);
index a8b48673232d252b6115245f005c2a3a766ce115..5edf4c0f131af21e936d73f99c7a493855690b84 100644 (file)
@@ -6,6 +6,7 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.OrderedLayout;
 import com.vaadin.ui.Table;
+import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
 public class Ticket2227OrderedlayoutInTable extends Application {
@@ -28,7 +29,7 @@ public class Ticket2227OrderedlayoutInTable extends Application {
         Item i = t.addItem(1);
         i.getItemProperty("pno").setValue("1");
         i.getItemProperty("testi").setValue("12.12.08");
-        OrderedLayout ol = new OrderedLayout();
+        VerticalLayout ol = new VerticalLayout();
         ol.setWidth("100%");
         ol.setHeight(null);
         ol.addComponent(new Label("monirivi testi"));
index 91e557fa848e480843ae64eb4b574604053209c8..b2da763ba05b3c9d1bc17c223087a9b538c8d570 100644 (file)
@@ -6,7 +6,7 @@ import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;\r
 import com.vaadin.ui.Layout;\r
 import com.vaadin.ui.Layout.SpacingHandler;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2232 extends Application {\r
@@ -16,13 +16,10 @@ public class Ticket2232 extends Application {
         setMainWindow(new Window());\r
         setTheme("tests-tickets");\r
 \r
-        getMainWindow()\r
-                .addComponent(\r
-                        new Label(\r
-                                "Defining spacing must be possible also with pure CSS"));\r
+        getMainWindow().addComponent(new Label("Defining spacing must be possible also with pure CSS"));\r
 \r
         Layout gl;\r
-        gl = new OrderedLayout();\r
+        gl = new VerticalLayout();\r
         gl.setWidth("100%");\r
         gl.setHeight("200px");\r
         gl.setStyleName("t2232");\r
@@ -34,7 +31,7 @@ public class Ticket2232 extends Application {
         gl.setStyleName("t2232");\r
         fillAndAdd(gl);\r
 \r
-        gl = new OrderedLayout();\r
+        gl = new VerticalLayout();\r
         gl.setWidth("100%");\r
         gl.setHeight("200px");\r
         ((SpacingHandler) gl).setSpacing(true);\r
@@ -46,7 +43,7 @@ public class Ticket2232 extends Application {
         ((SpacingHandler) gl).setSpacing(true);\r
         fillAndAdd(gl);\r
 \r
-        gl = new OrderedLayout();\r
+        gl = new VerticalLayout();\r
         gl.setWidth("100%");\r
         gl.setHeight("200px");\r
         fillAndAdd(gl);\r
@@ -65,8 +62,7 @@ public class Ticket2232 extends Application {
             gl.addComponent(b);\r
         }\r
         String caption = gl.getClass().getSimpleName();\r
-        caption += " style: " + gl.getStyleName() + ", spacingFromServer:"\r
-                + ((SpacingHandler) gl).isSpacingEnabled();\r
+        caption += " style: " + gl.getStyleName() + ", spacingFromServer:" + ((SpacingHandler) gl).isSpacingEnabled();\r
         gl.setCaption(caption);\r
         getMainWindow().addComponent(gl);\r
     }\r
index e28a463eed814628da8ecb6ce3a8c07ebd1dee0b..6aa1659568574fee28af01485206ff3272ab4959 100644 (file)
@@ -8,20 +8,7 @@ import com.vaadin.ui.Window;
 
 public class Ticket2240 extends Application {
 
-    public static final String txt = "<p>There are two main types of windows: application-level windows, and "
-            + "\"sub windows\".</p><p>A sub window is rendered as a \"inline\" popup window"
-            + " within the (native) browser window to which it was added. You can create"
-            + " a sub window by creating a new Window and adding it to a application-level window, for instance"
-            + " your main window. </p><p> In contrast, you create a application-level window by"
-            + " creating a new Window and adding it to the Application. Application-level"
-            + " windows are not shown by default - you need to open a browser window for"
-            + " the url representing the window. You can think of the application-level"
-            + " windows as separate views into your application - and a way to create a"
-            + " \"native\" browser window.</p><p>Depending on your needs, it's also"
-            + " possible to create a new window instance (with it's own internal state)"
-            + " for each new (native) browser window, or you can share the same instance"
-            + " (and state) between several browser windows (the latter is most useful"
-            + " for read-only views).</p><br/><p>This is the end.</p>";
+    public static final String txt = "<p>There are two main types of windows: application-level windows, and " + "\"sub windows\".</p><p>A sub window is rendered as a \"inline\" popup window" + " within the (native) browser window to which it was added. You can create" + " a sub window by creating a new Window and adding it to a application-level window, for instance" + " your main window. </p><p> In contrast, you create a application-level window by" + " creating a new Window and adding it to the Application. Application-level" + " windows are not shown by default - you need to open a browser window for" + " the url representing the window. You can think of the application-level" + " windows as separate views into your application - and a way to create a" + " \"native\" browser window.</p><p>Depending on your needs, it's also" + " possible to create a new window instance (with it's own internal state)" + " for each new (native) browser window, or you can share the same instance" + " (and state) between several browser windows (the latter is most useful" + " for read-only views).</p><br/><p>This is the end.</p>";
 
     @Override
     public void init() {
index e1f87d3885c2f8b5ef1ab0dc4ed5e166f591ed75..75f8506aabf70c90be650a3cd7373fad68a4942e 100644 (file)
@@ -29,17 +29,16 @@ public class Ticket2242 extends Application implements ValueChangeListener {
     }
 
     private void createUI(OrderedLayout layout) {
-        Button b = new Button("Change container datasource",
-                new ClickListener() {
+        Button b = new Button("Change container datasource", new ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        for (int i = 0; i < 5; i++) {
-                            t.setContainerDataSource(createContainer());
-                            // prop.setValue("ipsum");
-                        }
-                    }
+            public void buttonClick(ClickEvent event) {
+                for (int i = 0; i < 5; i++) {
+                    t.setContainerDataSource(createContainer());
+                    // prop.setValue("ipsum");
+                }
+            }
 
-                });
+        });
 
         layout.addComponent(b);
 
@@ -60,8 +59,7 @@ public class Ticket2242 extends Application implements ValueChangeListener {
         IndexedContainer ic = new IndexedContainer();
         ic.addContainerProperty("a", String.class, null);
 
-        for (String s : new String[] { "Lorem", "ipsum", "dolor", "sit",
-                "amet", "consectetuer" }) {
+        for (String s : new String[] { "Lorem", "ipsum", "dolor", "sit", "amet", "consectetuer" }) {
             Item item = ic.addItem(s);
             item.getItemProperty("a").setValue(s);
 
@@ -108,8 +106,7 @@ public class Ticket2242 extends Application implements ValueChangeListener {
     }
 
     public void valueChange(ValueChangeEvent event) {
-        System.out.println("Value change from " + tableValue + " to "
-                + t.getValue());
+        System.out.println("Value change from " + tableValue + " to " + t.getValue());
         tableValue = t.getValue();
     }
 
index e9ae3ac72020110737d193c7d958afd8513671c2..c63164f1e5ad3fb7dc910da4d684b764dc026ac1 100644 (file)
@@ -39,34 +39,30 @@ public class Ticket2244 extends Application {
             }
 
         }));
-        w.addComponent(new Button("new bigger item",
-                new Button.ClickListener() {
+        w.addComponent(new Button("new bigger item", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        form.setItemDataSource(new BeanItem<MyBean>(
-                                new MyBiggerBean()));
+            public void buttonClick(ClickEvent event) {
+                form.setItemDataSource(new BeanItem<MyBean>(new MyBiggerBean()));
 
-                    }
+            }
 
-                }));
-        w.addComponent(new Button("new grid layout",
-                new Button.ClickListener() {
+        }));
+        w.addComponent(new Button("new grid layout", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        form.setLayout(new GridLayout());
+            public void buttonClick(ClickEvent event) {
+                form.setLayout(new GridLayout());
 
-                    }
+            }
 
-                }));
-        w.addComponent(new Button("new form layout",
-                new Button.ClickListener() {
+        }));
+        w.addComponent(new Button("new form layout", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        form.setLayout(new FormLayout());
+            public void buttonClick(ClickEvent event) {
+                form.setLayout(new FormLayout());
 
-                    }
+            }
 
-                }));
+        }));
 
     }
 
index 5a92f85b32ce65605134bc3cd5880ee08bbcbd0d..4ef5c31cca24c9bb7f27f2bfab29dff2d3ccaa55 100644 (file)
@@ -72,8 +72,7 @@ public class Ticket2279 extends Application {
         vl.setWidth("500px");
         vl.setHeight("500px");
         vl.setStyleName("borders");
-        label = new Label("<b>Error messages follows:</b><br/>",
-                Label.CONTENT_XHTML);
+        label = new Label("<b>Error messages follows:</b><br/>", Label.CONTENT_XHTML);
         vl.addComponent(label);
         layout.addComponent(vl);
 
@@ -83,8 +82,7 @@ public class Ticket2279 extends Application {
         gl.setWidth("500px");
         gl.setHeight("500px");
         gl.setStyleName("borders");
-        label = new Label("<b>Error messages follows:</b><br/>",
-                Label.CONTENT_XHTML);
+        label = new Label("<b>Error messages follows:</b><br/>", Label.CONTENT_XHTML);
         gl.addComponent(label);
         layout.addComponent(gl);
 
@@ -100,101 +98,82 @@ public class Ticket2279 extends Application {
         for (String horiz : horizontals) {
             // Test "l","r","left","right" etc
             int expectedHoriz = expected.get(horiz);
-            checkAlignment(layout, horiz, AlignmentHandler.ALIGNMENT_TOP
-                    | expectedHoriz);
+            checkAlignment(layout, horiz, AlignmentHandler.ALIGNMENT_TOP | expectedHoriz);
 
             for (String vert : shortVerticalAlignments) {
                 int expectedVert = expected.get(vert);
 
                 // Test "lt","rt" etc
                 if (horiz.length() == 1) {
-                    checkAlignment(layout, horiz + vert, expectedHoriz
-                            | expectedVert);
-                    checkAlignment(layout, vert + horiz, expectedHoriz
-                            | expectedVert);
+                    checkAlignment(layout, horiz + vert, expectedHoriz | expectedVert);
+                    checkAlignment(layout, vert + horiz, expectedHoriz | expectedVert);
                 } else {
                     boolean ok = false;
                     try {
-                        checkAlignment(layout, horiz + vert, expectedHoriz
-                                | expectedVert);
+                        checkAlignment(layout, horiz + vert, expectedHoriz | expectedVert);
                     } catch (IllegalArgumentException e) {
                         // OK, "centert","rightb" etc are not valid
                         ok = true;
                     }
                     if (!ok) {
-                        error("IllegalArgumentException was not thrown for "
-                                + horiz + vert);
+                        error("IllegalArgumentException was not thrown for " + horiz + vert);
                     }
                     ok = false;
                     try {
-                        checkAlignment(layout, vert + horiz, expectedHoriz
-                                | expectedVert);
+                        checkAlignment(layout, vert + horiz, expectedHoriz | expectedVert);
                     } catch (IllegalArgumentException e) {
                         // OK, "centert","rightb" etc are not valid
                         ok = true;
                     }
                     if (!ok) {
-                        error("IllegalArgumentException was not thrown for "
-                                + horiz + vert);
+                        error("IllegalArgumentException was not thrown for " + horiz + vert);
                     }
 
                 }
 
                 // Test "l t","r t" etc
-                checkAlignment(layout, horiz + " " + vert, expectedHoriz
-                        | expectedVert);
-                checkAlignment(layout, vert + " " + horiz, expectedHoriz
-                        | expectedVert);
+                checkAlignment(layout, horiz + " " + vert, expectedHoriz | expectedVert);
+                checkAlignment(layout, vert + " " + horiz, expectedHoriz | expectedVert);
             }
 
             for (String vert : longVerticalAlignments) {
                 int expectedVert = expected.get(vert);
 
                 // Test "right t","right b" etc
-                checkAlignment(layout, horiz + " " + vert, expectedHoriz
-                        | expectedVert);
-                checkAlignment(layout, vert + " " + horiz, expectedHoriz
-                        | expectedVert);
+                checkAlignment(layout, horiz + " " + vert, expectedHoriz | expectedVert);
+                checkAlignment(layout, vert + " " + horiz, expectedHoriz | expectedVert);
 
                 // Three alignments should throw an exception
                 boolean ok = false;
                 try {
-                    checkAlignment(layout, horiz + " " + vert + " " + horiz,
-                            expectedHoriz | expectedVert);
+                    checkAlignment(layout, horiz + " " + vert + " " + horiz, expectedHoriz | expectedVert);
                 } catch (IllegalArgumentException e) {
                     // OK, "centert","rightb" etc are not valid
                     ok = true;
                 }
                 if (!ok) {
-                    error("IllegalArgumentException was not thrown for "
-                            + horiz + " " + vert + " " + horiz);
+                    error("IllegalArgumentException was not thrown for " + horiz + " " + vert + " " + horiz);
                 }
             }
         }
 
-        checkAlignment(layout, "left right", AlignmentHandler.ALIGNMENT_TOP
-                | AlignmentHandler.ALIGNMENT_RIGHT);
+        checkAlignment(layout, "left right", AlignmentHandler.ALIGNMENT_TOP | AlignmentHandler.ALIGNMENT_RIGHT);
     }
 
-    private void checkAlignment(AlignmentHandler layout,
-            String alignmentString, int expected) {
-        layout.setComponentAlignment(label, AlignmentInfo.Bits.ALIGNMENT_TOP,
-                AlignmentInfo.Bits.ALIGNMENT_LEFT);
+    private void checkAlignment(AlignmentHandler layout, String alignmentString, int expected) {
+        layout.setComponentAlignment(label, AlignmentInfo.Bits.ALIGNMENT_TOP, AlignmentInfo.Bits.ALIGNMENT_LEFT);
         if (layout instanceof AbstractOrderedLayout) {
-            ((AbstractOrderedLayout) layout).setComponentAlignment(label,
-                    alignmentString);
+            ((AbstractOrderedLayout) layout).setComponentAlignment(label, alignmentString);
         } else {
             ((GridLayout) layout).setComponentAlignment(label, alignmentString);
         }
 
         int actual = layout.getComponentAlignment(label).getBitMask();
         if (actual != expected) {
-            String error = "Error " + alignmentString
-                    + " did not produce expected results";
+            String error = "Error " + alignmentString + " did not produce expected results";
             error(error);
         } else {
-            String str = layout.getClass().getSimpleName() + "/"
-                    + alignmentString + ": OK";
+            String str = layout.getClass().getSimpleName() + "/" + alignmentString + ": OK";
             System.out.println(str);
         }
 
index 14467cf48373bc2fc2a1d352a31cf11384e8f790..92156edb7671b449889c7da60f63a4b4353db89e 100644 (file)
@@ -22,8 +22,7 @@ public class Ticket2282 extends Application {
         layout1 = new FormLayout();
         layout1.setSizeUndefined();
         layout1.setStyleName("borders");
-        Label label = new Label(
-                "This should not be wider than this label + reserved error space");
+        Label label = new Label("This should not be wider than this label + reserved error space");
         label.setCaption("A caption");
         layout1.addComponent(label);
         w.addComponent(layout1);
index 5831b9638fa221edea501cfc0b49751f235ba48d..6bc578099d04481d8da5ca2c60542c520fd0eae7 100644 (file)
@@ -16,13 +16,11 @@ public class Ticket2283 extends Application {
         GridLayout gl = new GridLayout(2, 2);
         gl.setSizeUndefined();
 
-        gl.addComponent(new Label(
-                "Label 1 abc abc abcasdfas dfasd fasdf asdf sadf asdf"));
+        gl.addComponent(new Label("Label 1 abc abc abcasdfas dfasd fasdf asdf sadf asdf"));
         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, AlignmentHandler.ALIGNMENT_RIGHT, AlignmentHandler.ALIGNMENT_TOP);
         w.setLayout(gl);
 
     }
index 5d4ac308ef6888a014d55e1d518421afc1f70323..0323433c09a12efd765a5b8c68e850ea979a761c 100644 (file)
@@ -9,23 +9,19 @@ public class Ticket2287 extends Ticket2292 {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
         URL url = getURL();\r
-        main.addComponent(new Label(\r
-                "Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));\r
+        main.addComponent(new Label("Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));\r
 \r
         Label l = new Label();\r
         l.setContentMode(Label.CONTENT_XHTML);\r
-        l.setValue("This is a label with as slow image. <img src=\"" + url\r
-                + "/icon.png\" />");\r
+        l.setValue("This is a label with as slow image. <img src=\"" + url + "/icon.png\" />");\r
         main.addComponent(l);\r
 \r
         l = new Label();\r
         l.setContentMode(Label.CONTENT_XHTML);\r
-        l.setValue("This is a label with as slow image. <img src=\"" + url\r
-                + "/icon.png\" />");\r
+        l.setValue("This is a label with as slow image. <img src=\"" + url + "/icon.png\" />");\r
         main.addComponent(l);\r
 \r
     }\r
index 2fd7c3511a5d0045151fd172a35b01d37160b3ff..9a1dd90242c51ca7b84dc3db9a098b99c41880d4 100644 (file)
@@ -22,13 +22,11 @@ public class Ticket2292 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         ExternalResource icon = new ExternalResource("./icon.png");\r
-        main.addComponent(new Label(\r
-                "Note, run with trailing slash in url to have a working icon. Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)"));\r
+        main.addComponent(new Label("Note, run with trailing slash in url to have a working icon. Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)"));\r
         Button b = new Button();\r
         main.addComponent(b);\r
         b.setIcon(icon);\r
@@ -56,8 +54,7 @@ public class Ticket2292 extends com.vaadin.Application {
             e1.printStackTrace();\r
         }\r
 \r
-        BufferedImage image = new BufferedImage(200, 200,\r
-                BufferedImage.TYPE_INT_RGB);\r
+        BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);\r
         Graphics drawable = image.getGraphics();\r
         drawable.setColor(Color.lightGray);\r
         drawable.fillRect(0, 0, 200, 200);\r
@@ -76,8 +73,7 @@ public class Ticket2292 extends com.vaadin.Application {
             ImageIO.write(image, "png", imagebuffer);\r
 \r
             // Return a stream from the buffer.\r
-            ByteArrayInputStream istream = new ByteArrayInputStream(\r
-                    imagebuffer.toByteArray());\r
+            ByteArrayInputStream istream = new ByteArrayInputStream(imagebuffer.toByteArray());\r
             return new DownloadStream(istream, null, null);\r
         } catch (IOException e) {\r
             return null;\r
index de18bf94ef2c092ab101327d71da0306ac764a58..ba9c4fb9f136b033ddf889faf113b72850b84f67 100644 (file)
@@ -26,18 +26,14 @@ public class Ticket2294 extends Application {
 
         layout.addComponent(label1);
         try {
-            layout.setComponentAlignment(label1,
-                    AlignmentHandler.ALIGNMENT_LEFT,
-                    AlignmentHandler.ALIGNMENT_BOTTOM);
+            layout.setComponentAlignment(label1, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
             result1 = "OK";
         } catch (Exception e) {
             result1 = "FAILED: " + e.getMessage();
         }
 
         try {
-            layout.setComponentAlignment(label2,
-                    AlignmentHandler.ALIGNMENT_LEFT,
-                    AlignmentHandler.ALIGNMENT_BOTTOM);
+            layout.setComponentAlignment(label2, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
             result2 = "FAILED, no exception";
         } catch (IllegalArgumentException e) {
             result2 = "OK";
@@ -46,9 +42,7 @@ public class Ticket2294 extends Application {
         }
 
         try {
-            layout.setComponentAlignment(label3,
-                    AlignmentHandler.ALIGNMENT_LEFT,
-                    AlignmentHandler.ALIGNMENT_BOTTOM);
+            layout.setComponentAlignment(label3, AlignmentHandler.ALIGNMENT_LEFT, AlignmentHandler.ALIGNMENT_BOTTOM);
             result3 = "FAILED, no exception";
         } catch (IllegalArgumentException e) {
             result3 = "OK";
@@ -56,7 +50,6 @@ public class Ticket2294 extends Application {
             result3 = "FAILED: " + e.getMessage();
         }
 
-        label1.setValue("Result 1: " + result1 + ", result 2: " + result2
-                + ", result 3: " + result3);
+        label1.setValue("Result 1: " + result1 + ", result 2: " + result2 + ", result 3: " + result3);
     }
 }
index da257b4ae8d5ee445bf949ba9554550276f62d77..f105beb83569ad109852dedce91fa2c6ab1b0e3c 100644 (file)
@@ -12,26 +12,16 @@ public class Ticket2297 extends Ticket2292 {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(\r
-                getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
         URL url = getURL();\r
-        main.addComponent(new Label(\r
-                "Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));\r
+        main.addComponent(new Label("Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));\r
 \r
         try {\r
-            CustomLayout cl = new CustomLayout(\r
-                    new ByteArrayInputStream(\r
-                            ("This is an empty CustomLayout with as slow image. <img src=\""\r
-                                    + url.toString() + "/icon.png\" />")\r
-                                    .getBytes()));\r
+            CustomLayout cl = new CustomLayout(new ByteArrayInputStream(("This is an empty CustomLayout with as slow image. <img src=\"" + url.toString() + "/icon.png\" />").getBytes()));\r
             main.addComponent(cl);\r
 \r
-            cl = new CustomLayout(\r
-                    new ByteArrayInputStream(\r
-                            ("This is an empty CustomLayout with as slow image. <img src=\""\r
-                                    + url.toString() + "/icon.png\" />")\r
-                                    .getBytes()));\r
+            cl = new CustomLayout(new ByteArrayInputStream(("This is an empty CustomLayout with as slow image. <img src=\"" + url.toString() + "/icon.png\" />").getBytes()));\r
             main.addComponent(cl);\r
         } catch (IOException e) {\r
             // TODO Auto-generated catch block\r
index 36dd842140095f2a33f5034492220fca43592530..ec00f17bc52070c08defaceca00c038fba0e933c 100644 (file)
@@ -6,7 +6,7 @@ import java.io.IOException;
 import com.vaadin.Application;\r
 import com.vaadin.ui.CustomLayout;\r
 import com.vaadin.ui.Label;\r
-import com.vaadin.ui.OrderedLayout;\r
+import com.vaadin.ui.VerticalLayout;\r
 import com.vaadin.ui.Window;\r
 \r
 public class Ticket2303 extends Application {\r
@@ -18,8 +18,7 @@ public class Ticket2303 extends Application {
         String customlayout = "<div location=\"test\"></div>";\r
         CustomLayout cl = null;\r
         try {\r
-            cl = new CustomLayout(new ByteArrayInputStream(\r
-                    customlayout.getBytes()));\r
+            cl = new CustomLayout(new ByteArrayInputStream(customlayout.getBytes()));\r
         } catch (IOException e) {\r
             // TODO Auto-generated catch block\r
             e.printStackTrace();\r
@@ -29,7 +28,7 @@ public class Ticket2303 extends Application {
 \r
         // VerticalLayout ol = new VerticalLayout();\r
         // w.setLayout(ol);\r
-        OrderedLayout hugeLayout = new OrderedLayout();\r
+        VerticalLayout hugeLayout = new VerticalLayout();\r
         hugeLayout.setMargin(true);\r
         hugeLayout.setSpacing(true);\r
         for (int i = 0; i < 30; i++) {\r
index 57c7acefc16fe3384fe6768cef9a7ed5ae75e653..b68b7f8295ce1990ddc3c8b07649a3cf9d2854b3 100644 (file)
@@ -9,8 +9,7 @@ public class Ticket2304 extends Application {
 
     @Override
     public void init() {
-        final Window main = new Window(getClass().getName().substring(
-                getClass().getName().lastIndexOf(".") + 1));
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));
         setMainWindow(main);
 
         Panel p = new Panel();
@@ -18,12 +17,10 @@ public class Ticket2304 extends Application {
         main.addComponent(p);
         p.setHeight("100px");
 
-        Label l = new Label(
-                "a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n");
+        Label l = new Label("a\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\na\n");
         l.setContentMode(Label.CONTENT_PREFORMATTED);
         p.addComponent(l);
-        main.addComponent(new Label(
-                "This text should be right below the panel, w/o spacing"));
+        main.addComponent(new Label("This text should be right below the panel, w/o spacing"));
     }
 
 }
index 82928d9c91dbf7ddd0e411dbe333ab3625e85135..0bb594b1b8ce4262fd41c09966ab8636d435ec06 100644 (file)
@@ -11,13 +11,10 @@ public class Ticket2310 extends Application {
 
     @Override
     public void init() {
-        final Window main = new Window(getClass().getName().substring(
-                getClass().getName().lastIndexOf(".") + 1));
+        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));
         setMainWindow(main);
 
-        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."));
+        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);
index b48302a1f48cac2de3affaf05bc256d534b938a5..bcbe760eb4110d91521f419f2a8ac71b6e070f01 100644 (file)
@@ -16,8 +16,7 @@ public class Ticket2319 extends Application {
         Window mainw = new Window();
         setMainWindow(mainw);
 
-        mainw.addComponent(new Label(
-                "This test has somewhat invalid layouts in it to detect analyzy layout function in debug dialog"));
+        mainw.addComponent(new Label("This test has somewhat invalid layouts in it to detect analyzy layout function in debug dialog"));
 
         HorizontalLayout hl = new HorizontalLayout();
         Panel panel = new Panel("p1");
index 3b46d89a5e9f5c53ed0a526aad39e49d51a97e44..12cb967dfd8164bd5b6323e1e20800962a685067 100644 (file)
@@ -16,13 +16,11 @@ public class Ticket2325 extends Application {
         lo.setSizeUndefined();
         lo.setWidth("100%");
         TextField tf = new TextField();
-        tf.setValue("The textfield should fill the window."
-                + "\n - Try to resize window\n - Try to push REdo button");
+        tf.setValue("The textfield should fill the window." + "\n - Try to resize window\n - Try to push REdo button");
         tf.setRows(10);
         tf.setWidth("100%");
         lo.addComponent(tf);
-        Window subWin = new Window(
-                "This window should initially be as wide as the caption", lo);
+        Window subWin = new Window("This window should initially be as wide as the caption", lo);
         main.addWindow(subWin);
         // subWin.setWidth("500px");
     }
index f7b47f6708866dfbf352e86319474462c7f1de84..07242770c9593c3a2be7aed36014e74025f30569 100644 (file)
@@ -34,8 +34,7 @@ public class Ticket2329 extends Application {
     }
 
     class TestColumnGenerator implements ColumnGenerator {
-        public Component generateCell(Table source, Object rowId,
-                Object columnId) {
+        public Component generateCell(Table source, Object rowId, Object columnId) {
             return new Button("1");
         }
     }
index 9277a01f96c8b58094ea6f487c04a9239d554c75..695846920300ee3b9bfbe2de24f3add8eb1d7e57 100644 (file)
@@ -18,8 +18,7 @@ public class Ticket2337 extends Application {
         Button b = new Button("add", new Button.ClickListener() {
 
             public void buttonClick(ClickEvent event) {
-                gl.addComponent(new Label("asd"), 0, gl.getCursorY(), 2,
-                        gl.getCursorY());
+                gl.addComponent(new Label("asd"), 0, gl.getCursorY(), 2, gl.getCursorY());
 
             }
 
index 6476807ada640077223ebc084adece5239e59bd4..2d6e681111f54067e8aade43c0518f04b3fbe6a5 100644 (file)
@@ -17,10 +17,7 @@ public class Ticket2339 extends Application {
         setMainWindow(mainWin);
 
         try {
-            CustomLayout cl = new CustomLayout(
-                    new ByteArrayInputStream(
-                            "<div style=\"width:400px;overflow:hidden;background-color:red;\"><div style=\"border:1em solid blue; height:4em; padding:1em 1.5em;\" location=\"b\"></div></div>"
-                                    .getBytes()));
+            CustomLayout cl = new CustomLayout(new ByteArrayInputStream("<div style=\"width:400px;overflow:hidden;background-color:red;\"><div style=\"border:1em solid blue; height:4em; padding:1em 1.5em;\" location=\"b\"></div></div>".getBytes()));
             Button button = new Button("b");
             button.setSizeFull();
 
index dee0417eff540446820b393deae3eca679b29967..dd6a9f5bd4898f802b160f491a037ea0c32ad9a4 100644 (file)
@@ -30,8 +30,7 @@ public class Ticket2398 extends Application {
 
         t.setRowHeaderMode(Table.ROW_HEADER_MODE_ID);
 
-        mainWin.addComponent(new Label(
-                "Both rows in table should have same data (default values)"));
+        mainWin.addComponent(new Label("Both rows in table should have same data (default values)"));
 
         mainWin.addComponent(t);
 
index 174d6e5d6cf608559be322a6b50a645344384c4e..633827ba774166ca63bf0ef1996a6db9d5194f56 100644 (file)
@@ -43,14 +43,12 @@ public class Ticket2405 extends Application {
         // Let's attach that one straight away too
         root.addComponent(top);
 
-        label = new Label(
-                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor porta lacus. Nulla tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin mollis turpis in mauris faucibus posuere. Nullam rutrum, nisi a fermentum tempus, lacus metus rutrum massa, a condimentum mauris justo a tortor. Mauris aliquet, ante quis ultricies posuere, sapien libero laoreet sem, a accumsan diam metus sed elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur vehicula metus nec turpis dignissim cursus. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam feugiat orci eget risus. Vestibulum at sem. ");
+        label = new Label("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor porta lacus. Nulla tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin mollis turpis in mauris faucibus posuere. Nullam rutrum, nisi a fermentum tempus, lacus metus rutrum massa, a condimentum mauris justo a tortor. Mauris aliquet, ante quis ultricies posuere, sapien libero laoreet sem, a accumsan diam metus sed elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur vehicula metus nec turpis dignissim cursus. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam feugiat orci eget risus. Vestibulum at sem. ");
         label.setWidth("100%");
         top.addComponent(label);
         split = new SplitPanel(SplitPanel.ORIENTATION_HORIZONTAL);
         split.setHeight("100%");
-        Embedded image = new Embedded("An image", new ExternalResource(
-                "http://dev.itmill.com/chrome/site/toolkit-logo.png"));
+        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);
index b402ced30085cc76a94b461ddc51f286ad5a0714..89279002f51f6f915555867a569cbf37571dbe81 100644 (file)
@@ -19,8 +19,7 @@ public class Ticket2411 extends Application {
         l.setHeight("504px");\r
 \r
         for (int i = 1; i <= 5; i++) {\r
-            Button b = new Button("Button " + i\r
-                    + " should be 100px or 101px high");\r
+            Button b = new Button("Button " + i + " should be 100px or 101px high");\r
             b.setHeight("100%");\r
             l.addComponent(b);\r
         }\r
index 90e2ce438d8e0bc16be240b3c25058cf5369e770..e2f6b25279ffea9dc70f66685d8f47d69256f671 100644 (file)
@@ -13,15 +13,12 @@ public class Ticket2426 extends Application {
 
         final String content = "<select/>";
 
-        w.addComponent(new Label("CONTENT_DEFAULT: " + content,
-                Label.CONTENT_DEFAULT));
-        w.addComponent(new Label("CONTENT_PREFORMATTED: " + content,
-                Label.CONTENT_PREFORMATTED));
+        w.addComponent(new Label("CONTENT_DEFAULT: " + content, Label.CONTENT_DEFAULT));
+        w.addComponent(new Label("CONTENT_PREFORMATTED: " + content, Label.CONTENT_PREFORMATTED));
         w.addComponent(new Label("CONTENT_RAW: " + content, Label.CONTENT_RAW));
         w.addComponent(new Label("CONTENT_TEXT: " + content, Label.CONTENT_TEXT));
         w.addComponent(new Label("CONTENT_XML: " + content, Label.CONTENT_XML));
-        w.addComponent(new Label("CONTENT_XHTML: " + content,
-                Label.CONTENT_XHTML));
+        w.addComponent(new Label("CONTENT_XHTML: " + content, Label.CONTENT_XHTML));
 
     }
 
index e1eb2531f278825e2f2cd1d4d326f2e76e734d7d..283b0d8ca9281b03e42d10798d6547f996498dc3 100644 (file)
@@ -16,17 +16,14 @@ public class Ticket2431 extends Application {
 
         Window w = new Window();
         setMainWindow(w);
-        Label help = new Label(
-                "Use CTRL X to fire action, CTRL C to remove it (fails before fix)");
+        Label help = new Label("Use CTRL X to fire action, CTRL C to remove it (fails before fix)");
 
         w.addComponent(help);
 
         w.addActionHandler(new Handler() {
 
-            final ShortcutAction a1 = new ShortcutAction("action", KeyCode.X,
-                    new int[] { ModifierKey.CTRL });
-            final ShortcutAction a2 = new ShortcutAction("action", KeyCode.C,
-                    new int[] { ModifierKey.CTRL });
+            final ShortcutAction a1 = new ShortcutAction("action", KeyCode.X, new int[] { ModifierKey.CTRL });
+            final ShortcutAction a2 = new ShortcutAction("action", KeyCode.C, new int[] { ModifierKey.CTRL });
 
             Action[] actions = new Action[] { a1, a2 };
 
index c5465b917d3e62798944a306f3e4edc408266a94..398b72e16311b25110e0e203983e0e5195018050 100644 (file)
@@ -29,19 +29,14 @@ public class Ticket2432 extends Application {
 
     }
 
-    private static Alignment[] alignments = new Alignment[] {
-            Alignment.TOP_LEFT, Alignment.TOP_CENTER, Alignment.TOP_RIGHT,
-            Alignment.MIDDLE_LEFT, Alignment.MIDDLE_CENTER,
-            Alignment.MIDDLE_RIGHT, Alignment.BOTTOM_LEFT,
-            Alignment.BOTTOM_CENTER, Alignment.BOTTOM_RIGHT };
+    private static Alignment[] alignments = new Alignment[] { Alignment.TOP_LEFT, Alignment.TOP_CENTER, Alignment.TOP_RIGHT, Alignment.MIDDLE_LEFT, Alignment.MIDDLE_CENTER, Alignment.MIDDLE_RIGHT, Alignment.BOTTOM_LEFT, Alignment.BOTTOM_CENTER, Alignment.BOTTOM_RIGHT };
 
     private void populateLayout(Layout layout) {
         layout.setSizeFull();
         for (int i = 0; i < 9; i++) {
             Label l = new Label("M");
             Alignment a = alignments[i];
-            l.setCaption(a.getHorizontalAlignment() + " "
-                    + a.getVerticalAlignment() + " " + a.getBitMask());
+            l.setCaption(a.getHorizontalAlignment() + " " + a.getVerticalAlignment() + " " + a.getBitMask());
             layout.addComponent(l);
             ((AlignmentHandler) layout).setComponentAlignment(l, a);
         }
index 5d4a884895cae078e6d76dedfbe6fa0c7898c094..a37c31a69a7bf5dfe07b0507925a1bd42210de47 100644 (file)
@@ -14,8 +14,7 @@ public class Ticket2434 extends Application {
 
         setMainWindow(w);
 
-        Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3,
-                50);
+        Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3, 50);
 
         t.setPageLength(0);
 
index cd1e8e682ec2815e7f598434a23afce5041cf0e0..c5118bf2d6f6ef8f74a80fdc8d916db6c0530977 100644 (file)
@@ -16,16 +16,14 @@ public class Ticket2440 extends Application {
     public void init() {
         final Window main = new MainWindow();
         setMainWindow(main);
-        main.addComponent(new Label(
-                "Clicking the link should open a new window that should receive the URI 'msg/hello' and add that a a Label to it's ui. Currently the Label ends up in this (main) window (try reloading). Console intentionally spams during the window finding/uri handling - looks, uhm, interesting."));
+        main.addComponent(new Label("Clicking the link should open a new window that should receive the URI 'msg/hello' and add that a a Label to it's ui. Currently the Label ends up in this (main) window (try reloading). Console intentionally spams during the window finding/uri handling - looks, uhm, interesting."));
     }
 
     @Override
     public Window getWindow(String name) {
         System.err.println("Looking for " + name);
         if ("msg".equals(name)) {
-            System.err
-                    .println(" rest uri, returning new MainWindow with message from uri");
+            System.err.println(" rest uri, returning new MainWindow with message from uri");
             MainWindow restWindow = new MainWindow();
             addWindow(restWindow);
             return restWindow;
@@ -50,16 +48,11 @@ public class Ticket2440 extends Application {
         public MainWindow() {
             super("Main window");
 
-            addComponent(new Link("new mainwin", new ExternalResource(
-                    Ticket2440.this.getURL() + "msg/hello"), "_blank", -1, -1,
-                    Window.BORDER_DEFAULT));
+            addComponent(new Link("new mainwin", new ExternalResource(Ticket2440.this.getURL() + "msg/hello"), "_blank", -1, -1, Window.BORDER_DEFAULT));
 
             addURIHandler(new URIHandler() {
                 public DownloadStream handleURI(URL context, String relativeUri) {
-                    System.err
-                            .println((getMainWindow() == getWindow() ? "mainwin: "
-                                    : "subwin: ")
-                                    + context + ", " + relativeUri);
+                    System.err.println((getMainWindow() == getWindow() ? "mainwin: " : "subwin: ") + context + ", " + relativeUri);
                     addComponent(new Label(relativeUri));
                     return null;
                 }
index 11fc3194b06077d5df43489110620c288deb2343..a5bb5a56b5cc00e4115091ac4d6691e4ee246838 100644 (file)
@@ -150,8 +150,7 @@ public class Ticket2998 extends Application {
         }\r
 \r
         @Override\r
-        public Field createField(Container container, Object itemId,\r
-                Object propertyId, Component uiContext) {\r
+        public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {\r
 \r
             /*\r
              * trainingType is manyToOne relation, give it a combobox\r
@@ -167,8 +166,7 @@ public class Ticket2998 extends Application {
                 return getSecondaryTypesList(itemId);\r
             }\r
 \r
-            final Field f = super.createField(container, itemId, propertyId,\r
-                    uiContext);\r
+            final Field f = super.createField(container, itemId, propertyId, uiContext);\r
             if (f != null) {\r
                 if (f instanceof TextField) {\r
                     TextField tf = (TextField) f;\r
@@ -183,15 +181,13 @@ public class Ticket2998 extends Application {
                                 float f = Float.parseFloat((String) value);\r
                                 return true;\r
                             } catch (Exception e) {\r
-                                f.getWindow().showNotification(\r
-                                        "Bad number value");\r
+                                f.getWindow().showNotification("Bad number value");\r
                                 f.setValue(0);\r
                                 return false;\r
                             }\r
                         }\r
 \r
-                        public void validate(Object value)\r
-                                throws InvalidValueException {\r
+                        public void validate(Object value) throws InvalidValueException {\r
                             // TODO Auto-generated method stub\r
 \r
                         }\r
@@ -311,9 +307,7 @@ public class Ticket2998 extends Application {
         c.set(Calendar.SECOND, 0);\r
         c.set(Calendar.MINUTE, 0);\r
 \r
-        String[] titles = new String[] { "A short easy one", "intervals",\r
-                "very long", "just shaking legs after work",\r
-                "long one with Paul", "test run" };\r
+        String[] titles = new String[] { "A short easy one", "intervals", "very long", "just shaking legs after work", "long one with Paul", "test run" };\r
 \r
         c.add(Calendar.DATE, -1000);\r
 \r
@@ -323,8 +317,7 @@ public class Ticket2998 extends Application {
 \r
         for (int i = 0; i < 1000; i++) {\r
             r = new Workout();\r
-            c.set(Calendar.HOUR_OF_DAY,\r
-                    12 + (rnd.nextInt(11) - rnd.nextInt(11)));\r
+            c.set(Calendar.HOUR_OF_DAY, 12 + (rnd.nextInt(11) - rnd.nextInt(11)));\r
             r.setDate(c.getTime());\r
             r.setTitle(titles[rnd.nextInt(titles.length)]);\r
             r.setKilometers(Math.round(rnd.nextFloat() * 30));\r
index 6afa25efdabb7f703fe033232d178de5f044b6a1..21fe826e2f0b95d002db716caa3b7658349f72f8 100644 (file)
@@ -34,33 +34,29 @@ public class Ticket3146 extends Application {
         table.setWidth("200px");\r
         mainWindow.addComponent(table);\r
 \r
-        Button clearButton = new Button("Clear selection",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        clearSelection();\r
-                    }\r
-                });\r
+        Button clearButton = new Button("Clear selection", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                clearSelection();\r
+            }\r
+        });\r
         mainWindow.addComponent(clearButton);\r
-        Button clearButton2 = new Button("Clear selection 2",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        clearSelection2();\r
-                    }\r
-                });\r
+        Button clearButton2 = new Button("Clear selection 2", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                clearSelection2();\r
+            }\r
+        });\r
         mainWindow.addComponent(clearButton2);\r
-        Button clearButton3 = new Button("Clear selection 3",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        clearSelection3();\r
-                    }\r
-                });\r
+        Button clearButton3 = new Button("Clear selection 3", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                clearSelection3();\r
+            }\r
+        });\r
         mainWindow.addComponent(clearButton3);\r
-        Button printButton = new Button("Print selection",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        printSelection();\r
-                    }\r
-                });\r
+        Button printButton = new Button("Print selection", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                printSelection();\r
+            }\r
+        });\r
         mainWindow.addComponent(printButton);\r
 \r
         result = new TextField();\r
index 44328b03906f6950caae3f8a69ff5b78cfdcffda..34bff6ca01a8ddbba48d8ed5d90f5ec78bc7b983 100644 (file)
@@ -31,9 +31,7 @@ public class Ticket34 extends Application {
         reader.addListener(new UriFragmentUtility.FragmentChangedListener() {
 
             public void fragmentChanged(FragmentChangedEvent event) {
-                getMainWindow().showNotification(
-                        "Fragment now: "
-                                + event.getUriFragmentUtility().getFragment());
+                getMainWindow().showNotification("Fragment now: " + event.getUriFragmentUtility().getFragment());
                 // try to change to view mapped by fragment string
                 setView(event.getUriFragmentUtility().getFragment());
             }
@@ -41,8 +39,7 @@ public class Ticket34 extends Application {
 
         mainLayout = new VerticalLayout();
         mainLayout.setSizeFull();
-        final Window mainWin = new Window(
-                "Test app for URI fragment management/reading", mainLayout);
+        final Window mainWin = new Window("Test app for URI fragment management/reading", mainLayout);
         setMainWindow(mainWin);
 
         // UriFragmentReader is 0px size by default, so it will not render
@@ -56,8 +53,7 @@ public class Ticket34 extends Application {
     private void setView(String string) {
         Component component = views.get(string);
         if (component == null) {
-            getMainWindow().showNotification(
-                    "View called " + string + " not found!");
+            getMainWindow().showNotification("View called " + string + " not found!");
         } else if (component != currentView) {
             if (currentView != null) {
                 mainLayout.replaceComponent(currentView, component);
@@ -75,23 +71,17 @@ public class Ticket34 extends Application {
             Panel p = new Panel(string);
             p.setSizeFull();
             ((VerticalLayout) p.getLayout()).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. "));
+            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 : ");
             for (String key : strings) {
                 sb.append(key);
                 sb.append(" ");
             }
-            sb.append("Application will change to them from uri "
-                    + "fragment or server initiated via textfield below.");
+            sb.append("Application will change to them from uri " + "fragment or server initiated via textfield below.");
             p.addComponent(new Label(sb.toString()));
 
-            final TextField tf = new TextField(
-                    "Type view name (will change to that "
-                            + "view and change the uri fragment)");
+            final TextField tf = new TextField("Type view name (will change to that " + "view and change the uri fragment)");
             p.addComponent(tf);
             Button b = new Button("Go!");
             p.addComponent(b);
index d551278659773f423252869a64bafa255b206421..3e853f3504840d9cd4849e86d85c4b70d0ca1423 100644 (file)
@@ -13,8 +13,8 @@ import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.Field;\r
 import com.vaadin.ui.Form;\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.Table;\r
 import com.vaadin.ui.TextField;\r
@@ -22,15 +22,7 @@ import com.vaadin.ui.Window;
 \r
 public class Ticket677 extends Application {\r
 \r
-    private static final Label info = new Label(\r
-            "<li> keep debug window open to see variable changes"\r
-                    + "<li> disable root panel w/ toggle button"\r
-                    + "<li> toggle one of the subpanels"\r
-                    + "<li> we attempt to focus the subpanels first textfield"\r
-                    + "<li> focusing should fail (try tabbing as well) [worked previousy]"\r
-                    + "<li> no variable changes should be sent from disabled fields [changed sent previously]"\r
-                    + "<li> try further toggling and tabbing around",\r
-            Label.CONTENT_RAW);\r
+    private static final Label info = new Label("<li> keep debug window open to see variable changes" + "<li> disable root panel w/ toggle button" + "<li> toggle one of the subpanels" + "<li> we attempt to focus the subpanels first textfield" + "<li> focusing should fail (try tabbing as well) [worked previousy]" + "<li> no variable changes should be sent from disabled fields [changed sent previously]" + "<li> try further toggling and tabbing around", Label.CONTENT_RAW);\r
 \r
     Panel root = new Panel("Enabled");\r
     Panel one = new Panel("Enabled");\r
@@ -45,28 +37,24 @@ public class Ticket677 extends Application {
 \r
         main.addComponent(info);\r
 \r
-        OrderedLayout l = new OrderedLayout(\r
-                OrderedLayout.ORIENTATION_HORIZONTAL);\r
+        HorizontalLayout l = new HorizontalLayout();\r
         main.addComponent(l);\r
 \r
-        l.addComponent(new Button("Toggle root panel",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        toggle(root);\r
-                    }\r
-                }));\r
-        l.addComponent(new Button("Toggle panel one",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        toggle(one);\r
-                    }\r
-                }));\r
-        l.addComponent(new Button("Toggle panel two",\r
-                new Button.ClickListener() {\r
-                    public void buttonClick(ClickEvent event) {\r
-                        toggle(two);\r
-                    }\r
-                }));\r
+        l.addComponent(new Button("Toggle root panel", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                toggle(root);\r
+            }\r
+        }));\r
+        l.addComponent(new Button("Toggle panel one", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                toggle(one);\r
+            }\r
+        }));\r
+        l.addComponent(new Button("Toggle panel two", new Button.ClickListener() {\r
+            public void buttonClick(ClickEvent event) {\r
+                toggle(two);\r
+            }\r
+        }));\r
         l.addComponent(new Button("Toggle form", new Button.ClickListener() {\r
             public void buttonClick(ClickEvent event) {\r
                 toggle(form);\r
@@ -112,8 +100,7 @@ public class Ticket677 extends Application {
         form.setFieldFactory(new BaseFieldFactory() {\r
 \r
             @Override\r
-            public Field createField(Item item, Object propertyId,\r
-                    Component uiContext) {\r
+            public Field createField(Item item, Object propertyId, Component uiContext) {\r
                 Field f = super.createField(item, propertyId, uiContext);\r
                 f.setEnabled(!"disabled".equals(propertyId));\r
                 return f;\r
@@ -135,10 +122,8 @@ public class Ticket677 extends Application {
         table.setFieldFactory(new BaseFieldFactory() {\r
 \r
             @Override\r
-            public Field createField(Container container, Object itemId,\r
-                    Object propertyId, Component uiContext) {\r
-                Field f = super.createField(container, itemId, propertyId,\r
-                        uiContext);\r
+            public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {\r
+                Field f = super.createField(container, itemId, propertyId, uiContext);\r
                 Item item = container.getItem(itemId);\r
                 Property p = item.getItemProperty(propertyId);\r
                 if ("disabled".equals(p.getValue())) {\r
@@ -158,8 +143,7 @@ public class Ticket677 extends Application {
         c.setEnabled(enable);\r
         c.setCaption((enable ? "Enabled" : "Disabled"));\r
         if (c instanceof ComponentContainer) {\r
-            TextField tf = (TextField) ((ComponentContainer) c)\r
-                    .getComponentIterator().next();\r
+            TextField tf = (TextField) ((ComponentContainer) c).getComponentIterator().next();\r
             tf.focus();\r
         }\r
     }\r
index f122031b6ee530160c3dc240a145850fdf6e0f44..817e391d5fd7aaf805debc7567f2674f137214df 100644 (file)
@@ -26,9 +26,7 @@ public class Ticket695 extends Application {
                     ObjectOutputStream oos = new ObjectOutputStream(buffer);
                     long t = System.currentTimeMillis();
                     oos.writeObject(getContext());
-                    w.showNotification("ApplicationContext serialized ("
-                            + buffer.size() + "bytes) in "
-                            + (System.currentTimeMillis() - t) + "ms");
+                    w.showNotification("ApplicationContext serialized (" + buffer.size() + "bytes) in " + (System.currentTimeMillis() - t) + "ms");
                 } catch (IOException e) {
                     e.printStackTrace();
                     w.showNotification("ApplicationContext serialization failed - see console for stacktrace");
index 49cfb5d70814f5a1b603567ada2e665c854fa7cd..c0bf1761eb2650acde7ba06c38a64aa3666a51b3 100644 (file)
@@ -6,11 +6,11 @@ import com.vaadin.data.util.BeanItem;
 import com.vaadin.data.util.MethodProperty;
 import com.vaadin.terminal.ThemeResource;
 import com.vaadin.ui.AbstractComponent;
+import com.vaadin.ui.Alignment;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.ExpandLayout;
 import com.vaadin.ui.Form;
-import com.vaadin.ui.OrderedLayout;
+import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Panel;
 import com.vaadin.ui.Window;
 
@@ -28,8 +28,7 @@ public class Ticket736 extends Application {
 
         // Create form for editing address
         final Form f = new Form();
-        f.setItemDataSource(new BeanItem<Address>(address, new String[] {
-                "name", "street", "zip", "city", "state", "country" }));
+        f.setItemDataSource(new BeanItem<Address>(address, new String[] { "name", "street", "zip", "city", "state", "country" }));
         f.setCaption("Office address");
         f.setIcon(new ThemeResource("../runo/icons/16/document.png"));
         f.setDescription("Jep jpe, this is form description.");
@@ -40,19 +39,17 @@ public class Ticket736 extends Application {
         f.setReadThrough(false);
         Button commit = new Button("Commit", f, "commit");
         Button discard = new Button("Discard", f, "discard");
-        ExpandLayout ol = new ExpandLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
+        HorizontalLayout ol = new HorizontalLayout();
         ol.setHeight("3em");
         ol.addComponent(commit);
-        ol.setComponentAlignment(commit, ExpandLayout.ALIGNMENT_RIGHT,
-                ExpandLayout.ALIGNMENT_TOP);
+        ol.setComponentAlignment(commit, Alignment.TOP_RIGHT);
         ol.addComponent(discard);
         f.setFooter(ol);
 
         // Add some validators for the form
         f.getField("zip").addValidator(new IsInteger());
         f.getField("zip").setDescription("Jepjep");
-        ((AbstractComponent) f.getField("zip")).setIcon(new ThemeResource(
-                "../runo/icons/16/folder.png"));
+        ((AbstractComponent) f.getField("zip")).setIcon(new ThemeResource("../runo/icons/16/folder.png"));
         f.getField("state").addValidator(new IsValidState());
         f.getField("name").setRequired(true);
         f.getField("street").setRequired(true);
@@ -61,26 +58,22 @@ public class Ticket736 extends Application {
 
         // Debug form properties
         final Panel formProperties = new Panel("Form properties");
-        formProperties.setWidth(200);
-        final String[] visibleProps = { "required", "invalidAllowed",
-                "readOnly", "readThrough", "writeThrough", "invalidCommitted",
-                "validationVisible", "immediate" };
+        formProperties.setWidth("200px");
+        final String[] visibleProps = { "required", "invalidAllowed", "readOnly", "readThrough", "writeThrough", "invalidCommitted", "validationVisible", "immediate" };
         for (int i = 0; i < visibleProps.length; i++) {
-            Button b = new Button(visibleProps[i], new MethodProperty<Boolean>(
-                    f, visibleProps[i]));
+            Button b = new Button(visibleProps[i], new MethodProperty<Boolean>(f, visibleProps[i]));
             b.setImmediate(true);
             formProperties.addComponent(b);
         }
         mainWin.addComponent(formProperties);
 
         // Debug the internal state of the address-object
-        mainWin.addComponent(new Button("Show state of the address object",
-                new Button.ClickListener() {
+        mainWin.addComponent(new Button("Show state of the address object", new Button.ClickListener() {
 
-                    public void buttonClick(ClickEvent event) {
-                        mainWin.showNotification(address.toString());
-                    }
-                }));
+            public void buttonClick(ClickEvent event) {
+                mainWin.showNotification(address.toString());
+            }
+        }));
     }
 
     /** Address pojo. */
@@ -142,8 +135,7 @@ public class Ticket736 extends Application {
 
         @Override
         public String toString() {
-            return name + "; " + street + "; " + city + " " + zip
-                    + (state != null ? " " + state : "") + " " + country;
+            return name + "; " + street + "; " + city + " " + zip + (state != null ? " " + state : "") + " " + country;
         }
 
     }
@@ -162,8 +154,7 @@ public class Ticket736 extends Application {
 
         public void validate(Object value) throws InvalidValueException {
             if (!isValid(value)) {
-                throw new InvalidValueException("'" + value
-                        + "' is not a number");
+                throw new InvalidValueException("'" + value + "' is not a number");
             }
         }
     }
@@ -186,8 +177,7 @@ public class Ticket736 extends Application {
 
         public void validate(Object value) throws InvalidValueException {
             if (!isValid(value)) {
-                throw new InvalidValueException(
-                        "State must be either two capital letter abreviation or left empty");
+                throw new InvalidValueException("State must be either two capital letter abreviation or left empty");
             }
         }
     }
index 3f9e0ccf6f9a64d16f1c46eff59ccf8b69fad98f..c127358454babbdd291822e2d376f3116d147cde 100644 (file)
@@ -36,28 +36,21 @@ public class Ticket846 extends Application {
             }
         });
 
-        final String[] visibleProps = { "required", "invalidAllowed",
-                "readOnly", "readThrough", "invalidCommitted",
-                "validationVisible" };
+        final String[] visibleProps = { "required", "invalidAllowed", "readOnly", "readThrough", "invalidCommitted", "validationVisible" };
         for (int i = 0; i < visibleProps.length; i++) {
-            Button b = new Button(visibleProps[i], new MethodProperty<Boolean>(
-                    tx, visibleProps[i]));
+            Button b = new Button(visibleProps[i], new MethodProperty<Boolean>(tx, visibleProps[i]));
             b.setImmediate(true);
             mainWin.addComponent(b);
         }
 
         // tx.setIcon(new ThemeResource("icons/16/folder.png"));
 
-        mainWin.addComponent(new Button("Validate integer",
-                new Button.ClickListener() {
-                    public void buttonClick(
-                            com.vaadin.ui.Button.ClickEvent event) {
-                        mainWin.showNotification("The field is "
-                                + (tx.isValid() ? "" : "not ") + "valid");
-                    };
-                }));
-        TextField caption = new TextField("Caption",
-                new MethodProperty<String>(tx, "caption"));
+        mainWin.addComponent(new Button("Validate integer", new Button.ClickListener() {
+            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
+                mainWin.showNotification("The field is " + (tx.isValid() ? "" : "not ") + "valid");
+            };
+        }));
+        TextField caption = new TextField("Caption", new MethodProperty<String>(tx, "caption"));
         caption.setImmediate(true);
         mainWin.addComponent(caption);
     }
index d053cbbb2a2ede7fe6efb4468ea2d1fe4c2307a0..6fcdfef7dce244c214207ae69633b9160216cefe 100644 (file)
@@ -16,8 +16,7 @@ public class Ticket932 extends Application {
         final Window mainWin = new Window("Test app for max length feature");
         setMainWindow(mainWin);
 
-        final TextField tx = new TextField(
-                "Textfield with maxlenght 10, single row");
+        final TextField tx = new TextField("Textfield with maxlenght 10, single row");
         tx.setImmediate(true);
         tx.setMaxLength(10);
 
@@ -27,16 +26,14 @@ public class Ticket932 extends Application {
         b.addListener(new Button.ClickListener() {
 
             public void buttonClick(ClickEvent event) {
-                l.setValue("Length: " + tx.getValue().toString().length()
-                        + " Content: " + tx.getValue());
+                l.setValue("Length: " + tx.getValue().toString().length() + " Content: " + tx.getValue());
             }
         });
 
         mainWin.addComponent(tx);
         mainWin.addComponent(b);
 
-        final TextField tx2 = new TextField(
-                "Textfield with maxlenght 10, multirow ");
+        final TextField tx2 = new TextField("Textfield with maxlenght 10, multirow ");
         mainWin.addComponent(tx2);
         tx2.setImmediate(true);
         tx2.setRows(5);
@@ -46,8 +43,7 @@ public class Ticket932 extends Application {
         b2.addListener(new Button.ClickListener() {
 
             public void buttonClick(ClickEvent event) {
-                l.setValue("Length: " + tx2.getValue().toString().length()
-                        + " Content: " + tx2.getValue());
+                l.setValue("Length: " + tx2.getValue().toString().length() + " Content: " + tx2.getValue());
             }
         });
 
@@ -64,8 +60,7 @@ public class Ticket932 extends Application {
         b = new Button("Check value");
         b.addListener(new Button.ClickListener() {
             public void buttonClick(ClickEvent event) {
-                l.setValue("Length: " + rta.getValue().toString().length()
-                        + " Content: " + rta.getValue());
+                l.setValue("Length: " + rta.getValue().toString().length() + " Content: " + rta.getValue());
             }
         });
 
index f9b1eba7ecf2fd2800483a65ea83e212540e6f01..6999d38e3eb22412c14409270deab15130cef701 100644 (file)
@@ -33,6 +33,7 @@ import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.DateField;
 import com.vaadin.ui.Embedded;
 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;
@@ -40,6 +41,7 @@ import com.vaadin.ui.Panel;
 import com.vaadin.ui.Select;
 import com.vaadin.ui.TabSheet;
 import com.vaadin.ui.TextField;
+import com.vaadin.ui.VerticalLayout;
 
 public class RandomComponents {
 
@@ -65,12 +67,12 @@ public class RandomComponents {
         switch (randint) {
 
         case 0:
-            result = new OrderedLayout(OrderedLayout.ORIENTATION_HORIZONTAL);
+            result = new HorizontalLayout();
             ((OrderedLayout) result).setCaption("OrderedLayout_horizontal_"
                     + caption);
             break;
         case 1:
-            result = new OrderedLayout(OrderedLayout.ORIENTATION_VERTICAL);
+            result = new VerticalLayout();
             ((OrderedLayout) result).setCaption("OrderedLayout_vertical_"
                     + caption);
             break;
@@ -190,64 +192,64 @@ public class RandomComponents {
             result.setCaption("Calendar component " + caption);
             break;
         case 8:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new ButtonExample());
             break;
         case 9:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new ClientCachingExample());
             break;
         case 10:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new ComboBoxExample());
             break;
         case 11:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             // TODO: disabled gwt bug with mixed up iframe's
             ((OrderedLayout) result).addComponent(new EmbeddedBrowserExample());
             break;
         case 12:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new JavaScriptAPIExample());
             break;
         case 13:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new LabelExample());
             break;
         case 14:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new LayoutExample());
             break;
         case 15:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new NotificationExample());
             break;
         case 16:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new RichTextExample());
             break;
         case 17:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new SelectExample());
             break;
         case 18:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new ValueInputExample());
             break;
         case 19:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new WindowingExample());
             break;
         case 20:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new TreeExample());
             break;
         case 21:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result).addComponent(new TableExample());
             break;
         case 22:
-            result = new OrderedLayout();
+            result = new VerticalLayout();
             ((OrderedLayout) result)
                     .addComponent(new StressComponentsInTable());
             break;