]> source.dussan.org Git - vaadin-framework.git/commitdiff
Corrected invalid formatting in previous patches (#5749)
authorArtur Signell <artur.signell@itmill.com>
Thu, 7 Oct 2010 07:25:03 +0000 (07:25 +0000)
committerArtur Signell <artur.signell@itmill.com>
Thu, 7 Oct 2010 07:25:03 +0000 (07:25 +0000)
svn changeset:15435/svn branch:6.5

177 files changed:
src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java
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/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/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/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/components/combobox/NewItemsESCPress.java
tests/src/com/vaadin/tests/components/form/FormWithRelativelySizedLayout.java
tests/src/com/vaadin/tests/components/window/WindowResizeListener.java
tests/src/com/vaadin/tests/featurebrowser/Feature.java
tests/src/com/vaadin/tests/featurebrowser/FeatureForm.java
tests/src/com/vaadin/tests/featurebrowser/FeatureOrderedLayout.java
tests/src/com/vaadin/tests/featurebrowser/FeatureTextField.java
tests/src/com/vaadin/tests/featurebrowser/PropertyPanel.java
tests/src/com/vaadin/tests/layouts/GridLayoutInsidePanel.java
tests/src/com/vaadin/tests/layouts/OrderedLayoutBasics.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/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/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/Ticket1969.java
tests/src/com/vaadin/tests/tickets/Ticket1970.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/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/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/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/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/Ticket2179.java
tests/src/com/vaadin/tests/tickets/Ticket2180.java
tests/src/com/vaadin/tests/tickets/Ticket2181.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/Ticket2221.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 fc661ff7050a1e3d69f66304d975a453e30c9e3e..26f2949870456bbf8a91ae80611d4cd16a449d6d 100644 (file)
@@ -73,10 +73,10 @@ public class VDateFieldCalendar extends VDateField {
         if (currentResolution <= RESOLUTION_MONTH) {\r
             calendarPanel.setFocusChangeListener(new FocusChangeListener() {\r
                 public void focusChanged(Date date) {\r
-                       Date date2 = new Date();\r
-                       if (calendarPanel.getDate() != null) {\r
-                               date2.setTime(calendarPanel.getDate().getTime());\r
-                       }\r
+                    Date date2 = new Date();\r
+                    if (calendarPanel.getDate() != null) {\r
+                        date2.setTime(calendarPanel.getDate().getTime());\r
+                    }\r
                     /*\r
                      * Update the value of calendarPanel\r
                      */\r
index d54ec4e391e4ad9e0dbb8dc476e124d42b41b699..7a5de744310030b28ca1216ab3718a90b6d864ba 100644 (file)
@@ -46,7 +46,8 @@ 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;
@@ -62,9 +63,11 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
 
     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;
 
@@ -111,7 +114,16 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
 
         // 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));
+        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");
@@ -145,7 +157,8 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
         }
         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();
         }
@@ -155,7 +168,8 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
         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
@@ -192,7 +206,11 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
         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>();
@@ -238,7 +256,8 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
     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;
@@ -246,7 +265,8 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
                 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;
@@ -273,8 +293,10 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
             // 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("+")) {
@@ -298,8 +320,10 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
             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));
         }
     }
 
@@ -319,7 +343,8 @@ public class BasicRandomTest extends com.vaadin.Application implements Button.Cl
     @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 9e7f4ff6f5ce8fad69ef808db2f91d0ad97cff29..2a8d5de9b77efba84ec41a1180a4ff358ef919b0 100644 (file)
@@ -28,7 +28,8 @@ 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;
 
@@ -56,7 +57,8 @@ public class CustomLayoutDemo extends com.vaadin.Application implements Listener
         // 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
@@ -86,7 +88,8 @@ public class CustomLayoutDemo extends com.vaadin.Application implements Listener
         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);
     }
 
@@ -101,7 +104,8 @@ public class CustomLayoutDemo extends com.vaadin.Application implements Listener
         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 33f5bb5e26f2df1e8a46a286a7bbffd25677b669..ce72d5ad17041613416a8bc7b1ac0bb76ec08545 100644 (file)
@@ -83,15 +83,27 @@ 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);
 
     }
@@ -107,7 +119,12 @@ 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 e31ca1e86ca26fa771db5c25f0d1470430317a95..c1d6245222827818c50e64b676964fd93bfa1fb5 100644 (file)
@@ -16,7 +16,9 @@ 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;
 
@@ -132,7 +134,8 @@ public class ListenerOrder extends com.vaadin.Application implements Button.Clic
         }
 
         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 f77ce95c00a72cd042bee333b803f33df1a47479..4ace9f889e73d57b47a48187aa3d1b5f6d8ba8fb 100644 (file)
@@ -21,7 +21,8 @@ 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;
@@ -56,7 +57,8 @@ public class ModalWindow extends com.vaadin.Application implements ClickListener
         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() {
@@ -64,7 +66,8 @@ public class ModalWindow extends com.vaadin.Application implements ClickListener
         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 337d99b837a6243a3c02396f51264435afff7690..e1cf6087638908fdcb6f9114c7873b125ba3d931 100644 (file)
@@ -22,41 +22,76 @@ public class NativeWindowing extends Application {
 
         setMainWindow(main);
 
-        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() {
+        main.addComponent(new Button("Add new subwindow",
+                new Button.ClickListener() {
                     public void buttonClick(ClickEvent event) {
-                        main.removeWindow(w);
-                    }
-
-                });
-                w.addComponent(closebutton);
+                        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));
 
-                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(
+                "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
@@ -71,12 +106,15 @@ 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 7bc6fb5cc43d33094e8828acc79153e2e8452615..34b32a88089ba221eb01210fd99b0db0fc66e146 100644 (file)
@@ -27,7 +27,8 @@ 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,17 +46,21 @@ public class Parameters extends com.vaadin.Application implements URIHandler, Pa
         main.addParameterHandler(this);
 
         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: ");
+        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();
         }
 
@@ -105,7 +110,8 @@ public class Parameters extends com.vaadin.Application implements URIHandler, Pa
      */
     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 ef83ac5afbf3a3bf8ce768efa549d11a1ff3d3c3..7258df1879db07712fc6f18c7fca77a406155980 100644 (file)
@@ -43,11 +43,13 @@ public class PerformanceTestBasicComponentRendering extends CustomComponent {
 
         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 f258dc8a6eb0bec432679f49f1f0d53aede768f2..ff2ed51c57015d1bedd3ca12adf878f277d82ba7 100644 (file)
@@ -35,18 +35,21 @@ public class PerformanceTestLabelsAndOrderedLayouts extends CustomComponent {
         result = new Label();
         main.addComponent(result);
 
-        main.addComponent(new Button("click when rendered", new ClickListener() {
-
-            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 when rendered",
+                new ClickListener() {
+
+                    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();
+                    }
+                }));
 
         testContainer = new VerticalLayout();
 
index 3b7aa683fa911db4b2392469349b5e4ef06f4d6d..a746ed45bfc1cbaf91814d8a12cd05d7980ae1a7 100644 (file)
@@ -22,7 +22,12 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
 
     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;
 
@@ -65,7 +70,8 @@ public class PerformanceTestSubTreeCaching extends CustomComponent {
     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 6596afa3fe03bec6bb9c136b89fc1d08e431f1f2..0e8ecb4564e60b7ca16157a4b85bd2da57a068af 100644 (file)
@@ -52,7 +52,8 @@ public class RandomLayoutStress extends com.vaadin.Application {
         setMainWindow(mainWindow);
 
         // Create horizontal ordered layout
-        final Panel panelA = new Panel("Panel containing horizontal ordered layout");
+        final Panel panelA = new Panel(
+                "Panel containing horizontal ordered layout");
         HorizontalLayout layoutA = new HorizontalLayout();
         // Add 4 random components
         fillLayout(layoutA, componentCountA);
@@ -60,7 +61,8 @@ public class RandomLayoutStress extends com.vaadin.Application {
         panelA.addComponent(layoutA);
 
         // Create vertical ordered layout
-        final Panel panelB = new Panel("Panel containing vertical ordered layout");
+        final Panel panelB = new Panel(
+                "Panel containing vertical ordered layout");
         VerticalLayout layoutB = new VerticalLayout();
         // Add 4 random components
         fillLayout(layoutB, componentCountB);
@@ -69,7 +71,8 @@ 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);
@@ -144,7 +147,12 @@ 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 54cf7a6d99a161faac40ab7f9df111f542919a9c..d7b8cdd8bf39ee345b350447a4d1f34e0365e5c8 100644 (file)
@@ -51,7 +51,8 @@ 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");
@@ -222,7 +223,8 @@ 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 54dd0a5bf33c19260249e7f125e60dd09ec2d943..921d3a65de0008b4bd5d05c81413e3c2d842e421 100644 (file)
@@ -39,7 +39,8 @@ public class StressComponentsInTable extends CustomComponent {
 \r
                 public void buttonClick(ClickEvent event) {\r
                     Button b = event.getButton();\r
-                    System.out.println(b.getCaption() + " click: " + (new Date()).toGMTString());\r
+                    System.out.println(b.getCaption() + " click: "\r
+                            + (new Date()).toGMTString());\r
                     System.out.println(b.getApplication());\r
 \r
                 }\r
@@ -50,7 +51,22 @@ public class StressComponentsInTable extends CustomComponent {
         return t;\r
     }\r
 \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
+    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
 \r
     public static String rndString() {\r
         return testString[(int) (Math.random() * testString.length)];\r
index 991db5a2ed566c48388ded3009c78ad85035f162..66b38f9813f37616060d2689656f9412f47e7cf0 100644 (file)
@@ -12,7 +12,8 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.Table;\r
 import com.vaadin.ui.VerticalLayout;\r
 \r
-public class TableChangingDatasource extends CustomComponent implements ClickListener {\r
+public class TableChangingDatasource extends CustomComponent implements\r
+        ClickListener {\r
     Table t;\r
     Table[] ta = new Table[4];\r
     private int mode = 0;\r
@@ -20,17 +21,22 @@ public class TableChangingDatasource extends CustomComponent implements ClickLis
     public TableChangingDatasource() {\r
         final VerticalLayout main = new VerticalLayout();\r
 \r
-        main.addComponent(new Label("Table should look sane after data source changes"));\r
+        main.addComponent(new Label(\r
+                "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.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
+        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
 \r
         main.addComponent(t);\r
         main.addComponent(new Button("switch DS", this));\r
index 0ab962c4a929f0c14519b18ea6414ce86f6f1772..d5196d2a2a9fccefd9377c7d49886a0614d4143e 100644 (file)
@@ -10,7 +10,8 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.Table;\r
 import com.vaadin.ui.VerticalLayout;\r
 \r
-public class TableSelectTest extends CustomComponent implements Table.ValueChangeListener {\r
+public class TableSelectTest extends CustomComponent implements\r
+        Table.ValueChangeListener {\r
 \r
     public TableSelectTest() {\r
         final VerticalLayout main = new VerticalLayout();\r
index e5d34e4a6c54ceee9491ed2888d30e31b7905ee3..e4d07730f4dcc203e6245b72203ae4b8c6e5e8c1 100644 (file)
@@ -39,10 +39,13 @@ 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" };
+    String[] testablePackages = { "com.vaadin.tests", "com.vaadin.demo",
+            "com.vaadin.demo.colorpicker", "com.vaadin.demo.features",
+            "com.vaadin.tests.tickets" };
 
     HierarchicalContainer testables = new HierarchicalContainer();
 
@@ -66,7 +69,8 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
             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)) {
@@ -97,10 +101,12 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
 
         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
@@ -174,7 +180,8 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
                         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;
@@ -182,7 +189,8 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
                         }
                     }
 
-                    getMainWindow().showNotification("No potential matc for #" + fragment);
+                    getMainWindow().showNotification(
+                            "No potential matc for #" + fragment);
 
                 }
 
@@ -219,9 +227,12 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
             } 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;
@@ -253,10 +264,12 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
      * @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.");
             }
@@ -268,7 +281,8 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
                 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<?>>();
@@ -282,12 +296,15 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
                     // 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);
                             }
                         }
@@ -302,7 +319,9 @@ public class TestBench extends com.vaadin.Application implements Property.ValueC
                     }
                 }
             } 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 fdbe1f6d97dbd5dac4a29cbbe0e3f04720408c12..f63c14889214b082ed7529862b86d6dd63d4c497 100644 (file)
@@ -40,7 +40,8 @@ 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() {
@@ -56,7 +57,10 @@ 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);
 
@@ -75,8 +79,10 @@ 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);
@@ -113,13 +119,16 @@ 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();
@@ -143,14 +152,16 @@ 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);
 
@@ -184,7 +195,8 @@ 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 711003010e466c3158d6c784d7027b8bd60236cf..5203a7055f6b2461327622b9f2257975f6d3ad4b 100644 (file)
@@ -91,9 +91,12 @@ public class TestComponentAddAndRecursion extends CustomComponent {
             public void buttonClick(ClickEvent event) {\r
                 try {\r
                     p3.addComponent(p2);\r
-                    getWindow().showNotification("ERROR", "This should have failed", Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("ERROR",\r
+                            "This should have failed",\r
+                            Window.Notification.TYPE_ERROR_MESSAGE);\r
                 } catch (Exception e) {\r
-                    getWindow().showNotification("OK", "threw, as expected", Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("OK", "threw, as expected",\r
+                            Window.Notification.TYPE_ERROR_MESSAGE);\r
                 }\r
             }\r
 \r
@@ -106,9 +109,12 @@ public class TestComponentAddAndRecursion extends CustomComponent {
                 p.addComponent(p2);\r
                 try {\r
                     p3.addComponent(p);\r
-                    getWindow().showNotification("ERROR", "This should have failed", Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("ERROR",\r
+                            "This should have failed",\r
+                            Window.Notification.TYPE_ERROR_MESSAGE);\r
                 } catch (Exception e) {\r
-                    getWindow().showNotification("OK", "threw, as expected", Window.Notification.TYPE_ERROR_MESSAGE);\r
+                    getWindow().showNotification("OK", "threw, as expected",\r
+                            Window.Notification.TYPE_ERROR_MESSAGE);\r
                 }\r
             }\r
 \r
index 4381c4df42710e56ee5ebffb2284c034c5753649..867768e71cc4693868d80992f19786939e435968 100644 (file)
@@ -41,7 +41,8 @@ public class TestContainerChanges extends CustomComponent {
         VerticalLayout main = new VerticalLayout();\r
         setCompositionRoot(main);\r
 \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
+        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
 \r
         HorizontalLayout h = new HorizontalLayout();\r
 \r
@@ -70,7 +71,8 @@ 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 " + event.getProperty().getValue());\r
+                System.err.println("Value now "\r
+                        + event.getProperty().getValue());\r
 \r
             }\r
         });\r
@@ -90,38 +92,43 @@ public class TestContainerChanges extends CustomComponent {
         });\r
         buttons.addComponent(b);\r
 \r
-        b = new Button("indexedcontainer.addItem()", new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.addItem()",\r
+                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)", new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.addItem(null)",\r
+                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()", new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.removeItem(table.lastItemId()",\r
+                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()", new Button.ClickListener() {\r
+        b = new Button("indexedcontainer.addContainerProperty()",\r
+                new Button.ClickListener() {\r
 \r
-            public void buttonClick(ClickEvent event) {\r
-                cont.addContainerProperty("prop" + cnt, String.class, "#" + cnt++);\r
-            }\r
+                    public void buttonClick(ClickEvent event) {\r
+                        cont.addContainerProperty("prop" + cnt, String.class,\r
+                                "#" + cnt++);\r
+                    }\r
 \r
-        });\r
+                });\r
         buttons.addComponent(b);\r
 \r
         b = new Button("indexedcontainer.clear()", new Button.ClickListener() {\r
@@ -132,29 +139,32 @@ public class TestContainerChanges extends CustomComponent {
 \r
         });\r
         buttons.addComponent(b);\r
-        b = new Button("table.setContainerDataSource(indexedcontainer)", new Button.ClickListener() {\r
+        b = new Button("table.setContainerDataSource(indexedcontainer)",\r
+                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)", new Button.ClickListener() {\r
+        b = new Button("table.setContainerDataSource(orderedwrapper)",\r
+                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)", new Button.ClickListener() {\r
+        b = new Button("table.setContainerDataSource(hierarchicalwrapper)",\r
+                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 2cbe6982de4c45f12804199eb074104e1c8e29ca..287007bad62447343cc911c6633d85c40353d7ac 100644 (file)
@@ -65,7 +65,8 @@ public class TestDateField extends CustomComponent {
 \r
     @Override\r
     public void attach() {\r
-        final ClassResource res = new ClassResource("m.gif", super.getApplication());\r
+        final ClassResource res = new ClassResource("m.gif",\r
+                super.getApplication());\r
         df.setIcon(res);\r
         super.attach();\r
     }\r
index 8d789c1b29b824bdbe30659a404c90a02269802a..410f84582f4acadafa76b61e6c62275dd973f4cb 100644 (file)
@@ -11,7 +11,8 @@ 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");
 
@@ -30,13 +31,15 @@ public class TestForApplicationLayoutThatUsesWholeBrosersSpace extends Applicati
 
         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 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.setExpandRatio(t, 1);
index 3ab3c89fe4700524abf36990ad2d476e02be9c50..d5bf5a1483f6a906de1c411b23a2acf2df52d8c7 100644 (file)
@@ -55,7 +55,8 @@ public class TestForBasicApplicationLayout extends CustomComponent {
         tab = new TabSheet();\r
         tab.setSizeFull();\r
 \r
-        final Panel report = new Panel("Monthly Program Runs", new VerticalLayout());\r
+        final Panel report = new Panel("Monthly Program Runs",\r
+                new VerticalLayout());\r
         final VerticalLayout controls = new VerticalLayout();\r
         controls.setMargin(true);\r
         controls.addComponent(new Label("Report tab"));\r
@@ -72,7 +73,8 @@ public class TestForBasicApplicationLayout extends CustomComponent {
 \r
         sp2.setFirstComponent(report);\r
 \r
-        final Table table = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 200);\r
+        final Table table = TestForTablesInitialColumnWidthLogicRendering\r
+                .getTestTable(5, 200);\r
         table.setPageLength(15);\r
         table.setSelectable(true);\r
         table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);\r
index f57872fdef4d6543b031e760fbe9f9f8629a9a6c..2aafe6b38c53b3591ffcf3d49d77989d9f2e5253 100644 (file)
@@ -57,7 +57,8 @@ 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);
 
     }
index 3abd57c5a05723b4b15c0af1319dd5858cfa1fbb..7b5124b4f3cbb04913acd29c96087a6fae1a8005 100644 (file)
@@ -20,7 +20,8 @@ public class TestForContainerFilterable extends CustomComponent {
     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");
@@ -45,8 +46,10 @@ public class TestForContainerFilterable extends CustomComponent {
         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
@@ -60,21 +63,24 @@ 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 081fe23b8bea7b414809b1caa2bdd41f62361116..5c121dd3d3dda8bd885169abd0d0b442e8dc3e4a 100644 (file)
@@ -58,7 +58,8 @@ 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);
 
     }
@@ -78,7 +79,8 @@ 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 b0962953f109286b84f37fbc9bbef488ce0866e1..dbbaadeead5e0aa314794cb572b6c0cf7ab9f7df 100644 (file)
@@ -23,7 +23,8 @@ import com.vaadin.ui.VerticalLayout;
  * 
  * @author IT Mill Ltd.
  */
-public class TestForMultipleStyleNames extends CustomComponent implements ValueChangeListener {
+public class TestForMultipleStyleNames extends CustomComponent implements
+        ValueChangeListener {
 
     private final VerticalLayout main = new VerticalLayout();
 
@@ -40,8 +41,13 @@ public class TestForMultipleStyleNames extends CustomComponent implements ValueC
 
     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>();
 
@@ -81,7 +87,8 @@ public class TestForMultipleStyleNames extends CustomComponent implements ValueC
                 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 12670a931a56f6b4f8f09d83f95775a2657fa42d..9728214163802914f8a46330427b37a55ef69438 100644 (file)
@@ -22,41 +22,76 @@ public class TestForNativeWindowing extends Application {
 
         setMainWindow(main);
 
-        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() {
+        main.addComponent(new Button("Add new subwindow",
+                new Button.ClickListener() {
                     public void buttonClick(ClickEvent event) {
-                        main.removeWindow(w);
-                    }
-
-                });
-                w.addComponent(closebutton);
+                        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));
 
-                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(
+                "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
@@ -71,12 +106,15 @@ 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 09af0558a60fde57e0b871beb24f9a889bfffb1d..f4ed33b28d76ae9db2148c6ac07eead6055de18b 100644 (file)
@@ -25,15 +25,20 @@ 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 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,7 +52,12 @@ public class TestForPreconfiguredComponents extends CustomComponent implements H
 
     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"));
 
@@ -87,7 +97,9 @@ public class TestForPreconfiguredComponents extends CustomComponent implements H
 
     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);
         }
     }
@@ -96,7 +108,9 @@ public class TestForPreconfiguredComponents extends CustomComponent implements H
         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
@@ -146,7 +160,8 @@ public class TestForPreconfiguredComponents extends CustomComponent implements H
         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 615b8852d7588e015c2f52e9e961990ca33261f5..11fb97fce02e62b37eb039975d2bda9232bce0ba 100644 (file)
@@ -17,7 +17,8 @@ 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 VerticalLayout main = new VerticalLayout();
 
@@ -33,7 +34,8 @@ public class TestForRichTextEditor extends CustomComponent implements ValueChang
 
     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 539d03259a315ed8a242135e213d572340add9c3..6a6ae130e5daef75374356b06dd7db65d6e9d8f5 100644 (file)
@@ -35,7 +35,9 @@ 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();
 
@@ -54,7 +56,8 @@ public class TestForStyledUpload extends Application implements Upload.FinishedL
     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");
@@ -71,7 +74,8 @@ public class TestForStyledUpload extends Application implements Upload.FinishedL
 
                 refreshMemUsage();
 
-                transferred.setValue("Transferred " + readBytes + " of " + contentLenght);
+                transferred.setValue("Transferred " + readBytes + " of "
+                        + contentLenght);
             }
 
         });
@@ -131,7 +135,8 @@ public class TestForStyledUpload extends Application implements Upload.FinishedL
             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");
@@ -144,19 +149,25 @@ public class TestForStyledUpload extends Application implements Upload.FinishedL
         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();
     }
@@ -171,7 +182,8 @@ public class TestForStyledUpload extends Application implements Upload.FinishedL
         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 2e35538da0945986432010110467e30eb7bd3ef3..938bf431150769b39d81210689b2a656e7836d9e 100644 (file)
@@ -7,7 +7,8 @@ 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");
@@ -32,7 +33,8 @@ public class TestForTabSheet extends CustomComponent implements Button.ClickList
     }
 
     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 77c931a9ea313959276fe03ac07e8a1bef0968a4..961a8cc5dc37749fe598a842f421b96f1b972de0 100644 (file)
@@ -23,7 +23,8 @@ import com.vaadin.ui.VerticalLayout;
  * 
  * @author IT Mill Ltd.
  */
-public class TestForTablesInitialColumnWidthLogicRendering extends CustomComponent {
+public class TestForTablesInitialColumnWidthLogicRendering extends
+        CustomComponent {
 
     private final VerticalLayout main = new VerticalLayout();
 
@@ -35,7 +36,8 @@ public class TestForTablesInitialColumnWidthLogicRendering extends CustomCompone
 
     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;
 
@@ -132,7 +134,22 @@ public class TestForTablesInitialColumnWidthLogicRendering extends CustomCompone
         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 76341cb314e3bc3bff310688e5dc47b669e56d9e..32139511e10272648dacda203df187a1d5dc33af 100644 (file)
@@ -25,13 +25,17 @@ import com.vaadin.ui.VerticalLayout;
  */
 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 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;
 
@@ -45,7 +49,8 @@ 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"));
 
@@ -90,7 +95,9 @@ 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
@@ -135,7 +142,8 @@ 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 0cd1988e4f91cba1623dfc3dbe976b7321599dbc..e80a3f45813d0ad636edb32670c4d268c2a451d6 100644 (file)
@@ -36,7 +36,8 @@ 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;
 
@@ -63,15 +64,25 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
 
     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();
@@ -96,7 +107,9 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
                 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());
             }
         });
 
@@ -108,7 +121,8 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
                 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 {
@@ -118,13 +132,20 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
                 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);
                 }
@@ -163,11 +184,12 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
         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);
@@ -222,7 +244,8 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
             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");
@@ -231,7 +254,8 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
         refreshMemUsage();
     }
 
-    public interface Buffer extends StreamResource.StreamSource, Upload.Receiver {
+    public interface Buffer extends StreamResource.StreamSource,
+            Upload.Receiver {
 
         String getFileName();
     }
@@ -300,7 +324,8 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
         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) {
@@ -333,7 +358,8 @@ public class TestForUpload extends CustomComponent implements Upload.ProgressLis
                 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 884cceb627eaaee2ffc3c1945d4643f7222c2dd0..74e3af46ea32f447295ef07d90ad2ba8bbb960b7 100644 (file)
@@ -17,35 +17,42 @@ public class TestForWindowOpen extends CustomComponent {
         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 439c3d38992947da273a577d6de2fa5c5525a209..fb7c3885677de68e4864d99adda2a089c6401b17 100644 (file)
@@ -27,66 +27,69 @@ public class TestForWindowing extends CustomComponent {
 
         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);
-                }
-
-                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);
+                        if (((Boolean) asModal.getValue()).booleanValue()) {
+                            w.setModal(true);
+                        }
 
-                s1.addListener(new ValueChangeListener() {
+                        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);
 
-                    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 44b3bda4be327d1a7cf6a536976d899316868e67..dea306b1bf9e8308d67dd8f310277eab224df062 100644 (file)
@@ -29,7 +29,8 @@ 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 95bda50044d0d406ae31a50d5bd017b34b6d8feb..49a3c110fa479b9bdd08a181ca9554dbc1569ba1 100644 (file)
@@ -11,7 +11,9 @@ 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 fe114439956021d4cdf8bf0990bea399132a73ac..479a7602ef3d4b32cea30a1c45660b3d7657df76 100644 (file)
@@ -26,11 +26,20 @@ 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 3692841c15cc3d9a577f8f4c127808c41212667b..5d3a6e77cd6fdfb233ebb4ccac93569de07ef747 100644 (file)
@@ -62,7 +62,8 @@ 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();
                 }
@@ -76,7 +77,8 @@ 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();
                 }
@@ -129,7 +131,8 @@ 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;
@@ -165,11 +168,14 @@ 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");
@@ -222,7 +228,8 @@ 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(",");
@@ -241,7 +248,8 @@ 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) {
@@ -250,13 +258,16 @@ 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) {
@@ -270,7 +281,8 @@ 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 6ed6489e009a9351ea0ad1127a0c7c81f27e3b73..c5ff1cb51d30cc0050dd25d0c9facad94eb4c796 100644 (file)
@@ -23,7 +23,8 @@ 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 44e1f63b952d505aa04624aee3765ac18ad00116..618fa21ccf6ffe6c6e1062e0d40d18b1dff1594b 100644 (file)
@@ -28,7 +28,8 @@ 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");
@@ -85,9 +86,11 @@ public class TreeFilesystemContainer extends com.vaadin.Application implements L
             // 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 62abad260818dfea029793423e41edde5d5123e8..55a17d705bca370c22be0970ec890dbe16a5d71c 100644 (file)
@@ -34,13 +34,19 @@ 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);
@@ -101,7 +107,8 @@ public class UpgradingSample extends Application implements Property.ValueChange
     }
 
     // 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");
@@ -112,7 +119,8 @@ public class UpgradingSample extends Application implements Property.ValueChange
 
         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 08dc3bf4fb0a0eb405fcba44ef8447142d62835b..b54bd3d184569ce24a590aa086106fe3b9796f5d 100644 (file)
@@ -39,11 +39,14 @@ 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]);
         }
     }
 
@@ -52,7 +55,8 @@ 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 c3346200c23c89aab371056c587456c8fced444a..c9b0939eef3613f9ee0778f38c4628994b011242 100644 (file)
@@ -14,10 +14,12 @@ 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>();
 
@@ -44,17 +46,24 @@ public class UsingObjectsInSelect extends com.vaadin.Application implements Valu
     }
 
     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 945b2b605bcf4b082c31c96256339c5afb3f6483..31fb144938b8143f3731c2366f9b73740da80836 100644 (file)
@@ -8,33 +8,33 @@ import com.vaadin.ui.TextField;
 @SuppressWarnings("serial")
 public class NewItemsESCPress extends TestBase {
 
-       @Override
-       protected void setup() {
-               final TextField addedItems = new TextField("Last added items:");
-               addedItems.setRows(10);
-               addComponent(addedItems);
-               
-               final ComboBox box = new ComboBox("New items are allowed");
-               box.setNewItemsAllowed(true);
-               box.setNewItemHandler(new NewItemHandler() {
-                       public void addNewItem(String newItemCaption) {
-                               String value = (String) addedItems.getValue();
-                               addedItems.setValue(value + newItemCaption + "\n" );
-                               box.addItem(newItemCaption);
-                       }
-               });
-               box.setImmediate(true);
-               addComponent(box);
-       }
+    @Override
+    protected void setup() {
+        final TextField addedItems = new TextField("Last added items:");
+        addedItems.setRows(10);
+        addComponent(addedItems);
 
-       @Override
-       protected String getDescription() {
-               return "Firefox flashes the previously entered value when holding the ESC-key.";
-       }
+        final ComboBox box = new ComboBox("New items are allowed");
+        box.setNewItemsAllowed(true);
+        box.setNewItemHandler(new NewItemHandler() {
+            public void addNewItem(String newItemCaption) {
+                String value = (String) addedItems.getValue();
+                addedItems.setValue(value + newItemCaption + "\n");
+                box.addItem(newItemCaption);
+            }
+        });
+        box.setImmediate(true);
+        addComponent(box);
+    }
 
-       @Override
-       protected Integer getTicketNumber() {
-               return 5694;
-       }
+    @Override
+    protected String getDescription() {
+        return "Firefox flashes the previously entered value when holding the ESC-key.";
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 5694;
+    }
 
 }
index 1c3736cb98d89881869ad2b4977a39f7fb6584d7..17fe4477c351a7ab1cb7e964951c90bb5b46250a 100644 (file)
@@ -28,7 +28,8 @@ public class FormWithRelativelySizedLayout extends TestBase {
         f.setWidth("100%");
         f.setHeight("100%");
 
-        Label l = new Label("This green label should consume all available space, pushing ok button to bottom of the view");
+        Label l = new Label(
+                "This green label should consume all available space, pushing ok button to bottom of the view");
         l.setSizeFull();
 
         CssLayout lo = new CssLayout() {
index f8a6f2db4eaed0c698ef2b78beb6fa85b9c59bf9..62f998e20e84c53ad06e9c3584f583ae154402fc 100644 (file)
@@ -15,7 +15,9 @@ public class WindowResizeListener extends TestBase {
 
     @Override
     protected String getDescription() {
-        return "Size changes from windows (both sub " + "and browsers level) should get back to server." + " If size changes, a separate server side event should occur.";
+        return "Size changes from windows (both sub "
+                + "and browsers level) should get back to server."
+                + " If size changes, a separate server side event should occur.";
     }
 
     @Override
@@ -33,7 +35,9 @@ public class WindowResizeListener extends TestBase {
 
         getMainWindow().addListener(new ResizeListener() {
             public void windowResized(ResizeEvent e) {
-                l.setValue("Current main window size: " + getMainWindow().getWidth() + " x " + getMainWindow().getHeight());
+                l.setValue("Current main window size: "
+                        + getMainWindow().getWidth() + " x "
+                        + getMainWindow().getHeight());
             }
         });
 
@@ -90,6 +94,9 @@ class ResizeListenerWindow extends Window {
     }
 
     public void updateLabel() {
-        sizeLabel.setValue(getWidth() + Sizeable.UNIT_SYMBOLS[getWidthUnits()] + " x " + getHeight() + Sizeable.UNIT_SYMBOLS[getHeightUnits()]);
+        sizeLabel
+                .setValue(getWidth() + Sizeable.UNIT_SYMBOLS[getWidthUnits()]
+                        + " x " + getHeight()
+                        + Sizeable.UNIT_SYMBOLS[getHeightUnits()]);
     }
 }
index 842a89c44636cc072ab87e07f78c31cfee534a60..01ad8934fc82fbf8bf3852e225d3c4abe6fcc149 100644 (file)
@@ -16,7 +16,10 @@ 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;
 
@@ -46,7 +49,8 @@ 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>");
     }
 
     /**
@@ -84,7 +88,8 @@ public abstract class Feature extends CustomComponent {
             final HorizontalLayout layout = new HorizontalLayout();
             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();
@@ -92,7 +97,8 @@ 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);
@@ -114,7 +120,9 @@ public abstract class Feature extends CustomComponent {
         if (example != null) {
             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 b1e690481e3b4a85130ae4e4d2400bb691395f6f..a6aef3e1e940e16f84110c4e4ac4777cc9f1acc7 100644 (file)
@@ -17,7 +17,8 @@ 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 {
 
     VerticalLayout demo = null;
 
@@ -145,7 +146,24 @@ public class FeatureForm extends Feature implements Property.ValueChangeListener
 
     @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 dfee2df6184424b14aa87fddc134115a2d951844..06ab57f6ec342db78d3070314e8be2002c8349ac 100644 (file)
@@ -35,7 +35,9 @@ public class FeatureOrderedLayout extends Feature {
         // Integer(AbstractOrderedLayout.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");
@@ -45,7 +47,9 @@ public class FeatureOrderedLayout extends Feature {
 
     @Override
     protected String getExampleSrc() {
-        return "OrderedLayout ol = new OrderedLayout(AbstractOrderedLayout.ORIENTATION_FLOW);\n" + "ol.addComponent(new TextField(\"Textfield caption\"));\n" + "ol.addComponent(new Label(\"Label\"));\n";
+        return "OrderedLayout ol = new OrderedLayout(AbstractOrderedLayout.ORIENTATION_FLOW);\n"
+                + "ol.addComponent(new TextField(\"Textfield caption\"));\n"
+                + "ol.addComponent(new Label(\"Label\"));\n";
 
     }
 
@@ -54,7 +58,14 @@ 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 00db4c570896d718c4b71003be4a1b4b46cb054c..eef09b23d086b19b7e8161b6cda36b0d7472f035 100644 (file)
@@ -25,7 +25,9 @@ public class FeatureTextField extends Feature {
 
         // Properties
         propertyPanel = new PropertyPanel(tf);
-        final Form f = propertyPanel.createBeanPropertySet(new String[] { "columns", "rows", "wordwrap", "writeThrough", "readThrough", "nullRepresentation", "nullSettingAllowed", "secret" });
+        final Form f = propertyPanel.createBeanPropertySet(new String[] {
+                "columns", "rows", "wordwrap", "writeThrough", "readThrough",
+                "nullRepresentation", "nullSettingAllowed", "secret" });
         propertyPanel.addProperties("Text field properties", f);
 
         setJavadocURL("ui/TextField.html");
@@ -35,7 +37,8 @@ public class FeatureTextField extends Feature {
 
     @Override
     protected String getExampleSrc() {
-        return "TextField tf = new TextField(\"Caption\");\n" + "tf.setValue(\"Contents\");";
+        return "TextField tf = new TextField(\"Caption\");\n"
+                + "tf.setValue(\"Contents\");";
     }
 
     /**
@@ -43,7 +46,16 @@ public class FeatureTextField extends Feature {
      */
     @Override
     protected String getDescriptionXHTML() {
-        return "TextField combines the logic of both the single line text-entry field and the multi-line " + "text-area into one component. " + "As with all Data-components of Vaadin, the TextField can also be bound to an " + "underlying data source, both directly or in a buffered (asynchronous) " + "mode. In buffered mode its background color will change to indicate " + "that the value has changed but is not committed." + "<br /><br />Furthermore a validators may be bound to the component to " + "check and validate the given input before it is actually committed." + "<br /><br />On the demo tab you can try out how the different properties affect the " + "presentation of the component.";
+        return "TextField combines the logic of both the single line text-entry field and the multi-line "
+                + "text-area into one component. "
+                + "As with all Data-components of Vaadin, the TextField can also be bound to an "
+                + "underlying data source, both directly or in a buffered (asynchronous) "
+                + "mode. In buffered mode its background color will change to indicate "
+                + "that the value has changed but is not committed."
+                + "<br /><br />Furthermore a validators may be bound to the component to "
+                + "check and validate the given input before it is actually committed."
+                + "<br /><br />On the demo tab you can try out how the different properties affect the "
+                + "presentation of the component.";
     }
 
     @Override
index 1b04bafae9511cdc26de38605d15b1f97f394e48..f68aa152ce9d949774915fed0587fa8120e8747a 100644 (file)
@@ -39,7 +39,8 @@ import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.themes.Reindeer;
 
-public class PropertyPanel extends Panel implements Button.ClickListener, Property.ValueChangeListener {
+public class PropertyPanel extends Panel implements Button.ClickListener,
+        Property.ValueChangeListener {
 
     private Select addComponent;
 
@@ -86,7 +87,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
         if (objectToConfigure instanceof Select) {
             addSelectProperties();
         }
-        if (objectToConfigure instanceof AbstractField && !(objectToConfigure instanceof Table || objectToConfigure instanceof Tree)) {
+        if (objectToConfigure instanceof AbstractField
+                && !(objectToConfigure instanceof Table || objectToConfigure instanceof Tree)) {
             addFieldProperties();
         }
         if ((objectToConfigure instanceof AbstractComponentContainer)) {
@@ -98,7 +100,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
         allProperties.addContainerProperty("Type", String.class, "");
         allProperties.addContainerProperty("R/W", String.class, "");
         allProperties.addContainerProperty("Demo", String.class, "");
-        allProperties.setColumnAlignments(new String[] { Table.ALIGN_LEFT, Table.ALIGN_LEFT, Table.ALIGN_CENTER, Table.ALIGN_CENTER });
+        allProperties.setColumnAlignments(new String[] { Table.ALIGN_LEFT,
+                Table.ALIGN_LEFT, Table.ALIGN_CENTER, Table.ALIGN_CENTER });
         allProperties.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_ID);
         allProperties.setPageLength(0);
         allProperties.setSizeFull();
@@ -149,7 +152,12 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
 
         // Fill the table
         for (int i = 0; i < pd.length; i++) {
-            allProperties.addItem(new Object[] { pd[i].getName(), pd[i].getPropertyType().getName(), (pd[i].getWriteMethod() == null ? "R" : "R/W"), (listed.contains(pd[i].getName()) ? "x" : "") }, pd[i]);
+            allProperties.addItem(
+                    new Object[] { pd[i].getName(),
+                            pd[i].getPropertyType().getName(),
+                            (pd[i].getWriteMethod() == null ? "R" : "R/W"),
+                            (listed.contains(pd[i].getName()) ? "x" : "") },
+                    pd[i]);
         }
     }
 
@@ -157,10 +165,14 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
     private void addBasicComponentProperties() {
 
         // Set of properties
-        final Form set = createBeanPropertySet(new String[] { "caption", "icon", "componentError", "description", "enabled", "visible", "style", "readOnly", "immediate" });
+        final Form set = createBeanPropertySet(new String[] { "caption",
+                "icon", "componentError", "description", "enabled", "visible",
+                "style", "readOnly", "immediate" });
 
         // Icon
-        set.replaceWithSelect("icon", new Object[] { null, new ThemeResource("icon/files/file.gif") }, new Object[] { "No icon", "Sample icon" });
+        set.replaceWithSelect("icon", new Object[] { null,
+                new ThemeResource("icon/files/file.gif") }, new Object[] {
+                "No icon", "Sample icon" });
 
         // Component error
         Throwable sampleException;
@@ -169,26 +181,85 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
         } catch (final NullPointerException e) {
             sampleException = e;
         }
-        set.replaceWithSelect("componentError", new Object[] { null, new UserError("Sample text error message."), new UserError("<h3>Error message formatting</h3><p>Error messages can " + "contain any UIDL formatting, like: <ul><li><b>Bold" + "</b></li><li><i>Italic</i></li></ul></p>", UserError.CONTENT_UIDL, ErrorMessage.INFORMATION), new SystemError("This is an example of exception error reposting", sampleException) }, new Object[] { "No error", "Sample text error", "Sample Formatted error", "Sample System Error" });
+        set.replaceWithSelect(
+                "componentError",
+                new Object[] {
+                        null,
+                        new UserError("Sample text error message."),
+                        new UserError(
+                                "<h3>Error message formatting</h3><p>Error messages can "
+                                        + "contain any UIDL formatting, like: <ul><li><b>Bold"
+                                        + "</b></li><li><i>Italic</i></li></ul></p>",
+                                UserError.CONTENT_UIDL,
+                                ErrorMessage.INFORMATION),
+                        new SystemError(
+                                "This is an example of exception error reposting",
+                                sampleException) }, new Object[] { "No error",
+                        "Sample text error", "Sample Formatted error",
+                        "Sample System Error" });
 
         // Style
-        final String currentStyle = ((Component) objectToConfigure).getStyleName();
+        final String currentStyle = ((Component) objectToConfigure)
+                .getStyleName();
         if (currentStyle == null) {
-            set.replaceWithSelect("style", new Object[] { null }, new Object[] { "Default" }).setNewItemsAllowed(true);
+            set.replaceWithSelect("style", new Object[] { null },
+                    new Object[] { "Default" }).setNewItemsAllowed(true);
         } else {
-            set.replaceWithSelect("style", new Object[] { null, currentStyle }, new Object[] { "Default", currentStyle }).setNewItemsAllowed(true);
+            set.replaceWithSelect("style", new Object[] { null, currentStyle },
+                    new Object[] { "Default", currentStyle })
+                    .setNewItemsAllowed(true);
         }
 
         // Set up descriptions
-        set.getField("caption").setDescription("Component caption is the title of the component. Usage of the caption is optional and the " + "exact behavior of the propery is defined by the component. Setting caption null " + "or empty disables the caption.");
-        set.getField("enabled").setDescription("Enabled property controls the usage of the component. If the component is disabled (enabled=false)," + " it can not receive any events from the terminal. In most cases it makes the usage" + " of the component easier, if the component visually looks disbled (for example is grayed), " + "when it can not be used.");
-        set.getField("icon").setDescription("Icon of the component selects the main icon of the component. The usage of the icon is identical " + "to caption and in most components caption and icon are kept together. Icons can be " + "loaded from any resources (see Terminal/Resources for more information). Some components " + "contain more than just the captions icon. Those icons are controlled through their " + "own properties.");
-        set.getField("visible").setDescription("Visibility property says if the component is renreded or not. Invisible components are implicitly " + "disabled, as there is no visible user interface to send event.");
-        set.getField("description").setDescription("Description is designed to allow easy addition of short tooltips, like this. Like the caption," + " setting description null or empty disables the description.");
-        set.getField("readOnly").setDescription("Those components that have internal state that can be written are settable to readOnly-mode," + " where the object can only be read, not written.");
-        set.getField("componentError").setDescription("Vaadin supports extensive error reporting. One part of the error reporting are component" + " errors that can be controlled by the programmer. This example only contains couple of " + "sample errors; to get the full picture, read browse ErrorMessage-interface implementors " + "API documentation.");
-        set.getField("immediate").setDescription("Not all terminals can send the events immediately to server from all action. Web is the most " + "typical environment where many events (like textfield changed) are not sent to server, " + "before they are explicitly submitted. Setting immediate property true (by default this " + "is false for most components), the programmer can assure that the application is" + " notified as soon as possible about the value change in this component.");
-        set.getField("style").setDescription("Themes specify the overall looks of the user interface. In addition component can have a set of " + "styles, that can be visually very different (like datefield calendar- and text-styles), " + "but contain the same logical functionality. As a rule of thumb, theme specifies if a " + "component is blue or yellow and style determines how the component is used.");
+        set.getField("caption")
+                .setDescription(
+                        "Component caption is the title of the component. Usage of the caption is optional and the "
+                                + "exact behavior of the propery is defined by the component. Setting caption null "
+                                + "or empty disables the caption.");
+        set.getField("enabled")
+                .setDescription(
+                        "Enabled property controls the usage of the component. If the component is disabled (enabled=false),"
+                                + " it can not receive any events from the terminal. In most cases it makes the usage"
+                                + " of the component easier, if the component visually looks disbled (for example is grayed), "
+                                + "when it can not be used.");
+        set.getField("icon")
+                .setDescription(
+                        "Icon of the component selects the main icon of the component. The usage of the icon is identical "
+                                + "to caption and in most components caption and icon are kept together. Icons can be "
+                                + "loaded from any resources (see Terminal/Resources for more information). Some components "
+                                + "contain more than just the captions icon. Those icons are controlled through their "
+                                + "own properties.");
+        set.getField("visible")
+                .setDescription(
+                        "Visibility property says if the component is renreded or not. Invisible components are implicitly "
+                                + "disabled, as there is no visible user interface to send event.");
+        set.getField("description")
+                .setDescription(
+                        "Description is designed to allow easy addition of short tooltips, like this. Like the caption,"
+                                + " setting description null or empty disables the description.");
+        set.getField("readOnly")
+                .setDescription(
+                        "Those components that have internal state that can be written are settable to readOnly-mode,"
+                                + " where the object can only be read, not written.");
+        set.getField("componentError")
+                .setDescription(
+                        "Vaadin supports extensive error reporting. One part of the error reporting are component"
+                                + " errors that can be controlled by the programmer. This example only contains couple of "
+                                + "sample errors; to get the full picture, read browse ErrorMessage-interface implementors "
+                                + "API documentation.");
+        set.getField("immediate")
+                .setDescription(
+                        "Not all terminals can send the events immediately to server from all action. Web is the most "
+                                + "typical environment where many events (like textfield changed) are not sent to server, "
+                                + "before they are explicitly submitted. Setting immediate property true (by default this "
+                                + "is false for most components), the programmer can assure that the application is"
+                                + " notified as soon as possible about the value change in this component.");
+        set.getField("style")
+                .setDescription(
+                        "Themes specify the overall looks of the user interface. In addition component can have a set of "
+                                + "styles, that can be visually very different (like datefield calendar- and text-styles), "
+                                + "but contain the same logical functionality. As a rule of thumb, theme specifies if a "
+                                + "component is blue or yellow and style determines how the component is used.");
 
         // Add created fields to property panel
         addProperties("Component Basics", set);
@@ -204,11 +275,17 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
 
     /** Add properties for selecting */
     private void addSelectProperties() {
-        final Form set = createBeanPropertySet(new String[] { "newItemsAllowed", "lazyLoading", "multiSelect" });
+        final Form set = createBeanPropertySet(new String[] {
+                "newItemsAllowed", "lazyLoading", "multiSelect" });
         addProperties("Select Properties", set);
 
-        set.getField("multiSelect").setDescription("Specified if multiple items can be selected at once.");
-        set.getField("newItemsAllowed").setDescription("Select component (but not Tree or Table) can allow the user to directly " + "add new items to set of options. The new items are constrained to be " + "strings and thus feature only applies to simple lists.");
+        set.getField("multiSelect").setDescription(
+                "Specified if multiple items can be selected at once.");
+        set.getField("newItemsAllowed")
+                .setDescription(
+                        "Select component (but not Tree or Table) can allow the user to directly "
+                                + "add new items to set of options. The new items are constrained to be "
+                                + "strings and thus feature only applies to simple lists.");
         /*
          * Button ll = (Button) set.getField("lazyLoading"); ll
          * .setDescription("In Ajax rendering mode select supports lazy loading
@@ -218,7 +295,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
          * set.getField("multiSelect").setVisible(false);
          * set.getField("newItemsAllowed").setVisible(false); }
          */
-        if (objectToConfigure instanceof Tree || objectToConfigure instanceof Table) {
+        if (objectToConfigure instanceof Tree
+                || objectToConfigure instanceof Table) {
             set.removeItemProperty("newItemsAllowed");
             set.removeItemProperty("lazyLoading");
         }
@@ -230,7 +308,9 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
         final Form set = createBeanPropertySet(new String[] { "required" });
 
         set.addField("focus", new Button("Focus", objectToConfigure, "focus"));
-        set.getField("focus").setDescription("Focus the cursor to this field. Not all " + "components and/or terminals support this feature.");
+        set.getField("focus").setDescription(
+                "Focus the cursor to this field. Not all "
+                        + "components and/or terminals support this feature.");
 
         addProperties("Field Features", set);
 
@@ -252,7 +332,9 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
         addComponent.addListener(this);
 
         set.addField("component adder", addComponent);
-        set.addField("remove all components", new Button("Remove all components", objectToConfigure, "removeAllComponents"));
+        set.addField("remove all components", new Button(
+                "Remove all components", objectToConfigure,
+                "removeAllComponents"));
 
         addProperties("ComponentContainer Features", set);
     }
@@ -262,7 +344,11 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
 
         // FIXME: navigation statistics
         try {
-            FeatureUtil.debug(getApplication().getUser().toString(), "valueChange " + ((AbstractComponent) event.getProperty()).getTag() + ", " + event.getProperty());
+            FeatureUtil.debug(
+                    getApplication().getUser().toString(),
+                    "valueChange "
+                            + ((AbstractComponent) event.getProperty())
+                                    .getTag() + ", " + event.getProperty());
         } catch (final Exception e) {
             // ignored, should never happen
         }
@@ -274,7 +360,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
             if (value != null) {
                 // TextField component
                 if (value.equals("Text field")) {
-                    ((AbstractComponentContainer) objectToConfigure).addComponent(new TextField("Test field"));
+                    ((AbstractComponentContainer) objectToConfigure)
+                            .addComponent(new TextField("Test field"));
                 }
 
                 // DateField time style
@@ -283,7 +370,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
                     d.setDescription("This is a DateField-component with text-style");
                     d.setResolution(DateField.RESOLUTION_MIN);
                     d.setStyleName("text");
-                    ((AbstractComponentContainer) objectToConfigure).addComponent(d);
+                    ((AbstractComponentContainer) objectToConfigure)
+                            .addComponent(d);
                 }
 
                 // Date field calendar style
@@ -292,7 +380,8 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
                     c.setDescription("DateField-component with calendar-style and day-resolution");
                     c.setStyleName("calendar");
                     c.setResolution(DateField.RESOLUTION_DAY);
-                    ((AbstractComponentContainer) objectToConfigure).addComponent(c);
+                    ((AbstractComponentContainer) objectToConfigure)
+                            .addComponent(c);
                 }
 
                 // Select option group style
@@ -304,13 +393,15 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
                     s.addItem("Solaris");
                     s.addItem("Symbian");
 
-                    ((AbstractComponentContainer) objectToConfigure).addComponent(s);
+                    ((AbstractComponentContainer) objectToConfigure)
+                            .addComponent(s);
                 }
 
                 addComponent.setValue(null);
             }
         } else if (event.getProperty() == getField("lazyLoading")) {
-            final boolean newValue = ((Boolean) event.getProperty().getValue()).booleanValue();
+            final boolean newValue = ((Boolean) event.getProperty().getValue())
+                    .booleanValue();
             final Field multiselect = getField("multiSelect");
             final Field newitems = getField("newItemsAllowed");
             if (newValue) {
@@ -329,7 +420,10 @@ public class PropertyPanel extends Panel implements Button.ClickListener, Proper
     public void buttonClick(Button.ClickEvent event) {
         // FIXME: navigation statistics
         try {
-            FeatureUtil.debug(getApplication().getUser().toString(), "buttonClick " + event.getButton().getTag() + ", " + event.getButton().getCaption() + ", " + event.getButton().getValue());
+            FeatureUtil.debug(getApplication().getUser().toString(),
+                    "buttonClick " + event.getButton().getTag() + ", "
+                            + event.getButton().getCaption() + ", "
+                            + event.getButton().getValue());
         } catch (final Exception e) {
             // ignored, should never happen
         }
index 281cc34920c08765a2fbab13e1d28639d1f09e69..1c864fdb471c7b56cc08d5afdb53b6baa4d6f56c 100644 (file)
@@ -23,7 +23,8 @@ public class GridLayoutInsidePanel extends TestBase {
         {
             GridLayout gl = new GridLayout(1, 1);
             gl.setSizeUndefined();
-            gl.addComponent(new Label("A label which defines the size of the GL"));
+            gl.addComponent(new Label(
+                    "A label which defines the size of the GL"));
 
             Panel p = new Panel("Panel 1");
             ((Layout) p.getContent()).setMargin(false);
@@ -36,7 +37,8 @@ public class GridLayoutInsidePanel extends TestBase {
         {
             GridLayout gl = new GridLayout(1, 1);
             gl.setSizeUndefined();
-            gl.addComponent(new Label("A label which defines the size of the GL"));
+            gl.addComponent(new Label(
+                    "A label which defines the size of the GL"));
 
             Panel p = new Panel("Panel 2", gl);
             ((Layout) p.getContent()).setMargin(false);
index bfc8a8e5420ae63c859664135fffde43916ea96e..b6cf336d4f45672123f9ae35d10b36eaa4c496a2 100644 (file)
@@ -150,19 +150,22 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setWidth("");\r
         ol.setCaption("Fixed height (50px) and dynamic width");\r
 \r
-        TextField tf = new TextField("100px high TextField, valign: bottom, should be partly outside");\r
+        TextField tf = new TextField(\r
+                "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("100% high, 50px wide TextField, valign: bottom, should fill full height");\r
+        tf = new TextField(\r
+                "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("100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
+        Label l = new Label(\r
+                "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
@@ -213,7 +216,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
 \r
-        Label l = new Label("100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
+        Label l = new Label(\r
+                "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
@@ -265,7 +269,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_LEFT);\r
 \r
-        Label l = new Label("100% high, 50px wide Label, valign: bottom, does not fill full height, only needed space");\r
+        Label l = new Label(\r
+                "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
@@ -322,7 +327,8 @@ 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: " + valignName[i % 3]);\r
+            tf.setValue(w + "px high, " + w + "px wide TextField, valign: "\r
+                    + valignName[i % 3]);\r
             tf.setWidth(w + "px");\r
             tf.setHeight(w + "px");\r
             ol.addComponent(tf);\r
@@ -352,7 +358,9 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_field_100pct_button_field");\r
+        ol.setCaption("Fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight()\r
+                + "px) / layout_field_100pct_button_field");\r
         TextField tf;\r
 \r
         tf = new TextField("300px x 300px Field");\r
@@ -392,7 +400,9 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_basic_test");\r
+        ol.setCaption("Fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight()\r
+                + "px) / layout_basic_test");\r
         TextField tf;\r
 \r
         tf = new TextField("300px x 300px Field");\r
@@ -432,7 +442,9 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(false);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_symmetric_fields");\r
+        ol.setCaption("Fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight()\r
+                + "px) / layout_symmetric_fields");\r
         TextField tf;\r
 \r
         tf = new TextField("300px x 300px Field");\r
@@ -469,7 +481,9 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_leftAndRight");\r
+        ol.setCaption("Fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight()\r
+                + "px) / layout_leftAndRight");\r
         TextField tf;\r
 \r
         // tf = new TextField("100%x100% Field");\r
@@ -543,7 +557,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Filled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("Filled with fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField("60%x100% Field");\r
@@ -635,7 +650,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("OverFilled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("OverFilled with fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         for (int i = 0; i < 5; i++) {\r
@@ -663,7 +679,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("OverFilled with fixed width (" + ol.getWidth() + "px) and dynamic height");\r
+        ol.setCaption("OverFilled with fixed width (" + ol.getWidth()\r
+                + "px) and dynamic height");\r
         TextField tf;\r
 \r
         for (int i = 0; i < 10; i++) {\r
@@ -710,7 +727,9 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px) / layout_add_remove_components");\r
+        ol.setCaption("Fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight()\r
+                + "px) / layout_add_remove_components");\r
 \r
         for (int i = 0; i < 2; i++) {\r
             AbstractOrderedLayout inner = createAddRemove(ol, "", "");\r
@@ -754,10 +773,12 @@ public class OrderedLayoutBasics extends TestBase {
         tf = new TextField("Short caption");\r
         ol.addComponent(tf);\r
 \r
-        tf = new TextField("A very long caption which is probably much longer than the field");\r
+        tf = new TextField(\r
+                "A very long caption which is probably much longer than the field");\r
         ol.addComponent(tf);\r
 \r
-        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField(\r
+                "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
@@ -793,14 +814,16 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField("A long caption which is probably much longer than the field");\r
+        tf = new TextField(\r
+                "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("A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField(\r
+                "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
@@ -822,7 +845,8 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
-    private Layout layout_captions_fixed_size_and_relative_size(AbstractOrderedLayout ol) {\r
+    private Layout layout_captions_fixed_size_and_relative_size(\r
+            AbstractOrderedLayout ol) {\r
         ol.setWidth("700px");\r
         ol.setHeight("250px");\r
 \r
@@ -842,7 +866,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
         ol.setExpandRatio(tf, 1);\r
 \r
-        tf = new TextField("A long caption which is probably much longer than the field");\r
+        tf = new TextField(\r
+                "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
@@ -851,7 +876,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
         ol.setExpandRatio(tf, 2);\r
 \r
-        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField(\r
+                "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
@@ -875,7 +901,8 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
-    private Layout layout_captions_fixed_size_and_fixed_size(AbstractOrderedLayout ol) {\r
+    private Layout layout_captions_fixed_size_and_fixed_size(\r
+            AbstractOrderedLayout ol) {\r
         ol.setWidth("700px");\r
         ol.setHeight("250px");\r
 \r
@@ -893,7 +920,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField("A long caption which is probably much longer than the field");\r
+        tf = new TextField(\r
+                "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
@@ -901,7 +929,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.addComponent(tf);\r
         ol.setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
 \r
-        tf = new TextField("A very long caption which is probably much longer than the field and includes indicators");\r
+        tf = new TextField(\r
+                "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
@@ -935,7 +964,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setCaption("Caption test with fixed width");\r
 \r
         Label l;\r
-        l = new Label("This is a long text and should remain on one line as there is nothing forcing line breaks");\r
+        l = new Label(\r
+                "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
@@ -949,7 +979,8 @@ public class OrderedLayoutBasics extends TestBase {
 \r
     }\r
 \r
-    private AbstractOrderedLayout createAddRemove(AbstractOrderedLayout ol, String width, String buttonSuffix) {\r
+    private AbstractOrderedLayout createAddRemove(AbstractOrderedLayout ol,\r
+            String width, String buttonSuffix) {\r
         Button b = createAddButton(ol);\r
         Button wb = createWideAddButton(ol);\r
         Button r = createRemoveButton(ol, buttonSuffix);\r
@@ -969,7 +1000,8 @@ 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(), event.getButton().getParent(), "");\r
+                addBefore((AbstractOrderedLayout) event.getButton().getData(),\r
+                        event.getButton().getParent(), "");\r
             }\r
 \r
         });\r
@@ -982,7 +1014,8 @@ 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(), event.getButton().getParent(), "100%");\r
+                addBefore((AbstractOrderedLayout) event.getButton().getData(),\r
+                        event.getButton().getParent(), "100%");\r
             }\r
 \r
         });\r
@@ -995,7 +1028,8 @@ 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(), event.getButton().getParent());\r
+                remove((AbstractOrderedLayout) event.getButton().getData(),\r
+                        event.getButton().getParent());\r
             }\r
 \r
         });\r
@@ -1019,7 +1053,8 @@ public class OrderedLayoutBasics extends TestBase {
             }\r
             index++;\r
         }\r
-        AbstractOrderedLayout inner = createAddRemove(ol, width, String.valueOf(suffix++));\r
+        AbstractOrderedLayout inner = createAddRemove(ol, width,\r
+                String.valueOf(suffix++));\r
         ol.addComponent(inner, index);\r
         if (width.contains("%")) {\r
             ol.setExpandRatio(inner, 1.0f);\r
@@ -1036,7 +1071,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("100 % filled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("100 % filled with fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField();\r
@@ -1086,7 +1122,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(false);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("100 % filled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("100 % filled with fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField();\r
@@ -1124,7 +1161,8 @@ public class OrderedLayoutBasics extends TestBase {
         ol.setSpacing(true);\r
 \r
         // ol.setWidth("");\r
-        ol.setCaption("Underfilled with fixed width (" + ol.getWidth() + "px) and fixed height (" + ol.getHeight() + "px)");\r
+        ol.setCaption("Underfilled with fixed width (" + ol.getWidth()\r
+                + "px) and fixed height (" + ol.getHeight() + "px)");\r
         TextField tf;\r
 \r
         tf = new TextField("60%x100% Field");\r
index 8eb0571a779df7e42cfea25fb12d37b19fde5a3e..1f91e44262e670ea73f6ceed36b2e130bc1c5f27 100644 (file)
@@ -20,7 +20,8 @@ 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();
@@ -35,13 +36,16 @@ 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();
 
@@ -53,7 +57,8 @@ public class Ticket1225 extends Application {
         ts.addComponent(red);
         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, Alignment.MIDDLE_RIGHT);
 
index 5b08107df0a1ef714c0430c94e93fb13ad2e0948..740f79337a1afb585741f25901eb025f810d7d62 100644 (file)
@@ -116,11 +116,12 @@ 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() {
@@ -140,8 +141,10 @@ 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 3a2fd78ce88290f359a938ae0f8f16b4d632a01e..c8936a18918bf46330bebb70876843798f4ed307 100644 (file)
@@ -17,7 +17,8 @@ public class Ticket1245 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.addComponent(new TreeExample());\r
index 2a4b0014f2a6d23f64a96e951f2c550400e50f9f..d8fdefbd38da27ff8c6f227258260edde22a5089 100644 (file)
@@ -46,7 +46,20 @@ 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();
@@ -65,7 +78,8 @@ 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() {
@@ -81,13 +95,15 @@ 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);
                     }
@@ -100,7 +116,11 @@ 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");
             }
         };
 
@@ -205,7 +225,8 @@ public class Ticket1362Login extends Application {
     @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 VerticalLayout();
 
@@ -236,11 +257,15 @@ public class Ticket1362Login extends Application {
                 if (pw.equals("1234")) {
                     setUser(username);
                     currentUser.setValue(username);
-                    currentUser.getWindow().showNotification("Logged in user: " + username);
-                    getMainWindow().getContent().replaceComponent(loginBox, mainPanel);
+                    currentUser.getWindow().showNotification(
+                            "Logged in user: " + username);
+                    getMainWindow().getContent().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 77c7f30b51a47af8f0dfcdc8fac3220e726b4014..be549ebf8c2ac71816ac9cc283afb0c091a7fe66 100644 (file)
@@ -15,7 +15,8 @@ public class Ticket1365 extends com.vaadin.Application implements Handler {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.addComponent(f);\r
@@ -25,14 +26,19 @@ public class Ticket1365 extends com.vaadin.Application implements Handler {
 \r
     }\r
 \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
+    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
 \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() + " to fire shortcut. Texfield value: " + f.getValue());\r
+        status.setValue("Pressed " + action.getCaption()\r
+                + " to fire shortcut. Texfield value: " + f.getValue());\r
         f.focus();\r
     }\r
 \r
index 934be4e20d16de98dfe6a3dfa66687a2b0faecd2..282df33d894afdf1a6e24e87a0eae6cd63a94ec3 100644 (file)
@@ -26,7 +26,8 @@ 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() {
@@ -48,7 +49,8 @@ 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() {
@@ -81,7 +83,8 @@ 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() {
@@ -123,7 +126,9 @@ 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";
@@ -134,7 +139,8 @@ 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 16445805a14a4d08fd863a78361d9695d75f84a5..b961c0d6b10f46b5b72bcd02725308b98277075a 100644 (file)
@@ -134,7 +134,8 @@ public class Ticket1435 extends Application {
                         } else {
                             root.setHeight(lastHeight, lastHeightUnit);
                         }
-                        event.getButton().setCaption(visible ? "Expand" : "Collapse");
+                        event.getButton().setCaption(
+                                visible ? "Expand" : "Collapse");
                     }
                 }
             });
@@ -218,7 +219,8 @@ 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 d827f97e37dd0d38a7c27dee32b93016e1506b37..003b50240b81e411c433bdae367a890235ebe2e3 100644 (file)
@@ -10,14 +10,17 @@ 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);
 
         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 a11d4b03ad81601f35fa4d3207efeb297e6b12ba..ff716aefc12b0ce3abe8710ac9b121d049ee2544 100644 (file)
@@ -17,29 +17,38 @@ 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 05c1a3d3c812854f9e3f0ecb065a57d56a7a98ce..37690612ed499370ec2443c2b18b7077cb0878e7 100644 (file)
@@ -14,10 +14,13 @@ import com.vaadin.ui.Select;
 public class Ticket1506_Panel extends Panel {\r
 \r
     public Ticket1506_Panel() {\r
-        ObjectProperty<String> property1 = new ObjectProperty<String>(null, String.class);\r
-        addComponent(initSelect(new Ticket1506_TestContainer(), "Test select", property1));\r
+        ObjectProperty<String> property1 = new ObjectProperty<String>(null,\r
+                String.class);\r
+        addComponent(initSelect(new Ticket1506_TestContainer(), "Test select",\r
+                property1));\r
         addComponent(initButton(property1));\r
-        addComponent(initSelect(new Ticket1506_TestContainer2(), "Test select 2", new ObjectProperty<String>(null, String.class)));\r
+        addComponent(initSelect(new Ticket1506_TestContainer2(),\r
+                "Test select 2", new ObjectProperty<String>(null, String.class)));\r
     }\r
 \r
     private Component initButton(final ObjectProperty<?> property) {\r
@@ -30,7 +33,8 @@ public class Ticket1506_Panel extends Panel {
         return button;\r
     }\r
 \r
-    private Component initSelect(Container containerDataSource, String caption, ObjectProperty<?> property) {\r
+    private Component initSelect(Container containerDataSource, String caption,\r
+            ObjectProperty<?> property) {\r
         Select select = new Select(caption);\r
         select.setFilteringMode(Select.FILTERINGMODE_CONTAINS);\r
         select.setImmediate(true);\r
index bcb37b1fbe8bb6db0bb09b84f0d165da42c0fb11..b8b6cfe5ddb4ed40814161336aa8a1df319f0b93 100644 (file)
@@ -24,13 +24,17 @@ 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>("value 1", String.class));\r
-        item1.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>("name 1", String.class));\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
         items.put(ITEM_1_ID, item1);\r
 \r
         final PropertysetItem item2 = new PropertysetItem();\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
+        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
         items.put(ITEM_2_ID, item2);\r
     }\r
 \r
@@ -101,15 +105,18 @@ public class Ticket1506_TestContainer implements Container {
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeItem(Object itemId) throws UnsupportedOperationException {\r
+    public boolean removeItem(Object itemId)\r
+            throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException {\r
+    public boolean addContainerProperty(Object propertyId, Class<?> type,\r
+            Object defaultValue) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException {\r
+    public boolean removeContainerProperty(Object propertyId)\r
+            throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
index 121e30009c8a7aeccb413b2ba76deea876191522..c39454027ac472d495b735c40c1b2d5ad5edc138 100644 (file)
@@ -25,8 +25,10 @@ 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>("value " + i, String.class));\r
-            item.addItemProperty(PROPERTY_2_ID, new ObjectProperty<String>("name " + i, String.class));\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
             items.put(String.valueOf(i), item);\r
         }\r
     }\r
@@ -95,15 +97,18 @@ public class Ticket1506_TestContainer2 implements Container {
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeItem(Object itemId) throws UnsupportedOperationException {\r
+    public boolean removeItem(Object itemId)\r
+            throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException {\r
+    public boolean addContainerProperty(Object propertyId, Class<?> type,\r
+            Object defaultValue) throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
-    public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException {\r
+    public boolean removeContainerProperty(Object propertyId)\r
+            throws UnsupportedOperationException {\r
         throw new UnsupportedOperationException("Not implemented");\r
     }\r
 \r
index 8a2a39a16944dbeee8f5f7dd9077313c0cdb539f..a928e0f69c941554368f033b2234b3253681efa3 100644 (file)
@@ -17,7 +17,8 @@ public class Ticket1572 extends com.vaadin.Application {
     @Override\r
     public void init() {\r
 \r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         Panel p = new Panel("Test wrapper for gridlayout margin/spacing");\r
index 0be28d08bc8da285baf940d7672cc45be116d23f..6780b3c9de56324ccbdf4809a18002d694d595fa 100644 (file)
@@ -17,7 +17,8 @@ public class Ticket1581 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.addComponent(new Label("Test the second issue in ticket #1581"));\r
index 88519ee64b7085a826a42fe293c8d22048dc24b0..5a2bf0c793b2cbe260db4fce682a95f1fef230a7 100644 (file)
@@ -29,9 +29,13 @@ public class Ticket1589 extends Application {
 \r
         w.addURIHandler(res);\r
 \r
-        w.addComponent(new Link("Test (without Content-Disposition, should suggest generatedFile.png when saving, browser default for actual disposition)", new ExternalResource("myresource")));\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
 \r
-        w.addComponent(new Link("Test (with Content-Disposition, should popup download dialog that suggests  filename downloadedPNG.png)", new ExternalResource("myresource_download")));\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
     }\r
 }\r
 \r
@@ -53,7 +57,8 @@ class MyDynamicResource implements URIHandler {
         }\r
 \r
         // Create an image and draw some background on it.\r
-        BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);\r
+        BufferedImage image = new BufferedImage(200, 200,\r
+                BufferedImage.TYPE_INT_RGB);\r
         Graphics drawable = image.getGraphics();\r
         drawable.setColor(Color.lightGray);\r
         drawable.fillRect(0, 0, 200, 200);\r
@@ -72,11 +77,14 @@ class MyDynamicResource implements URIHandler {
             ImageIO.write(image, "png", imagebuffer);\r
 \r
             // Return a stream from the buffer.\r
-            ByteArrayInputStream istream = new ByteArrayInputStream(imagebuffer.toByteArray());\r
-            DownloadStream downloadStream = new DownloadStream(istream, "image/png", "generatedFile.png");\r
+            ByteArrayInputStream istream = new ByteArrayInputStream(\r
+                    imagebuffer.toByteArray());\r
+            DownloadStream downloadStream = new DownloadStream(istream,\r
+                    "image/png", "generatedFile.png");\r
 \r
             if (relativeUri.startsWith("myresource_download")) {\r
-                downloadStream.setParameter("Content-Disposition", "attachment; filename=\"downloadedPNG.png\"");\r
+                downloadStream.setParameter("Content-Disposition",\r
+                        "attachment; filename=\"downloadedPNG.png\"");\r
             }\r
             return downloadStream;\r
         } catch (IOException e) {\r
index b41609083486be59841e4100a9ae5cd061366010..20f1d4d98515eeaa83698a79e79e5616d3aa920c 100644 (file)
@@ -41,33 +41,39 @@ 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 43669da762470acbd603a42a6b760b372b3bdb81..8bba5a103e4129afb6f04bb02f1ea60edee87cf7 100644 (file)
@@ -12,18 +12,23 @@ 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 d3734f7ba049c407e0835f2c86d87e24b86f998a..e7b98a4c995c95f0d3f4dee7eafdd3b81ddfa7b3 100644 (file)
@@ -14,7 +14,8 @@ 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("You must enter only one first name."));\r
+        tf.setComponentError(new SystemError(\r
+                "You must enter only one first name."));\r
 \r
         main.addComponent(tf);\r
     }\r
index dbeabfbef0330c4aa52bca3fda2adc75b24b1cbf..1d326acd1855b78d22d9a8df5b8493827923a735 100644 (file)
@@ -43,8 +43,10 @@ public class Ticket1710 extends com.vaadin.Application {
 \r
         // OrderedLayout\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
+        LayoutTestingPanel oltp = new LayoutTestingPanel("OrderedLayout",\r
+                orderedLayout);\r
+        hidingControls.addComponent(new Button("OrderedLayout",\r
+                new MethodProperty<Boolean>(oltp, "visible")));\r
         lo.addComponent(oltp);\r
         orderedLayout.setSpacing(false);\r
         addFields(orderedLayout);\r
@@ -52,14 +54,16 @@ public class Ticket1710 extends com.vaadin.Application {
         // 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)", new MethodProperty<Boolean>(g1tp, "visible")));\r
+        hidingControls.addComponent(new Button("GridLayout (1col)",\r
+                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)", new MethodProperty<Boolean>(g2tp, "visible")));\r
+        hidingControls.addComponent(new Button("GridLayout (2cols)",\r
+                new MethodProperty<Boolean>(g2tp, "visible")));\r
         g2tp.setVisible(false);\r
         lo.addComponent(g2tp);\r
         grid2.setSpacing(true);\r
@@ -67,8 +71,10 @@ public class Ticket1710 extends com.vaadin.Application {
 \r
         // ExpandLayout\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
+        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
         elp.setVisible(false);\r
         el.setHeight("700px");\r
         addFields(el);\r
@@ -77,8 +83,10 @@ public class Ticket1710 extends com.vaadin.Application {
         el.setExpandRatio(firstComponent, 1);\r
         lo.addComponent(elp);\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
+        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
         elhp.setVisible(false);\r
         elhp.setScrollable(true);\r
         elh.setWidth("2000px");\r
@@ -92,19 +100,22 @@ public class Ticket1710 extends com.vaadin.Application {
         // CustomLayout\r
         VerticalLayout cl = new VerticalLayout();\r
         Panel clp = new LayoutTestingPanel("CustomLayout", cl);\r
-        hidingControls.addComponent(new Button("CustomLayout", new MethodProperty<Boolean>(clp, "visible")));\r
+        hidingControls.addComponent(new Button("CustomLayout",\r
+                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", new MethodProperty<Boolean>(formPanel, "visible")));\r
+        hidingControls.addComponent(new Button("Form",\r
+                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.hasNext();) {\r
+        for (Iterator<Component> i = hidingControls.getComponentIterator(); i\r
+                .hasNext();) {\r
             ((AbstractComponent) i.next()).setImmediate(true);\r
         }\r
 \r
@@ -194,7 +205,8 @@ 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("Datefield with caption and icon, next one without caption");\r
+        DateField d1 = new DateField(\r
+                "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
@@ -240,11 +252,15 @@ 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>(testedLayout, "width")));\r
-            controls.addComponent(new Button("%", new MethodProperty<Boolean>(this, "widthPercents")));\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 Label("height"));\r
-            controls.addComponent(new TextField(new MethodProperty<Float>(testedLayout, "height")));\r
-            controls.addComponent(new Button("%", new MethodProperty<Boolean>(this, "heightPercents")));\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(marginLeft);\r
             controls.addComponent(marginRight);\r
             controls.addComponent(marginTop);\r
@@ -271,7 +287,8 @@ 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.hasNext();) {\r
+            for (Iterator<Component> i = controls.getComponentIterator(); i\r
+                    .hasNext();) {\r
                 ((AbstractComponent) i.next()).setImmediate(true);\r
             }\r
         }\r
@@ -293,22 +310,33 @@ 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(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.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.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_BOTTOM));\r
-            vAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_BOTTOM), "bottom");\r
+            vAlign.setItemCaption(new Integer(\r
+                    Layout.AlignmentHandler.ALIGNMENT_BOTTOM), "bottom");\r
 \r
             hAlign.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_LEFT));\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.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.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT));\r
-            hAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
+            hAlign.setItemCaption(new Integer(\r
+                    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(), ((Integer) vAlign.getValue()).intValue());\r
+                    updateAlignments(((Integer) hAlign.getValue()).intValue(),\r
+                            ((Integer) vAlign.getValue()).intValue());\r
                 }\r
 \r
             };\r
@@ -323,30 +351,45 @@ 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(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.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.addItem(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT));\r
-            lAlign.setItemCaption(new Integer(Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
+            lAlign.setItemCaption(new Integer(\r
+                    Layout.AlignmentHandler.ALIGNMENT_RIGHT), "right");\r
 \r
             lAlign.addListener(new Property.ValueChangeListener() {\r
                 public void valueChange(ValueChangeEvent event) {\r
-                    testPanelLayout.setComponentAlignment(testedLayout, ((Integer) lAlign.getValue()).intValue(), VerticalLayout.ALIGNMENT_TOP);\r
+                    testPanelLayout.setComponentAlignment(testedLayout,\r
+                            ((Integer) lAlign.getValue()).intValue(),\r
+                            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.hasNext();) {\r
-                ((Layout.AlignmentHandler) testedLayout).setComponentAlignment(i.next(), h, v);\r
+            for (Iterator<Component> i = testedLayout.getComponentIterator(); i\r
+                    .hasNext();) {\r
+                ((Layout.AlignmentHandler) testedLayout).setComponentAlignment(\r
+                        i.next(), h, v);\r
             }\r
         }\r
 \r
         private void updateMarginsAndSpacing() {\r
-            testedLayout.setMargin(((Boolean) marginTop.getValue()).booleanValue(), ((Boolean) marginRight.getValue()).booleanValue(), ((Boolean) marginBottom.getValue()).booleanValue(), ((Boolean) marginLeft.getValue()).booleanValue());\r
+            testedLayout.setMargin(\r
+                    ((Boolean) marginTop.getValue()).booleanValue(),\r
+                    ((Boolean) marginRight.getValue()).booleanValue(),\r
+                    ((Boolean) marginBottom.getValue()).booleanValue(),\r
+                    ((Boolean) marginLeft.getValue()).booleanValue());\r
             if (testedLayout instanceof Layout.SpacingHandler) {\r
-                ((Layout.SpacingHandler) testedLayout).setSpacing(((Boolean) spacing.getValue()).booleanValue());\r
+                ((Layout.SpacingHandler) testedLayout)\r
+                        .setSpacing(((Boolean) spacing.getValue())\r
+                                .booleanValue());\r
             }\r
         }\r
 \r
index f90ccc48b23caeaa19d8572aaba284e159454870..5f8563599ab304ebb70a3f1d4bd06ecd38fd4ab0 100644 (file)
@@ -28,7 +28,8 @@ 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);
 
         VerticalLayout el = new VerticalLayout();
@@ -37,7 +38,10 @@ public class Ticket1737 extends Application {
         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 f2c2ab0680f1497a5599193847d6bb073a9c056a..a65a601175dad8584ac5e1cc39500f6e00631497 100644 (file)
@@ -8,7 +8,8 @@ public class Ticket1767 extends com.vaadin.Application {
     @Override\r
     public void init() {\r
 \r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         ComboBox cb = new ComboBox(" '<' item is not seen in populist?");\r
index e8c1ea8b1f0ba98c49278757a6e3568e88a395be..68e00e7f94d3e62dd3bede3c41c16bae23a4ef60 100644 (file)
@@ -11,7 +11,8 @@ public class Ticket1772 extends com.vaadin.Application {
     @Override\r
     public void init() {\r
 \r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         Button b = new Button("Add content");\r
@@ -25,7 +26,8 @@ public class Ticket1772 extends com.vaadin.Application {
 \r
             public void buttonClick(ClickEvent event) {\r
 \r
-                gridLayout.addComponent(new TextField("Content " + (++counter)));\r
+                gridLayout\r
+                        .addComponent(new TextField("Content " + (++counter)));\r
 \r
             }\r
         });\r
index 9c4a32eb52ec9dc250bdd5aff85ccf5783ace377..8d8740895de4542b956852f5e7570eb5c5f2e0bf 100644 (file)
@@ -39,7 +39,8 @@ 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("Selection required for test-field"));\r
+        s.addValidator(new EmptyStringValidator(\r
+                "Selection required for test-field"));\r
         s.setRequired(true);\r
         listOfAllFields.add(s);\r
 \r
@@ -49,18 +50,22 @@ public class Ticket1804 extends com.vaadin.Application {
         s.setRequired(true);\r
         listOfAllFields.add(s);\r
 \r
-        s = new Select("Testcase from the ticket #1804, but with required=false");\r
+        s = new Select(\r
+                "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("Selection required for test-field"));\r
+        s.addValidator(new EmptyStringValidator(\r
+                "Selection required for test-field"));\r
         listOfAllFields.add(s);\r
 \r
-        s = new Select("Testcase from the ticket #1804, but without validator and with required=false");\r
+        s = new Select(\r
+                "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("Required=true, custom error message, null selection not allowed");\r
+        s = new Select(\r
+                "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
@@ -87,14 +92,16 @@ 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.hasNext();) {\r
+                for (Iterator<Select> i = listOfAllFields.iterator(); i\r
+                        .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() + "</i><hr/>");\r
+                        msg.append("INVALID<br/><i>" + af.getErrorMessage()\r
+                                + "</i><hr/>");\r
                     }\r
                 }\r
                 Window w = new Window("Status of the fields");\r
index d10106f49902c50e08812c25e285a10eefea387d..ad7a61d81f902efe533135800b189c17b6ec13fe 100644 (file)
@@ -14,11 +14,16 @@ public class Ticket1805 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
         ((Layout) main.getContent()).setMargin(false);\r
 \r
-        Label description = new Label("GridLayout with 100% (no height), is wanted to " + "share all available width with columns " + "relatively to their natural width. And it " + "should still work with margins and spacings");\r
+        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
         main.addComponent(description);\r
 \r
         final GridLayout grid = new GridLayout(4, 1);\r
index b592cdc4ef04afc62d1411fe77595a162d5efd83..f3406a915593397313096729aee48199b4d07b7d 100644 (file)
@@ -10,30 +10,36 @@ public class Ticket1806 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         final ObjectProperty<String> prop = new ObjectProperty<String>("");\r
-        final TextField tf1 = new TextField("Buffered TextField bound to ObjectProperty");\r
+        final TextField tf1 = new TextField(\r
+                "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("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
+        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
     }\r
 }
\ No newline at end of file
index e8e08188dffe2d555d639532e959abdeeedd0025..8f373de6bfa77cb5ed58db18160dd3631ffd8644 100644 (file)
@@ -21,21 +21,26 @@ public class Ticket1811 extends com.vaadin.Application {
         final Window main = new Window("#1811");\r
         setMainWindow(main);\r
 \r
-        Validator strLenValidator = new StringLengthValidator("String must be at least 3 chars long and non-null", 3, -1, false);\r
+        Validator strLenValidator = new StringLengthValidator(\r
+                "String must be at least 3 chars long and non-null", 3, -1,\r
+                false);\r
 \r
-        TextField tf1 = new TextField("Text field with default settings (required=false)");\r
+        TextField tf1 = new TextField(\r
+                "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("Text field with required=true and strlen >= 3");\r
+        TextField tf3 = new TextField(\r
+                "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("Text field with required=false (default) and strlen >= 3");\r
+        TextField tf4 = new TextField(\r
+                "Text field with required=false (default) and strlen >= 3");\r
         tf4.addValidator(strLenValidator);\r
         listOfAllFields.add(tf4);\r
 \r
@@ -51,13 +56,15 @@ public class Ticket1811 extends com.vaadin.Application {
 \r
             public void buttonClick(ClickEvent event) {\r
                 StringBuffer msg = new StringBuffer();\r
-                for (Iterator<TextField> i = listOfAllFields.iterator(); i.hasNext();) {\r
+                for (Iterator<TextField> i = listOfAllFields.iterator(); i\r
+                        .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() + "</i><hr/>");\r
+                        msg.append("INVALID<br/><i>" + tf.getErrorMessage()\r
+                                + "</i><hr/>");\r
                     }\r
                 }\r
                 Window w = new Window("Status of the fields");\r
index 797e6c62281a786bacc191bb750c32219f44cf9c..6f06055fc4dd134451cb196bb9f657737e733a78 100644 (file)
@@ -47,7 +47,8 @@ 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.hasNext();) {\r
+                for (Iterator<Select> i = listOfAllFields.iterator(); i\r
+                        .hasNext();) {\r
                     AbstractField af = i.next();\r
                     msg.append("<h1>" + af.getCaption() + "</h1>\n");\r
                     msg.append("Value=" + af.getValue() + "<br/>\n");\r
index ee389d7a334ca8540a004b850196459fe4be55ac..7c9104e75091d23fc5a9968504a5cb9df508d43d 100644 (file)
@@ -18,7 +18,8 @@ public class Ticket1834PanelScrolling extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         HorizontalLayout currentState = new HorizontalLayout();\r
@@ -28,7 +29,8 @@ public class Ticket1834PanelScrolling extends com.vaadin.Application {
         currentState.addComponent(b);\r
         b.addListener(new ClickListener() {\r
             public void buttonClick(ClickEvent event) {\r
-                state.setValue("ScrollTop: " + p.getScrollTop() + " ScrollLeft: " + p.getScrollLeft());\r
+                state.setValue("ScrollTop: " + p.getScrollTop()\r
+                        + " ScrollLeft: " + p.getScrollLeft());\r
             }\r
         });\r
         main.addComponent(currentState);\r
@@ -38,7 +40,8 @@ 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() + " ScrollLeft: " + p.getScrollLeft());\r
+                state.setValue("ScrollTop: " + p.getScrollTop()\r
+                        + " ScrollLeft: " + p.getScrollLeft());\r
             }\r
         });\r
 \r
@@ -68,7 +71,10 @@ public class Ticket1834PanelScrolling extends com.vaadin.Application {
         p.setScrollable(true);\r
 \r
         for (int i = 0; i < ROWS; i++) {\r
-            p.addComponent(new Label("Label" + i + "................................................................................................................."));\r
+            p.addComponent(new Label(\r
+                    "Label"\r
+                            + i\r
+                            + "................................................................................................................."));\r
         }\r
 \r
         p.setHeight("300px");\r
index 81555d0e7e9b6de3a7312312713a28a947efff92..1fda97919808d2ff114602b716b0bc61526a193b 100644 (file)
@@ -26,7 +26,7 @@ public class Ticket1857 extends Application implements Handler {
 
         final Table t = new Table();
         el.addComponent(t);
-        el.setExpandRatio(t,1);
+        el.setExpandRatio(t, 1);
         t.setSizeFull();
         addContentsToTable(t);
         t.setStyleName("foo");
@@ -56,12 +56,14 @@ 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 {
@@ -79,11 +81,17 @@ 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 481f93f2ea4366a98703d3ec3684cbf0415a0122..3b68146df34ec8482cea28e087a047f5d73eb5e3 100644 (file)
@@ -10,7 +10,8 @@ public class Ticket1868 extends com.vaadin.Application {
 \r
         setMainWindow(new Window("#1868"));\r
 \r
-        Panel p = new Panel("This is a really long caption for the panel, too long in fact!");\r
+        Panel p = new Panel(\r
+                "This is a really long caption for the panel, too long in fact!");\r
         p.setWidth(300);\r
         p.setHeight(300);\r
 \r
index f21a843f55de80e9edc1ac3a1cf85984259e727f..22afdcbc2d274fb04154598186a92d741f599c8f 100644 (file)
@@ -18,14 +18,15 @@ public class Ticket1869 extends com.vaadin.Application {
         lo.setSpacing(true);\r
 \r
         VerticalLayout el = new VerticalLayout();\r
-        Panel elp = new Panel("Vertical ExpandLayout /w first component expanded", el);\r
+        Panel elp = new Panel(\r
+                "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.setExpandRatio(b,1);\r
+                el.setExpandRatio(b, 1);\r
             }\r
         }\r
         lo.addComponent(elp);\r
@@ -34,14 +35,15 @@ public class Ticket1869 extends com.vaadin.Application {
         elp.setScrollable(true);\r
 \r
         HorizontalLayout elh = new HorizontalLayout();\r
-        Panel elph = new Panel("Horizontal ExpandLayout /w first component expanded", elh);\r
+        Panel elph = new Panel(\r
+                "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.setExpandRatio(b,1);\r
+                elh.setExpandRatio(b, 1);\r
             }\r
         }\r
         lo.addComponent(elph);\r
index 2e71aa541761ab2092b2cc8d6fdbd1790d56b735..0bb631aab573ac809f9808adaebd1c9179fff6bd 100644 (file)
@@ -49,20 +49,22 @@ public class Ticket1878 extends Application {
         gridLayout = createGL();\r
         formLayout = createForms();\r
 \r
-        switchToGridButton = new Button("Switch to GridLayout", new ClickListener() {\r
+        switchToGridButton = new Button("Switch to GridLayout",\r
+                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", new ClickListener() {\r
+                });\r
+        switchToOrderedButton = new Button("Switch to OrderedLayout",\r
+                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
@@ -87,15 +89,20 @@ public class Ticket1878 extends Application {
         GridLayout layout = new GridLayout(1, 5);\r
 \r
         GridLayout l1 = new GridLayout(1, 3);\r
-        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "100%", null, true);\r
-        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "50px", null, false);\r
+        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "100%",\r
+                null, true);\r
+        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "50px",\r
+                null, false);\r
         GridLayout l2 = new GridLayout(6, 1);\r
         createLayout(l2, new VerticalLayout(), "200px", "500px", true);\r
-        createLayout(l2, new VerticalLayout(), "200px", "500px", "100%", null, true);\r
+        createLayout(l2, new VerticalLayout(), "200px", "500px", "100%", null,\r
+                true);\r
         createLayout(l2, new VerticalLayout(), "150px", "500px", true);\r
-        createLayout(l2, new VerticalLayout(), "150px", "500px", "100%", null, true);\r
+        createLayout(l2, new VerticalLayout(), "150px", "500px", "100%", null,\r
+                true);\r
         createLayout(l2, new VerticalLayout(), "100px", "500px", true);\r
-        createLayout(l2, new VerticalLayout(), "100px", "500px", "100%", null, true);\r
+        createLayout(l2, new VerticalLayout(), "100px", "500px", "100%", null,\r
+                true);\r
         layout.addComponent(l1);\r
         layout.addComponent(l2);\r
 \r
@@ -106,15 +113,20 @@ 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, true);\r
-        createLayout(l1, new GridLayout(8, 1), "1000px", "150px", "50px", null, false);\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
         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, true);\r
+        createLayout(l2, new GridLayout(1, 8), "200px", "500px", "100%", null,\r
+                true);\r
         createLayout(l2, new GridLayout(1, 8), "150px", "500px", true);\r
-        createLayout(l2, new GridLayout(1, 8), "150px", "500px", "100%", null, true);\r
+        createLayout(l2, new GridLayout(1, 8), "150px", "500px", "100%", null,\r
+                true);\r
         createLayout(l2, new GridLayout(1, 8), "100px", "500px", true);\r
-        createLayout(l2, new GridLayout(1, 8), "100px", "500px", "100%", null, true);\r
+        createLayout(l2, new GridLayout(1, 8), "100px", "500px", "100%", null,\r
+                true);\r
         layout.addComponent(l1);\r
         layout.addComponent(l2);\r
 \r
@@ -238,11 +250,14 @@ public class Ticket1878 extends Application {
         mainLayout.replaceComponent(l, newLayout);\r
     }\r
 \r
-    private static void createLayout(GridLayout parentLayout, Layout newLayout, String w, String h, boolean align) {\r
+    private static void createLayout(GridLayout parentLayout, Layout newLayout,\r
+            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, String w, String h, String componentWidth, String componentHeight, boolean align) {\r
+    private static void createLayout(GridLayout parentLayout, Layout newLayout,\r
+            String w, String h, String componentWidth, String componentHeight,\r
+            boolean align) {\r
         String dirText = "V";\r
         String type;\r
         if (newLayout instanceof VerticalLayout) {\r
@@ -258,7 +273,8 @@ public class Ticket1878 extends Application {
         }\r
         String alignText = align ? "-A" : "";\r
         String cWidth = componentWidth == null ? "" : " - " + componentWidth;\r
-        Panel p = new Panel(type + "/" + dirText + alignText + " " + w + "x" + h + cWidth, newLayout);\r
+        Panel p = new Panel(type + "/" + dirText + alignText + " " + w + "x"\r
+                + h + cWidth, newLayout);\r
 \r
         p.setWidth(w);\r
         p.setHeight(h);\r
@@ -266,13 +282,15 @@ public class Ticket1878 extends Application {
         newLayout.setSizeFull();\r
 \r
         String captions[] = new String[] { "TextField with caption", null };\r
-        Resource icons[] = new Resource[] { new ThemeResource("icons/16/document-delete.png"), null };\r
+        Resource icons[] = new Resource[] {\r
+                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], icons[icon], required[req]);\r
+                    TextField tf = createTextFieldWithError(captions[caption],\r
+                            icons[icon], required[req]);\r
 \r
                     fields[caption][icon] = tf;\r
                     if (componentWidth != null) {\r
@@ -288,7 +306,8 @@ public class Ticket1878 extends Application {
                     p.addComponent(tf);\r
 \r
                     if (align) {\r
-                        ((AlignmentHandler) newLayout).setComponentAlignment(tf, Alignment.BOTTOM_RIGHT);\r
+                        ((AlignmentHandler) newLayout).setComponentAlignment(\r
+                                tf, Alignment.BOTTOM_RIGHT);\r
                     }\r
                 }\r
             }\r
@@ -353,7 +372,8 @@ public class Ticket1878 extends Application {
     //\r
     // }\r
 \r
-    private static TextField createTextFieldWithError(String caption, Resource icon, boolean required) {\r
+    private static TextField createTextFieldWithError(String caption,\r
+            Resource icon, boolean required) {\r
         TextField tf = new TextField();\r
         tf.setCaption(caption);\r
         tf.setIcon(icon);\r
index 1500d324c932fba903f064183327db35c7ea3c1c..2047b4698c4b4c63e4ab7def7a74a74fe13b18fe 100644 (file)
@@ -25,7 +25,8 @@ 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"));
@@ -41,10 +42,12 @@ 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 0733d0c9f00439719efe28488215daae5f0d21bb..1e578cd8f51f4e1d9f42d62d30c8107a0b9e3afe 100644 (file)
@@ -13,7 +13,8 @@ public class Ticket1919 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.setTheme("tests-tickets");\r
index 4286a796c4b63b0f942be4cbeac0bbdc558211a6..71c45c34cecd8ba7c4248f4c558360886620e689 100644 (file)
@@ -96,7 +96,8 @@ 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 c819d4c6b5b116d0d8968b7b9ef9a7afebbbac57..9fc0ecc586797402ea0eeb204e0421cfc119be3b 100644 (file)
@@ -13,7 +13,8 @@ public class Ticket1923 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         p = new Panel("TestPanel 250x300");\r
@@ -21,7 +22,10 @@ public class Ticket1923 extends com.vaadin.Application {
         p.setScrollable(true);\r
         // p.setContent(new GridLayout(1, 100));\r
         for (int i = 0; i < ROWS; i++) {\r
-            p.addComponent(new Label("Label" + i + " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));\r
+            p.addComponent(new Label(\r
+                    "Label"\r
+                            + i\r
+                            + " 5067w09adsfasdjfahlsdfjhalfjhaldjfhalsjdfhlajdhflajhdfljahdslfjahldsjfhaljdfhaljfdhlajsdhflajshdflkajhsdlfkjahsldfkjahsldfhalskjfdhlksjfdh857idifhaljsdfhlajsdhflajhdflajhdfljahldfjhaljdfhalsjdfhalkjdhflkajhdfljahsdlfjahlsdjfhaldjfhaljfdhlajdhflajshdfljahsdlfjhalsjdfhalskjhfdlhusfglksuhdflgjshflgjhslfghslfjghsljfglsjhfglsjhfgljshfgljshflgjhslfghsljfgsljdfglsdjhfglsjhflgkjshfldjgh"));\r
         }\r
         // main.getLayout().setSizeFull();\r
 \r
@@ -46,7 +50,8 @@ public class Ticket1923 extends com.vaadin.Application {
         // p.getLayout().setSizeFull();\r
         p.setWidth("50px");\r
         p.setHeight("100px");\r
-        p.addComponent(new Label("aasdfaasdfja dslkfj lakfdj lakjdf lkaj dflkaj ldfkj alsdfj laksdj flkajs dflkj sdfsadfasdfasd"));\r
+        p.addComponent(new Label(\r
+                "aasdfaasdfja dslkfj lakfdj lakjdf lkaj dflkaj ldfkj alsdfj laksdj flkajs dflkj sdfsadfasdfasd"));\r
         ol.addComponent(p);\r
 \r
         main.addComponent(ol);\r
index db666299d11d5d03c6aa33c317f2b0c35189d4a7..981fd9cd5cfc8d930e7fcdf1624ca8388e1fb5f5 100644 (file)
@@ -16,7 +16,8 @@ public class Ticket1924ThemeChanging extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         l.setStyleName("red");\r
index 945c599ccad094ef6cf73693cde3e2fd789c89c7..7cc2cf8abf7a03f4fba2d6410212a7a42f7f86f7 100644 (file)
@@ -24,11 +24,12 @@ 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 aea444848743b87dd71a32be57c2da2e64de8ded..43e7f10220187a7c7a1c5dcf9eeb4582ddf9640e 100644 (file)
@@ -16,7 +16,8 @@ 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 5cc83b10334ebfbab55ce18e6a1fca6de36a118c..49128760332d15a82fdba491a85084dd529d39f9 100644 (file)
@@ -99,7 +99,9 @@ public class Ticket1966 extends Application {
     }\r
 \r
     private Button getButton(Layout l, Alignment align) {\r
-        Button b = new Button("Narrow Button - " + align.getHorizontalAlignment() + " - " + align.getVerticalAlignment());\r
+        Button b = new Button("Narrow Button - "\r
+                + align.getHorizontalAlignment() + " - "\r
+                + align.getVerticalAlignment());\r
         b.setWidth("100px");\r
         ((AlignmentHandler) l).setComponentAlignment(b, align);\r
 \r
index ae0b99ba6bd7d72ed35799fdf1e5182895f7ff58..5b2b7a9dd1f57e51bb408e1d3a39e398c786698b 100644 (file)
@@ -157,7 +157,8 @@ public class Ticket1966_2 extends Application {
     }\r
 \r
     private Button getButton(Layout l, Alignment align) {\r
-        Button b = new Button(align.getHorizontalAlignment() + " - " + align.getVerticalAlignment());\r
+        Button b = new Button(align.getHorizontalAlignment() + " - "\r
+                + align.getVerticalAlignment());\r
         // b.setWidth("100");\r
         ((AlignmentHandler) l).setComponentAlignment(b, align);\r
 \r
index 85eba7c8dbb930ff02c1d53cc6cd817f0af619a3..26c1c694709a9102aa5260b3c02189d82addf368 100644 (file)
@@ -14,7 +14,8 @@ public class Ticket1969 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         main.getContent().setSizeFull();\r
@@ -22,11 +23,13 @@ public class Ticket1969 extends com.vaadin.Application {
         TabSheet ts = new TabSheet();\r
         ts.setSizeFull();\r
 \r
-        final Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(7, 2000);\r
+        final Table t = TestForTablesInitialColumnWidthLogicRendering\r
+                .getTestTable(7, 2000);\r
         t.setSizeFull();\r
         ts.addTab(t, "Table, scrollins should not flash", null);\r
 \r
-        final Label testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        final Label testContent = new Label(\r
+                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
@@ -40,18 +43,21 @@ public class Ticket1969 extends com.vaadin.Application {
 \r
         Button b;\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
+        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
         actions.addComponent(b);\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
+        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
 \r
         actions.addComponent(b);\r
 \r
index 771e573369550698b9018fc74c2baceb6fc043a9..1442c9ea5b6beb6cb9d612cd66ed7efa568eb56f 100644 (file)
@@ -33,18 +33,22 @@ 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);
@@ -56,13 +60,19 @@ 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 3391aa1f3008c9ab488b478ba4e84d2d46d815ca..d162606ba739221e22e5f886827efd517b1eda23 100644 (file)
@@ -35,17 +35,20 @@ public class Ticket1975 extends Application {
             layout.addComponent(cl1);\r
             WebApplicationContext wc = ((WebApplicationContext) getContext());\r
 \r
-            layout.addComponent(new Button("Disable/Enable", new ClickListener() {\r
+            layout.addComponent(new Button("Disable/Enable",\r
+                    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() + "/VAADIN/themes/" + getTheme() + "/layouts/Ticket1975.html");\r
+                    }));\r
+            File f = new File(wc.getBaseDirectory().getAbsoluteFile()\r
+                    + "/VAADIN/themes/" + getTheme()\r
+                    + "/layouts/Ticket1975.html");\r
 \r
             cl2 = new CustomLayout(new FileInputStream(f));\r
             layout.addComponent(cl2);\r
index 8d066c0938686ee866edf7487e1b8f50d5cbca92..53e5630353dda5e86cc0938fd3ade4be17216082 100644 (file)
@@ -66,7 +66,8 @@ 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 6ffd6ddb9f50e5505ce7cbfed452237f55c71d1c..9acd8d133187dc1156e657417d490d4eedc89040 100644 (file)
@@ -52,13 +52,27 @@ 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();
@@ -73,12 +87,22 @@ 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
index b4748fff8a52186241147e0c279c01fa593dade1..430c54ec92dd0f80026d4f4419defb68f5727842 100644 (file)
@@ -8,7 +8,8 @@ public class Ticket1991 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         Table t = new Table("Test table");\r
index 6f67cfc2916f7e9a2e7ff6060c5a7c6df71e1dee..93f16ca52774342a090c91cfc2746ca4b9831c54 100644 (file)
@@ -28,22 +28,25 @@ public class Ticket1995 extends Application {
         item = table.addItem("2");\r
         item.getItemProperty(PROPERTY_1).setValue("Row 2");\r
 \r
-        Filterable filterable = (Container.Filterable) table.getContainerDataSource();\r
+        Filterable filterable = (Container.Filterable) table\r
+                .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", new com.vaadin.ui.Button.ClickListener() {\r
+        mainWin.addComponent(new Button("Add item",\r
+                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.getContainerDataSource();\r
+        Filterable filterable = (Container.Filterable) table\r
+                .getContainerDataSource();\r
 \r
         Item i = table.addItem("abc");\r
         String res = "";\r
index 6c1531b823d4056165972664ff08c82aaa8867c2..51f1a938b998509cb6b32d38f766306f153fb71b 100644 (file)
@@ -53,11 +53,13 @@ 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() {
 
@@ -73,18 +75,24 @@ 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 b5db161b8b66c28efd6b5cb769d4fa3e64d02de9..4e07230f468675970b8d202a2792dbf34649d650 100644 (file)
@@ -34,10 +34,12 @@ 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", new MethodProperty<Long>(this, "long1"));\r
+        TextField f1 = new TextField("Non-immediate/Long text field",\r
+                new MethodProperty<Long>(this, "long1"));\r
         f1.setImmediate(false);\r
         f1.setNullSettingAllowed(true);\r
-        TextField f2 = new TextField("Immediate/Long text field", new MethodProperty<Long>(this, "long2"));\r
+        TextField f2 = new TextField("Immediate/Long text field",\r
+                new MethodProperty<Long>(this, "long2"));\r
         f2.setImmediate(true);\r
         f2.setNullSettingAllowed(true);\r
 \r
index 62f304705bc51c6eeb97d2aa9bd83071dd0343c7..84dafb41f36d43866b8f87d2b8021b2aa3105c2b 100644 (file)
@@ -15,12 +15,14 @@ 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 7e5cea3c43d5eabf801a6b80baf9fff97d65663b..f1d55bbb13be891e1ab77fb151fbe74552b81e6e 100644 (file)
@@ -20,7 +20,8 @@ public class Ticket2009 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         HorizontalLayout ol = new HorizontalLayout();\r
@@ -39,7 +40,11 @@ public class Ticket2009 extends com.vaadin.Application {
 \r
         t.addListener(new ItemClickEvent.ItemClickListener() {\r
             public void itemClick(ItemClickEvent event) {\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
+                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
 \r
             }\r
         });\r
@@ -52,11 +57,16 @@ public class Ticket2009 extends com.vaadin.Application {
         p2.setSizeFull();\r
 \r
         final VerticalLayout events2 = new VerticalLayout();\r
-        Table table = TestForTablesInitialColumnWidthLogicRendering.getTestTable(5, 100);\r
+        Table table = TestForTablesInitialColumnWidthLogicRendering\r
+                .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:" + (event.isDoubleClick() ? "double" : "single") + " button:" + event.getButton() + " propertyId:" + event.getPropertyId() + " itemID:" + event.getItemId() + " item:" + event.getItem()));\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
                 if (event.isDoubleClick()) {\r
                     new PropertyEditor(event);\r
                 }\r
@@ -90,7 +100,8 @@ public class Ticket2009 extends com.vaadin.Application {
 \r
             setCaption("Editing " + itemid + " : " + propertyid);\r
 \r
-            editor.setPropertyDataSource(c.getContainerProperty(itemid, propertyid));\r
+            editor.setPropertyDataSource(c.getContainerProperty(itemid,\r
+                    propertyid));\r
             addComponent(editor);\r
             addComponent(done);\r
 \r
index 703870a6dcbc02ee377a9dfeb9c63f5e1ac3866d..b005eefd03ea6657bf795fb44adde1a908d50ffc 100644 (file)
@@ -30,13 +30,14 @@ public class Ticket2014 extends Application {
     private void createUI(GridLayout layout) {\r
         createPanel(layout);\r
 \r
-        layout.addComponent(new Button("Change class name", new ClickListener() {\r
+        layout.addComponent(new Button("Change class name",\r
+                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
index dd3912e2d09fd6fd1490c27b633b6b6cb86af33d..9a12387464595580da1b4eb077fd2be47b2124f9 100644 (file)
@@ -18,7 +18,11 @@ public class Ticket2021 extends Application {
 \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" + "" + "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
+    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
 \r
     private AbstractOrderedLayout orderedLayout;\r
 \r
@@ -106,22 +110,24 @@ public class Ticket2021 extends Application {
     @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", 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
+        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
                     }\r
-                }\r
-            }\r
 \r
-        });\r
+                });\r
         b.setData(layout);\r
         Label l2 = new Label("This should always be visible");\r
 \r
index 1f4f0ffba57afe0812b69e44aac796bf6453de2d..ac80ef602bd887f7f8593913a1b385846185db39 100644 (file)
@@ -6,7 +6,8 @@ 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();
 
@@ -16,7 +17,8 @@ public class Ticket2023 extends com.vaadin.Application implements Button.ClickLi
         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 d6a75bf03c03edd23a613ea53c3430ba225dc57d..5f0b432790c9962b269fe44f3a5dd48f6547bc96 100644 (file)
@@ -21,7 +21,8 @@ public class Ticket2024 extends Application {
         w.getContent().setHeight("2000");\r
         w.getContent().addComponent(layout);\r
 \r
-        layout.addComponent(new Label("This should NOT get stuck when scrolling down"));\r
+        layout.addComponent(new Label(\r
+                "This should NOT get stuck when scrolling down"));\r
         layout.addComponent(new TextField("This should not get stuck either..."));\r
 \r
         VerticalLayout ol = new VerticalLayout();\r
index f191274cb726a3338a683d2e5d24967fa114ff33..652983c423e909022b42fc53e4d13f6296da32d7 100644 (file)
@@ -14,7 +14,8 @@ public class Ticket2037 extends com.vaadin.Application {
         Window main = new Window();\r
         setMainWindow(main);\r
 \r
-        main.addComponent(new Label("Use debug dialog and trac number of registered paintables. It should not grow on subsequant b clicks."));\r
+        main.addComponent(new Label(\r
+                "Use debug dialog and trac number of registered paintables. It should not grow on subsequant b clicks."));\r
 \r
         final Layout lo = new VerticalLayout();\r
 \r
index 98f9a5a01fbe30f5604985bbef1b0ffee4c52af2..ff5ceb22e7c00e5a03244b88ed1073a6ea996214 100644 (file)
@@ -15,23 +15,29 @@ 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 6203c198d5ab45c527e62ca962b7501ff8ed3bb9..0f9d6a0d8ca42f7c135d1fe5609e8ecee24f066b 100644 (file)
@@ -32,7 +32,8 @@ public class Ticket2040 extends com.vaadin.Application {
         l.setSizeFull();\r
         ts.addTab(l, "100% h component", null);\r
 \r
-        Label testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        Label testContent = new Label(\r
+                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
@@ -51,7 +52,8 @@ public class Ticket2040 extends com.vaadin.Application {
         l.setSizeFull();\r
         ts.addTab(l, "200px h component", null);\r
 \r
-        testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        testContent = new Label(\r
+                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
@@ -70,7 +72,8 @@ public class Ticket2040 extends com.vaadin.Application {
         l.setSizeFull();\r
         ts.addTab(l, "50% h component", null);\r
 \r
-        testContent = new Label("TabSheet by default uses caption, icon, errors etc. from Components. ");\r
+        testContent = new Label(\r
+                "TabSheet by default uses caption, icon, errors etc. from Components. ");\r
 \r
         testContent.setCaption("Introduction to test");\r
 \r
index c502803c652ee8f5b36c7bedda9660f91d876b09..faea096744da4838621682170699ac99f2388a34 100644 (file)
@@ -19,7 +19,9 @@ 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)", new ExternalResource("http://www.vaadin.com"), "_blank", 200, 200, Link.TARGET_BORDER_NONE);\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
 \r
         layout.addComponent(l);\r
     }\r
index 6bc928ba40c84d19a99e11d28f1eab03a2d5c272..54546403cd7f3cdf1a8e7165da8464e208b3fd5b 100644 (file)
@@ -67,25 +67,31 @@ public class Ticket2048 extends Application {
         l.setHeight("400px");\r
         p.addComponent(l);\r
 \r
-        embedded = new Embedded(null, new ThemeResource("icons/64/folder-add.png"));\r
+        embedded = new Embedded(null, new ThemeResource(\r
+                "icons/64/folder-add.png"));\r
         layout.addComponent(embedded);\r
-        Button b = new Button("Replace image with new embedded component (flashes)", new ClickListener() {\r
+        Button b = new Button(\r
+                "Replace image with new embedded component (flashes)",\r
+                new ClickListener() {\r
 \r
-            public void buttonClick(ClickEvent event) {\r
-                Embedded newEmbedded = new Embedded(null, new ThemeResource("icons/64/folder-add.png"));\r
-                getMainWindow().getContent().replaceComponent(embedded, newEmbedded);\r
-                embedded = newEmbedded;\r
+                    public void buttonClick(ClickEvent event) {\r
+                        Embedded newEmbedded = new Embedded(null,\r
+                                new ThemeResource("icons/64/folder-add.png"));\r
+                        getMainWindow().getContent().replaceComponent(embedded,\r
+                                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().contains("folder-add")) {\r
+                if (((ThemeResource) embedded.getSource()).getResourceId()\r
+                        .contains("folder-add")) {\r
                     img = "folder-delete";\r
                 }\r
                 embedded.setSource(new ThemeResource("icons/64/" + img + ".png"));\r
index 1c06962c63694900c57f1af5390e814fe0381234..f784b40aedccfb3cb412890f50bade2afc19353e 100644 (file)
@@ -22,7 +22,9 @@ 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);
@@ -39,26 +41,33 @@ 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 0594eace029ececeeaf5ce2e846e8f5e34711b58..c9cc3ce328c51a79662dbfa0dfbe0681445a20b4 100644 (file)
@@ -33,7 +33,8 @@ 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 });
 
@@ -71,7 +72,8 @@ 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 bd523c0a7cd65acbcd43d0ec251a9b4072458fec..f81464dc9bfafcb041f9ecce2287bc0177062bae 100644 (file)
@@ -20,7 +20,8 @@ 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;
@@ -29,7 +30,8 @@ public class Ticket2061b extends Application implements SelectedTabChangeListene
     public void init() {
         mainWindow = new Window("Ticket 2061b");
         mainWindow.setSizeFull();
-        AbstractOrderedLayout mainLayout = (AbstractOrderedLayout) mainWindow.getContent();
+        AbstractOrderedLayout mainLayout = (AbstractOrderedLayout) mainWindow
+                .getContent();
         mainLayout.setSizeFull();
         mainLayout.setMargin(false);
         setMainWindow(mainWindow);
@@ -122,7 +124,8 @@ public class Ticket2061b extends Application implements SelectedTabChangeListene
                 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 0fae77855283bc2dec9e48a7394921eac562b1c4..4cca9792684e8e07a62449e146999bd54198e444 100644 (file)
@@ -17,7 +17,8 @@ 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;
@@ -87,7 +88,8 @@ public class Ticket2061c extends Application implements SelectedTabChangeListene
                 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 aaef03595fa03abb720d3ebd255b4f38fba4f75b..e722c6826cb5aaa98325d8fa1daf366951ef4728 100644 (file)
@@ -19,7 +19,8 @@ public class Ticket2083 extends Application {
     }\r
 \r
     private void createUI(GridLayout layout) {\r
-        Panel p = new Panel("This is a panel with a longer caption than it should have");\r
+        Panel p = new Panel(\r
+                "This is a panel with a longer caption than it should have");\r
         p.setWidth("100px");\r
         p.getContent().addComponent(new Label("Contents"));\r
         layout.addComponent(p);\r
index 1adde824bbafdf30a38bb9d62f6e78b54f67550e..5bc69e0a64c1778677432883dcdf4fc515c9706f 100644 (file)
@@ -53,7 +53,10 @@ 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 5d0d12d0386166e374ad1b42cb022d84007e0140..8c12ca10ceed363b12835d7e0a6bf3601c6d89f0 100644 (file)
@@ -11,7 +11,8 @@ public class Ticket2101 extends Application {
         Window w = new Window(getClass().getSimpleName());\r
         setMainWindow(w);\r
 \r
-        Button b = new Button("Button with a long text which will not fit on 50 pixels");\r
+        Button b = new Button(\r
+                "Button with a long text which will not fit on 50 pixels");\r
         b.setWidth("50px");\r
 \r
         w.getContent().addComponent(b);\r
index 599b5e9769493a4c14c14244ec1b20ddbaeb1665..d65f4c1aec68a743e6637ee9099e800acd489689 100644 (file)
@@ -24,7 +24,8 @@ public class Ticket2103 extends Application {
         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);
@@ -71,7 +72,8 @@ 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 018ba80985dabd969e4513392315576e547419d8..5df17804133c443d3391b139f740abda07d44c21 100644 (file)
@@ -15,7 +15,9 @@ 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,16 +31,20 @@ public class Ticket2104 extends Application {
 
         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() {
@@ -66,27 +72,35 @@ 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 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);
@@ -99,7 +113,9 @@ 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 8b9a3478c184468345e840d53d2fe1066afb861e..92908aa66d0ae075f8131a0fa91e8fce9090a244 100644 (file)
@@ -25,11 +25,14 @@ 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 314cb0bd2ba74281f954425bc772ecdff2e3a655..4c185801c3c82ac645c742afa4b97480efc37bbc 100644 (file)
@@ -16,14 +16,17 @@ 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() {
@@ -34,18 +37,22 @@ 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 8dd003baef99ce557437fd649f43077ffd7a60a8..974b3c45721451dcc82b10be3353a22bd5623cac 100644 (file)
@@ -33,8 +33,10 @@ 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");
@@ -46,7 +48,13 @@ 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 903d4422181b5383dfe81ac913ce7bbe67307fab..c1e0d64dde653841cf780ee770593ad1d67da77e 100644 (file)
@@ -49,7 +49,13 @@ public class Ticket2119 extends Application {
 
     private Layout testLayout() {
         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");
+        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);
 
@@ -61,7 +67,8 @@ 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 23df8bb13bed4331d6c9e3957923d642ba4c52a1..378952489f38e8b0b52a25851ba11e2c87dc7544 100644 (file)
@@ -22,7 +22,8 @@ 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);
@@ -33,7 +34,8 @@ 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);
                 }
             });
@@ -50,7 +52,8 @@ 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 da69b1f1c333d21d5060effd0311c21faa038734..5a48156367a1406835498f64acf1588d15cd56a1 100644 (file)
@@ -65,9 +65,11 @@ 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");
         }
 
     }
@@ -81,7 +83,8 @@ 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.
@@ -96,9 +99,11 @@ 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 9473a8e50e199ac3a82b10f6d9967693d497e777..165e770307c6bce1fe4ff6938c73b0b644c925b3 100644 (file)
@@ -26,7 +26,8 @@ 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 16fd13b3f94da4a14cb0ee6535ef80ab335e8d4c..9f5e2a2de145dba0a18e49b1e32e1367ee4cda65 100644 (file)
@@ -22,7 +22,8 @@ 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 90d9926991dd6e325758f31f9699fb89348367c7..ea3d996b981b04a5ba62e8d1857500e6ae6e249e 100644 (file)
@@ -91,7 +91,8 @@ 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 ef378e87f80c0f0862ed7f0099b177b3b6afa40c..241907c0beeb4d14a1f08f30fdcf82acccf462e9 100644 (file)
@@ -132,7 +132,8 @@ 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();
                 }
 
@@ -142,7 +143,8 @@ 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 c290e915626c628dae35aeeaf884604f175259e9..a326a0c3813ca8cf76a73dd1da7bd333a9f83ee4 100644 (file)
@@ -25,9 +25,11 @@ 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, Object columnId) {\r
+            public Component generateCell(Table source, Object itemId,\r
+                    Object columnId) {\r
                 Item item = source.getItem(itemId);\r
-                String col1 = (String) item.getItemProperty("col 1 (red)").getValue();\r
+                String col1 = (String) item.getItemProperty("col 1 (red)")\r
+                        .getValue();\r
                 String col2 = (String) item.getItemProperty("col 2").getValue();\r
                 return new Label(col1 + "-" + col2);\r
             }\r
@@ -49,9 +51,12 @@ public class Ticket2208 extends Application {
             }\r
         });\r
 \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
+        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
 \r
         t.setColumnReorderingAllowed(true);\r
         t.setColumnCollapsingAllowed(true);\r
index 194ac42bf6bf970f5e519d1dd1c900a4b4b89110..7ee8a0740503dd116e14d4b7bdcbd8ee52d0bf1a 100644 (file)
@@ -24,7 +24,8 @@ public class Ticket2209 extends Application {
         getMainWindow().addComponent(gl);\r
         setTheme("tests-tickets");\r
         combo = new ComboBox("Combo caption");\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
+        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
         gl.addComponent(combo);\r
         gl.addComponent(labelLong);\r
 \r
index 629ca49db0cca91fc3ef15633f7c69f1159c6ebe..b7b7b8aba1939758a4e59595059c5deecdc7df1d 100644 (file)
@@ -24,7 +24,15 @@ public class Ticket2209OL extends Application {
         getMainWindow().addComponent(gl);\r
         setTheme("tests-tickets");\r
         combo = new ComboBox("Combo caption");\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
+        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
         gl.addComponent(combo);\r
         gl.addComponent(labelLong);\r
 \r
index 12899e881484d86c7c840c256be40f86ebd9cf39..99103e7e42575e50d2c99e279d46b553977791ec 100644 (file)
@@ -25,7 +25,20 @@ public class Ticket2209OL2 extends Application {
         getMainWindow().addComponent(gl);\r
         setTheme("tests-tickets");\r
         combo = new ComboBox("Combo caption");\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
+        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
         gl.addComponent(combo);\r
         gl.addComponent(labelLong);\r
 \r
index 4f31bdef6660504f77a1c372d8cda4afa19e5b11..e6489da43258cfbe1be87bc1730801e0b1d4728b 100644 (file)
@@ -43,22 +43,23 @@ 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 b2da763ba05b3c9d1bc17c223087a9b538c8d570..848d3c8e3dfe45633ae4f458087ca669777a4bad 100644 (file)
@@ -16,7 +16,10 @@ public class Ticket2232 extends Application {
         setMainWindow(new Window());\r
         setTheme("tests-tickets");\r
 \r
-        getMainWindow().addComponent(new Label("Defining spacing must be possible also with pure CSS"));\r
+        getMainWindow()\r
+                .addComponent(\r
+                        new Label(\r
+                                "Defining spacing must be possible also with pure CSS"));\r
 \r
         Layout gl;\r
         gl = new VerticalLayout();\r
@@ -62,7 +65,8 @@ public class Ticket2232 extends Application {
             gl.addComponent(b);\r
         }\r
         String caption = gl.getClass().getSimpleName();\r
-        caption += " style: " + gl.getStyleName() + ", spacingFromServer:" + ((SpacingHandler) gl).isSpacingEnabled();\r
+        caption += " style: " + gl.getStyleName() + ", spacingFromServer:"\r
+                + ((SpacingHandler) gl).isSpacingEnabled();\r
         gl.setCaption(caption);\r
         getMainWindow().addComponent(gl);\r
     }\r
index d595000be0bddb4e89bce808e146ea978c7835f6..6d70d89af8e059639345a54e65b645b4c17a6f70 100644 (file)
@@ -8,7 +8,20 @@ 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 8e6a96d2873e83e31340222a23a2dc80c9716af6..1ddb74187f9cd622c12955c89a02e0f5295789f8 100644 (file)
@@ -29,16 +29,17 @@ public class Ticket2242 extends Application implements ValueChangeListener {
     }
 
     private void createUI(AbstractOrderedLayout 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);
 
@@ -59,7 +60,8 @@ 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);
 
@@ -106,7 +108,8 @@ 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 c63164f1e5ad3fb7dc910da4d684b764dc026ac1..e9ae3ac72020110737d193c7d958afd8513671c2 100644 (file)
@@ -39,30 +39,34 @@ 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 62bdcb52d46d000ec77008ae7c5cf72f378a1733..e3b446f242306ac92cb9afb3e2779b8df3d42cd2 100644 (file)
@@ -74,7 +74,8 @@ 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);
 
@@ -84,7 +85,8 @@ 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,82 +102,101 @@ 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 8cee57f1bded1ddfbc44a0f802e76b40bd3630fd..c63faf2cef1bafa65b5957afadc24f2b1c002268 100644 (file)
@@ -22,7 +22,8 @@ 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 d016e1726489d9eedd6efbcdd56bb1ab3c86bf71..89b90eaa01a3134dc151305afafccbed9c7540f7 100644 (file)
@@ -16,7 +16,8 @@ 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);
index 0323433c09a12efd765a5b8c68e850ea979a761c..5d4ac308ef6888a014d55e1d518421afc1f70323 100644 (file)
@@ -9,19 +9,23 @@ public class Ticket2287 extends Ticket2292 {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
         URL url = getURL();\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
+        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
 \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 + "/icon.png\" />");\r
+        l.setValue("This is a label with as slow image. <img src=\"" + url\r
+                + "/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 + "/icon.png\" />");\r
+        l.setValue("This is a label with as slow image. <img src=\"" + url\r
+                + "/icon.png\" />");\r
         main.addComponent(l);\r
 \r
     }\r
index 9a1dd90242c51ca7b84dc3db9a098b99c41880d4..2fd7c3511a5d0045151fd172a35b01d37160b3ff 100644 (file)
@@ -22,11 +22,13 @@ public class Ticket2292 extends com.vaadin.Application {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
 \r
         ExternalResource icon = new ExternalResource("./icon.png");\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
+        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
         Button b = new Button();\r
         main.addComponent(b);\r
         b.setIcon(icon);\r
@@ -54,7 +56,8 @@ public class Ticket2292 extends com.vaadin.Application {
             e1.printStackTrace();\r
         }\r
 \r
-        BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);\r
+        BufferedImage image = new BufferedImage(200, 200,\r
+                BufferedImage.TYPE_INT_RGB);\r
         Graphics drawable = image.getGraphics();\r
         drawable.setColor(Color.lightGray);\r
         drawable.fillRect(0, 0, 200, 200);\r
@@ -73,7 +76,8 @@ 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(imagebuffer.toByteArray());\r
+            ByteArrayInputStream istream = new ByteArrayInputStream(\r
+                    imagebuffer.toByteArray());\r
             return new DownloadStream(istream, null, null);\r
         } catch (IOException e) {\r
             return null;\r
index e763ae5cdecb21f5f2edc41a65c7d38a550d14dc..37c29ca5e0ea0416308fb99cc0ab4a0f12ed2ae0 100644 (file)
@@ -50,6 +50,7 @@ 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 f105beb83569ad109852dedce91fa2c6ab1b0e3c..da257b4ae8d5ee445bf949ba9554550276f62d77 100644 (file)
@@ -12,16 +12,26 @@ public class Ticket2297 extends Ticket2292 {
 \r
     @Override\r
     public void init() {\r
-        final Window main = new Window(getClass().getName().substring(getClass().getName().lastIndexOf(".") + 1));\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
         setMainWindow(main);\r
         URL url = getURL();\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
+        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
 \r
         try {\r
-            CustomLayout cl = new CustomLayout(new ByteArrayInputStream(("This is an empty CustomLayout with as slow image. <img src=\"" + url.toString() + "/icon.png\" />").getBytes()));\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
             main.addComponent(cl);\r
 \r
-            cl = new CustomLayout(new ByteArrayInputStream(("This is an empty CustomLayout with as slow image. <img src=\"" + url.toString() + "/icon.png\" />").getBytes()));\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
             main.addComponent(cl);\r
         } catch (IOException e) {\r
             // TODO Auto-generated catch block\r
index 35260509aa6f59dddee4c0cd57b987174938f7ba..21b33d5bb627f0149d8468b7538273575e7ac5d0 100644 (file)
@@ -18,7 +18,8 @@ public class Ticket2303 extends Application {
         String customlayout = "<div location=\"test\"></div>";\r
         CustomLayout cl = null;\r
         try {\r
-            cl = new CustomLayout(new ByteArrayInputStream(customlayout.getBytes()));\r
+            cl = new CustomLayout(new ByteArrayInputStream(\r
+                    customlayout.getBytes()));\r
         } catch (IOException e) {\r
             // TODO Auto-generated catch block\r
             e.printStackTrace();\r
index 4a5318258b5d2f7fe2ed975f92ac1fcdc6f62dd7..1b356c73fb97d4c048f5a907631d3be759db12db 100644 (file)
@@ -10,7 +10,8 @@ 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,10 +19,12 @@ 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 8d916d156b565a6f5983ff277c7867f952f5c825..6363fddcaff0642a7de5289c185ba23301ed9d9f 100644 (file)
@@ -12,10 +12,13 @@ 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(Reindeer.PANEL_LIGHT);
index bcbe760eb4110d91521f419f2a8ac71b6e070f01..b48302a1f48cac2de3affaf05bc256d534b938a5 100644 (file)
@@ -16,7 +16,8 @@ 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 12cb967dfd8164bd5b6323e1e20800962a685067..3b46d89a5e9f5c53ed0a526aad39e49d51a97e44 100644 (file)
@@ -16,11 +16,13 @@ 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 27a6376961072c9648e37048d86d195a4cec95e8..57dbeb4033735c495692d73622d2f078337266bc 100644 (file)
@@ -34,7 +34,8 @@ 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 695846920300ee3b9bfbe2de24f3add8eb1d7e57..9277a01f96c8b58094ea6f487c04a9239d554c75 100644 (file)
@@ -18,7 +18,8 @@ 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 2d6e681111f54067e8aade43c0518f04b3fbe6a5..6476807ada640077223ebc084adece5239e59bd4 100644 (file)
@@ -17,7 +17,10 @@ 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 dd6a9f5bd4898f802b160f491a037ea0c32ad9a4..dee0417eff540446820b393deae3eca679b29967 100644 (file)
@@ -30,7 +30,8 @@ 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 e98613dff233142c88c5119ff560cfd536a552fb..107d47786cf142c1584a0ff0feb378c4965b7d33 100644 (file)
@@ -45,12 +45,14 @@ 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.getContent()).setExpandRatio(split, 1.0f);
index 5fa84d369931dac6aaa43bc2ef0e38acfbc8fdfc..3159be360bb699c36b6430e61ba81ca745dd48cf 100644 (file)
@@ -19,7 +19,8 @@ public class Ticket2411 extends Application {
         l.setHeight("504px");\r
 \r
         for (int i = 1; i <= 5; i++) {\r
-            Button b = new Button("Button " + i + " should be 100px or 101px high");\r
+            Button b = new Button("Button " + i\r
+                    + " should be 100px or 101px high");\r
             b.setHeight("100%");\r
             l.addComponent(b);\r
         }\r
index e2f6b25279ffea9dc70f66685d8f47d69256f671..90e2ce438d8e0bc16be240b3c25058cf5369e770 100644 (file)
@@ -13,12 +13,15 @@ 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 283b0d8ca9281b03e42d10798d6547f996498dc3..e1eb2531f278825e2f2cd1d4d326f2e76e734d7d 100644 (file)
@@ -16,14 +16,17 @@ 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 26bb18faf5772ca83d6fc5346cccc122d4965823..326f27d58aaa9fd15e993257676a2dfae35cc411 100644 (file)
@@ -29,14 +29,19 @@ 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 a37c31a69a7bf5dfe07b0507925a1bd42210de47..5d4a884895cae078e6d76dedfbe6fa0c7898c094 100644 (file)
@@ -14,7 +14,8 @@ public class Ticket2434 extends Application {
 
         setMainWindow(w);
 
-        Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3, 50);
+        Table t = TestForTablesInitialColumnWidthLogicRendering.getTestTable(3,
+                50);
 
         t.setPageLength(0);
 
index c5118bf2d6f6ef8f74a80fdc8d916db6c0530977..cd1e8e682ec2815e7f598434a23afce5041cf0e0 100644 (file)
@@ -16,14 +16,16 @@ 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;
@@ -48,11 +50,16 @@ 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 ea535009590ec18df693d195f2084c47af3b9f44..092d9b8b414fccdeccd549fdecc2c71a9211608c 100644 (file)
@@ -151,7 +151,8 @@ public class Ticket2998 extends Application {
         }\r
 \r
         @Override\r
-        public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {\r
+        public Field createField(Container container, Object itemId,\r
+                Object propertyId, Component uiContext) {\r
 \r
             /*\r
              * trainingType is manyToOne relation, give it a combobox\r
@@ -167,7 +168,8 @@ public class Ticket2998 extends Application {
                 return getSecondaryTypesList(itemId);\r
             }\r
 \r
-            final Field f = super.createField(container, itemId, propertyId, uiContext);\r
+            final Field f = super.createField(container, itemId, propertyId,\r
+                    uiContext);\r
             if (f != null) {\r
                 if (f instanceof TextField) {\r
                     TextField tf = (TextField) f;\r
@@ -182,13 +184,15 @@ public class Ticket2998 extends Application {
                                 float f = Float.parseFloat((String) value);\r
                                 return true;\r
                             } catch (Exception e) {\r
-                                f.getWindow().showNotification("Bad number value");\r
+                                f.getWindow().showNotification(\r
+                                        "Bad number value");\r
                                 f.setValue(0);\r
                                 return false;\r
                             }\r
                         }\r
 \r
-                        public void validate(Object value) throws InvalidValueException {\r
+                        public void validate(Object value)\r
+                                throws InvalidValueException {\r
                             // TODO Auto-generated method stub\r
 \r
                         }\r
@@ -308,7 +312,9 @@ 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", "very long", "just shaking legs after work", "long one with Paul", "test run" };\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
 \r
         c.add(Calendar.DATE, -1000);\r
 \r
@@ -318,7 +324,8 @@ public class Ticket2998 extends Application {
 \r
         for (int i = 0; i < 1000; i++) {\r
             r = new Workout();\r
-            c.set(Calendar.HOUR_OF_DAY, 12 + (rnd.nextInt(11) - rnd.nextInt(11)));\r
+            c.set(Calendar.HOUR_OF_DAY,\r
+                    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 21fe826e2f0b95d002db716caa3b7658349f72f8..6afa25efdabb7f703fe033232d178de5f044b6a1 100644 (file)
@@ -34,29 +34,33 @@ public class Ticket3146 extends Application {
         table.setWidth("200px");\r
         mainWindow.addComponent(table);\r
 \r
-        Button clearButton = new Button("Clear selection", new Button.ClickListener() {\r
-            public void buttonClick(ClickEvent event) {\r
-                clearSelection();\r
-            }\r
-        });\r
+        Button clearButton = new Button("Clear selection",\r
+                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", new Button.ClickListener() {\r
-            public void buttonClick(ClickEvent event) {\r
-                clearSelection2();\r
-            }\r
-        });\r
+        Button clearButton2 = new Button("Clear selection 2",\r
+                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", new Button.ClickListener() {\r
-            public void buttonClick(ClickEvent event) {\r
-                clearSelection3();\r
-            }\r
-        });\r
+        Button clearButton3 = new Button("Clear selection 3",\r
+                new Button.ClickListener() {\r
+                    public void buttonClick(ClickEvent event) {\r
+                        clearSelection3();\r
+                    }\r
+                });\r
         mainWindow.addComponent(clearButton3);\r
-        Button printButton = new Button("Print selection", new Button.ClickListener() {\r
-            public void buttonClick(ClickEvent event) {\r
-                printSelection();\r
-            }\r
-        });\r
+        Button printButton = new Button("Print selection",\r
+                new Button.ClickListener() {\r
+                    public void buttonClick(ClickEvent event) {\r
+                        printSelection();\r
+                    }\r
+                });\r
         mainWindow.addComponent(printButton);\r
 \r
         result = new TextField();\r
index cea5fa66082e9fc9f7c4c51c6349485a90e93acf..7d3baf78faf50ab43a0289df765ef382802bae70 100644 (file)
@@ -31,7 +31,9 @@ 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());
             }
@@ -39,7 +41,8 @@ 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
@@ -53,7 +56,8 @@ 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);
@@ -71,17 +75,23 @@ public class Ticket34 extends Application {
             Panel p = new Panel(string);
             p.setSizeFull();
             ((VerticalLayout) p.getContent()).setSpacing(true);
-            p.addComponent(new Label("This is a simple test case for " + "UriFragmentReader that can be used for" + " adding linking, back/forward button " + "and history support for ajax application. "));
+            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 691dbadd226d14afbe24ba2c39c1d3fab7631565..a5c8e1314c9249c44d56b37d181b40ebbb71e5b0 100644 (file)
@@ -22,7 +22,15 @@ import com.vaadin.ui.Window;
 \r
 public class Ticket677 extends Application {\r
 \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
+    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
 \r
     Panel root = new Panel("Enabled");\r
     Panel one = new Panel("Enabled");\r
@@ -40,21 +48,24 @@ public class Ticket677 extends Application {
         HorizontalLayout l = new HorizontalLayout();\r
         main.addComponent(l);\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 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 form", new Button.ClickListener() {\r
             public void buttonClick(ClickEvent event) {\r
                 toggle(form);\r
@@ -100,7 +111,8 @@ public class Ticket677 extends Application {
         form.setFieldFactory(new BaseFieldFactory() {\r
 \r
             @Override\r
-            public Field createField(Item item, Object propertyId, Component uiContext) {\r
+            public Field createField(Item item, Object propertyId,\r
+                    Component uiContext) {\r
                 Field f = super.createField(item, propertyId, uiContext);\r
                 f.setEnabled(!"disabled".equals(propertyId));\r
                 return f;\r
@@ -122,8 +134,10 @@ public class Ticket677 extends Application {
         table.setFieldFactory(new BaseFieldFactory() {\r
 \r
             @Override\r
-            public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {\r
-                Field f = super.createField(container, itemId, propertyId, uiContext);\r
+            public Field createField(Container container, Object itemId,\r
+                    Object propertyId, Component uiContext) {\r
+                Field f = super.createField(container, itemId, propertyId,\r
+                        uiContext);\r
                 Item item = container.getItem(itemId);\r
                 Property p = item.getItemProperty(propertyId);\r
                 if ("disabled".equals(p.getValue())) {\r
@@ -143,7 +157,8 @@ 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).getComponentIterator().next();\r
+            TextField tf = (TextField) ((ComponentContainer) c)\r
+                    .getComponentIterator().next();\r
             tf.focus();\r
         }\r
     }\r
index 817e391d5fd7aaf805debc7567f2674f137214df..f122031b6ee530160c3dc240a145850fdf6e0f44 100644 (file)
@@ -26,7 +26,9 @@ 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 c0bf1761eb2650acde7ba06c38a64aa3666a51b3..ba2e4406736b1d90af3cfbac943de3b8827823cd 100644 (file)
@@ -28,7 +28,8 @@ 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.");
@@ -49,7 +50,8 @@ public class Ticket736 extends Application {
         // 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);
@@ -59,21 +61,25 @@ public class Ticket736 extends Application {
         // Debug form properties
         final Panel formProperties = new Panel("Form properties");
         formProperties.setWidth("200px");
-        final String[] visibleProps = { "required", "invalidAllowed", "readOnly", "readThrough", "writeThrough", "invalidCommitted", "validationVisible", "immediate" };
+        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. */
@@ -135,7 +141,8 @@ 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;
         }
 
     }
@@ -154,7 +161,8 @@ 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");
             }
         }
     }
@@ -177,7 +185,8 @@ 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 c127358454babbdd291822e2d376f3116d147cde..3f9e0ccf6f9a64d16f1c46eff59ccf8b69fad98f 100644 (file)
@@ -36,21 +36,28 @@ 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 6fcdfef7dce244c214207ae69633b9160216cefe..d053cbbb2a2ede7fe6efb4468ea2d1fe4c2307a0 100644 (file)
@@ -16,7 +16,8 @@ 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);
 
@@ -26,14 +27,16 @@ 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);
@@ -43,7 +46,8 @@ 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());
             }
         });
 
@@ -60,7 +64,8 @@ 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 8c41ea12f04a08b47ceedcab24cd77c513c4cae3..215f1c146015ffed708dc170623b134b9e94f481 100644 (file)
@@ -67,18 +67,21 @@ public class RandomComponents {
 
         case 0:
             result = new HorizontalLayout();
-            ((HorizontalLayout) result).setCaption("OrderedLayout_horizontal_" + caption);
+            ((HorizontalLayout) result).setCaption("OrderedLayout_horizontal_"
+                    + caption);
             break;
         case 1:
             result = new VerticalLayout();
-            ((VerticalLayout) result).setCaption("OrderedLayout_vertical_" + caption);
+            ((VerticalLayout) result).setCaption("OrderedLayout_vertical_"
+                    + caption);
             break;
         case 2:
             GridLayout gl;
             if (seededRandom.nextInt(1) > 0) {
                 gl = new GridLayout();
             } else {
-                gl = new GridLayout(seededRandom.nextInt(3) + 1, seededRandom.nextInt(3) + 1);
+                gl = new GridLayout(seededRandom.nextInt(3) + 1,
+                        seededRandom.nextInt(3) + 1);
             }
             gl.setCaption("GridLayout_" + caption);
             gl.setDescription(gl.getCaption());
@@ -166,7 +169,12 @@ public class RandomComponents {
             // Link
             result = new Panel();
             result.setCaption("Panel component " + caption);
-            ((Panel) result).addComponent(new Label("Panel is a container for other components, by default it draws a frame around it's " + "extremities and may have a caption to clarify the nature of the contained components' purpose." + " Panel contains an layout where the actual contained components are added, " + "this layout may be switched on the fly."));
+            ((Panel) result)
+                    .addComponent(new Label(
+                            "Panel is a container for other components, by default it draws a frame around it's "
+                                    + "extremities and may have a caption to clarify the nature of the contained components' purpose."
+                                    + " Panel contains an layout where the actual contained components are added, "
+                                    + "this layout may be switched on the fly."));
             ((Panel) result).setWidth(250);
             break;
         case 6:
@@ -197,7 +205,8 @@ public class RandomComponents {
         case 11:
             result = new VerticalLayout();
             // TODO: disabled gwt bug with mixed up iframe's
-            ((VerticalLayout) result).addComponent(new EmbeddedBrowserExample());
+            ((VerticalLayout) result)
+                    .addComponent(new EmbeddedBrowserExample());
             break;
         case 12:
             result = new VerticalLayout();
@@ -241,7 +250,8 @@ public class RandomComponents {
             break;
         case 22:
             result = new VerticalLayout();
-            ((VerticalLayout) result).addComponent(new StressComponentsInTable());
+            ((VerticalLayout) result)
+                    .addComponent(new StressComponentsInTable());
             break;
         }
 
@@ -265,18 +275,23 @@ public class RandomComponents {
         return em;
     }
 
-    public class MultiListener implements Button.ClickListener, PropertySetChangeListener, ItemSetChangeListener, ValueChangeListener {
+    public class MultiListener implements Button.ClickListener,
+            PropertySetChangeListener, ItemSetChangeListener,
+            ValueChangeListener {
 
         public void buttonClick(ClickEvent event) {
-            System.out.println("ClickEvent from " + event.getButton().getCaption());
+            System.out.println("ClickEvent from "
+                    + event.getButton().getCaption());
         }
 
         public void containerPropertySetChange(PropertySetChangeEvent event) {
-            System.out.println("containerPropertySetChange from " + event.getContainer());
+            System.out.println("containerPropertySetChange from "
+                    + event.getContainer());
         }
 
         public void containerItemSetChange(ItemSetChangeEvent event) {
-            System.out.println("containerItemSetChange from " + event.getContainer());
+            System.out.println("containerItemSetChange from "
+                    + event.getContainer());
         }
 
         public void valueChange(ValueChangeEvent event) {