]> source.dussan.org Git - vaadin-framework.git/commitdiff
VerticalLayout has spacing = true and margin = true by default .
authorIlia Motornyi <elmot@vaadin.com>
Mon, 12 Dec 2016 15:44:54 +0000 (17:44 +0200)
committerGitHub <noreply@github.com>
Mon, 12 Dec 2016 15:44:54 +0000 (17:44 +0200)
HorizontalLayout has spacing = true and margin = false by default.

Fixes vaadin/framework8-issues#526

64 files changed:
server/src/main/java/com/vaadin/ui/AbstractLayout.java
server/src/main/java/com/vaadin/ui/HorizontalLayout.java
server/src/main/java/com/vaadin/ui/LegacyWindow.java
server/src/main/java/com/vaadin/ui/VerticalLayout.java
server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
uitest/src/main/java/com/vaadin/tests/components/TestBase.java
uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
uitest/src/main/java/com/vaadin/tests/components/grid/InitiallyDisabledGrid.java
uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
uitest/src/main/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java
uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
uitest/src/main/java/com/vaadin/tests/components/table/HeaderSyncOnScroll.java
uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
uitest/src/main/java/com/vaadin/tests/components/uitest/ThemeTestUI.java
uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
uitest/src/main/java/com/vaadin/tests/components/uitest/components/NotificationsCssTest.java
uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
uitest/src/main/java/com/vaadin/tests/components/window/WindowMaxHeight.java
uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveLayoutUpdate.java
uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChange.java
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAlignment.java
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HCaption.java
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java
uitest/src/main/java/com/vaadin/tests/layouts/layouttester/VLayout/VCaption.java
uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Accordions.java
uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
uitest/src/main/java/com/vaadin/tests/util/Log.java
uitest/src/main/java/com/vaadin/v7/tests/components/grid/InitiallyDisabledGrid.java
uitest/src/main/resources/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.html

index d4f80423550231f4a09bec53c0280cc2f6e181c9..fe073eb68792e62348e68f7ed640ddeace494538 100644 (file)
@@ -105,7 +105,7 @@ public abstract class AbstractLayout extends AbstractComponentContainer
      */
     protected void writeMargin(Element design, MarginInfo margin,
             MarginInfo defMargin, DesignContext context) {
-        if (margin.hasAll()) {
+        if (margin.hasAll() || margin.hasNone()) {
             DesignAttributeHandler.writeAttribute("margin", design.attributes(),
                     margin.hasAll(), defMargin.hasAll(), boolean.class,
                     context);
index 4682937ff5dfe2ecf95b669f81c1b60ebd62cc4d..07583c671281b43375deb112052b1805a21feab5 100644 (file)
@@ -33,7 +33,7 @@ public class HorizontalLayout extends AbstractOrderedLayout {
      * Constructs an empty HorizontalLayout.
      */
     public HorizontalLayout() {
-
+        setSpacing(true);
     }
 
     /**
index 2705d56486c4ee01f8e2139c088a5a3f36005dec..dda734899daa9b10a7a5f6c7a681745ca84060ff 100644 (file)
@@ -40,7 +40,7 @@ public class LegacyWindow extends UI {
      */
     public LegacyWindow() {
         super(new VerticalLayout());
-        ((VerticalLayout) getContent()).setMargin(true);
+        ((VerticalLayout) getContent()).setSpacing(false);
     }
 
     /**
@@ -50,8 +50,7 @@ public class LegacyWindow extends UI {
      *            the caption of the window
      */
     public LegacyWindow(String caption) {
-        super(new VerticalLayout());
-        ((VerticalLayout) getContent()).setMargin(true);
+        this();
         setCaption(caption);
     }
 
index 7fcf6d438aab43ab1375c11cba035e55082dda04..d441e8a664379e8002393430cd46d30f3c17ab46 100644 (file)
@@ -35,6 +35,8 @@ public class VerticalLayout extends AbstractOrderedLayout {
      */
     public VerticalLayout() {
         setWidth("100%");
+        setSpacing(true);
+        setMargin(true);
     }
 
     /**
index b264df1e1ad6da8bf9a149c79c7aa7e1d1f8ab27..7aabfe4f7f0faa94e870b35b9109f3f1aeb0193d 100644 (file)
@@ -25,7 +25,7 @@ import com.vaadin.ui.Layout.MarginHandler;
 public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler>
         extends DeclarativeTestBase<L> {
 
-    protected void testMargins(String componentTag) {
+    protected void testMargins(String componentTag, boolean defaultMargin) {
 
         for (int i = 0; i < 16; ++i) {
             boolean top = (i & 1) == 1;
@@ -35,37 +35,41 @@ public abstract class DeclarativeMarginTestBase<L extends Layout & MarginHandler
 
             MarginInfo m = new MarginInfo(top, right, bottom, left);
 
-            String design = getMarginTag(componentTag, top, right, bottom,
+            String design = getMarginTag(componentTag, defaultMargin, top, right, bottom,
                     left);
 
             // The assertEquals machinery in DeclarativeTestBase uses bean
             // introspection and MarginInfo is not a proper bean. It ends up
             // considering *all* MarginInfo objects equal... (#18229)
             L layout = read(design);
-            Assert.assertEquals(m, layout.getMargin());
+            Assert.assertEquals("For tag: " + design, m, layout.getMargin());
 
             testWrite(design, layout);
         }
     }
 
-    private String getMarginTag(String componentTag, boolean top, boolean right,
-            boolean bottom, boolean left) {
+    private String getMarginTag(String componentTag, boolean defaultMargin, boolean top, boolean right,
+                                boolean bottom, boolean left) {
         String s = "<" + componentTag + " ";
+        String suffix = defaultMargin ? "=false " : " ";
 
-        if (left && right && top && bottom) {
-            s += "margin";
+        if (top == left && top == right && top == bottom) {
+            if(top != defaultMargin)
+            {
+                s += "margin" + suffix;
+            }
         } else {
-            if (left) {
-                s += "margin-left ";
+            if (left != defaultMargin) {
+                s += "margin-left" + suffix;
             }
-            if (right) {
-                s += "margin-right ";
+            if (right != defaultMargin) {
+                s += "margin-right" + suffix;
             }
-            if (top) {
-                s += "margin-top ";
+            if (top != defaultMargin) {
+                s += "margin-top" + suffix;
             }
-            if (bottom) {
-                s += "margin-bottom ";
+            if (bottom != defaultMargin) {
+                s += "margin-bottom" + suffix;
             }
         }
         return s + " />";
index 97646923458a63ec9c70183446bc0ebeb084e874..7e84bce54c5c09de4729f67e7dd68de08ac41aaf 100644 (file)
@@ -18,6 +18,7 @@ package com.vaadin.tests.server.component.abstractorderedlayout;
 import java.util.Arrays;
 import java.util.List;
 
+import org.junit.Ignore;
 import org.junit.Test;
 
 import com.vaadin.shared.ui.label.ContentMode;
@@ -40,8 +41,13 @@ public class AbstractOrderedLayoutDeclarativeTest
     private List<String> defaultAlignments = Arrays.asList(":top", ":left");
 
     @Test
-    public void testMargins() {
-        testMargins("vaadin-vertical-layout");
+    public void testMarginsVertical() {
+        testMargins("vaadin-vertical-layout", true);
+    }
+
+    @Test
+    public void testMarginsHorizontal() {
+        testMargins("vaadin-horizontal-layout", false);
     }
 
     @Test
index a9003c23fc195de4229d0471bbdaa368292ef795..43176a5ce85313e19063ad2bcf4e8c247af35483 100644 (file)
@@ -38,7 +38,7 @@ public class GridLayoutDeclarativeTest
 
     @Test
     public void testMargins() {
-        testMargins("vaadin-grid-layout");
+        testMargins("vaadin-grid-layout",false);
     }
 
     @Test
index a3eada8f2f7662b41bca4df57e5959704e12303d..9e958542d265bed755f5a076a0bed5b70535e49f 100644 (file)
@@ -148,6 +148,17 @@ public class MarginInfo implements Serializable {
         return (bitMask & ALL) == ALL;
     }
 
+    /**
+     * Checks if this MarginInfo object has no margins enabled.
+     *
+     * @since 8.0.0
+     *
+     * @return true if all edges have margins disabled
+     */
+    public boolean hasNone() {
+        return (bitMask & ALL) == 0;
+    }
+
     /**
      * Checks if this MarginInfo object has the left edge margin enabled.
      *
index e2e9488a1aabff1f57fc77c264f91d2bfe680a43..118f4e6b120dfcb9df1af265533ffc04de8426ed 100644 (file)
@@ -29,10 +29,12 @@ public abstract class AbstractTestUI extends UI {
         label.setWidth("100%");
 
         VerticalLayout rootLayout = new VerticalLayout();
-        rootLayout.setMargin(true);
+        rootLayout.setSpacing(false);
         setContent(rootLayout);
 
         layout = new VerticalLayout();
+        layout.setSpacing(false);
+        layout.setMargin(false);
 
         rootLayout.addComponent(label);
         rootLayout.addComponent(layout);
index 729e737cb7d0c773ea9e6705b94a547e2e0d92a5..6587a2dde39a25bb1f2b84be7c16fc75da996d9e 100644 (file)
@@ -39,6 +39,8 @@ public abstract class TestBase extends AbstractTestCase {
         window.addComponent(label);
 
         layout = new VerticalLayout();
+        layout.setMargin(false);
+        layout.setSpacing(false);
         window.addComponent(layout);
         ((VerticalLayout) window.getContent()).setExpandRatio(layout, 1);
 
index e0ebc9bf377f163b9af6ab1ab0ee2e821f74bbe9..5c38d13d32e4df6cbc6d77fd8cb524b6334544c3 100644 (file)
@@ -17,6 +17,7 @@ public class BrowserFrameIsVisible extends TestBase {
     protected void setup() {
 
         HorizontalLayout buttonLayout = new HorizontalLayout();
+        buttonLayout.setSpacing(false);
         addComponent(buttonLayout);
 
         Button page1 = new Button("Hello World");
index 762d2d6489cd0f3d8d796d21fdef9babe2ad4adf..ed79251be6f55bfce41b19f4d575276d985e29c4 100644 (file)
@@ -32,6 +32,8 @@ public class CustomFieldSize extends AbstractReindeerTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(false);
+        layout.setSpacing(false);
         setContent(layout);
         layout.setWidth("50px");
 
index 1de7f1627a538329ce45358b548e3a7e444c2c6a..09d16e1fd2c5d8700872e5114e7152c356be13ef 100644 (file)
@@ -29,7 +29,7 @@ public class DragStartModes extends TestBase {
     private Component makeOtherComponentWrapper(DragStartMode componentOther) {
         VerticalLayout parent = new VerticalLayout();
         parent.setWidth("200px");
-        parent.setSpacing(true);
+        parent.setMargin(false);
 
         CssLayout header = new CssLayout();
         Label dragStartModeLabel = new Label(
index 74f69ef7abe5f88511840a5975dd173864b3fb92..ddbbaa4d2e74f073f34e106252632d3828e445a6 100644 (file)
@@ -15,6 +15,8 @@ public class InitiallyDisabledGrid extends UI {
     @Override
     protected void init(VaadinRequest request) {
         VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(false);
+        layout.setSpacing(false);
         setContent(layout);
         layout.setSizeFull();
         layout.setWidth("600px");
@@ -25,6 +27,8 @@ public class InitiallyDisabledGrid extends UI {
 
         layout.addComponent(button);
         VerticalLayout l = new VerticalLayout();
+        l.setMargin(false);
+        l.setSpacing(false);
         l.setSizeFull();
         l.addComponent(grid);
 
index bb88411fcdfc267179092ba11c567e0d5d5b601d..d4e95b0b54a3d473be33c12ab72d8837db5efe17 100644 (file)
@@ -68,6 +68,8 @@ public class GridLayoutRequiredIndicatorLocation extends AbstractReindeerTestUI
 
     private VerticalLayout createVerticalLayout(boolean useCaption) {
         VerticalLayout vl = new VerticalLayout();
+        vl.setMargin(false);
+        vl.setSpacing(false);
         vl.setWidth("320px");
 
         addLabel(vl, "200px", Alignment.MIDDLE_LEFT, useCaption);
index cc850f2f86c9398db991e207ea8215fd50cb1a36..ffdb2a2fba7cccca9f29f8ff696e79a8c8b213bb 100644 (file)
@@ -2,9 +2,9 @@ package com.vaadin.tests.components.gridlayout;
 
 import com.vaadin.server.VaadinRequest;
 import com.vaadin.tests.components.AbstractReindeerTestUI;
+import com.vaadin.ui.AbstractOrderedLayout;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.ComponentContainer;
 import com.vaadin.ui.GridLayout;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.VerticalLayout;
@@ -13,7 +13,7 @@ public class MoveComponentsFromGridLayoutToInnerLayout extends AbstractReindeerT
 
     protected Button testButton;
     private GridLayout gl;
-    protected ComponentContainer vl;
+    protected AbstractOrderedLayout vl;
 
     @Override
     protected void setup(VaadinRequest request) {
@@ -34,6 +34,8 @@ public class MoveComponentsFromGridLayoutToInnerLayout extends AbstractReindeerT
         gl.addComponent(testButton);
 
         vl = new VerticalLayout();
+        vl.setMargin(false);
+        vl.setSpacing(false);
         vl.addComponent(new Label("I'm inside the inner layout"));
         gl.addComponent(vl);
 
index 161a0c471baaf7857f43ee95de1f745b11952bf8..0bfe63761c25ad28207445d597493e43075e98da 100644 (file)
@@ -34,7 +34,7 @@ public class EmptySpaceOnPageAfterExpandedComponent extends AbstractReindeerTest
         VerticalLayout container = new VerticalLayout();
         container.setStyleName("mystyle");
         container.setId("container");
-        container.setSpacing(true);
+        container.setMargin(false);
         container.setSizeFull();
         addComponent(container);
 
index 62b3dc5857df0c3a4868d04005d247435dcf8ab2..d8627911dcd0694db8153adc6b3e3eab001966a8 100644 (file)
@@ -29,7 +29,7 @@ public class UndefinedSizeScrollbars extends AbstractReindeerTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         VerticalLayout layout = new VerticalLayout();
-        layout.setSpacing(true);
+        layout.setMargin(false);
         layout.setSizeFull();
         setContent(layout);
 
index 7e8ccf3fc8939b1973c4d0afe42bb0f0d8a0848e..96462b8888597c903cd0fd39fa2a5a85c39b0b36 100644 (file)
@@ -27,7 +27,7 @@ public class SliderResize extends AbstractReindeerTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         final VerticalLayout layout = new VerticalLayout();
-        layout.setSpacing(true);
+        layout.setMargin(false);
         layout.setWidth("500px");
         addComponent(layout);
 
index 255b3dafcae6b3f970a7e18e36742b0645019e13..4593f43b7aa3b88ce591a6bdcd5288a784a17657 100644 (file)
@@ -17,8 +17,10 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
     protected void setup(VaadinRequest request) {
         TabSheet tabs = new TabSheet();
 
-        VerticalLayout horizontalSplitsLayout = new VerticalLayout();
-        horizontalSplitsLayout.setCaption("Horizontal splits");
+        VerticalLayout verticalLayout = new VerticalLayout();
+        verticalLayout.setMargin(false);
+        verticalLayout.setSpacing(false);
+        verticalLayout.setCaption("Horizontal splits");
 
         HorizontalSplitPanel percentagePositionWithPercentageLimitsHorizontal = new HorizontalSplitPanel();
         percentagePositionWithPercentageLimitsHorizontal.setMinSplitPosition(10,
@@ -31,7 +33,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 80 %"));
         percentagePositionWithPercentageLimitsHorizontal.setSplitPosition(50,
                 Sizeable.UNITS_PERCENTAGE);
-        horizontalSplitsLayout
+        verticalLayout
                 .addComponent(percentagePositionWithPercentageLimitsHorizontal);
 
         HorizontalSplitPanel pixelPositionWithPercentageLimitsHorizontal = new HorizontalSplitPanel();
@@ -45,7 +47,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 80 %"));
         pixelPositionWithPercentageLimitsHorizontal.setSplitPosition(400,
                 Sizeable.UNITS_PIXELS);
-        horizontalSplitsLayout
+        verticalLayout
                 .addComponent(pixelPositionWithPercentageLimitsHorizontal);
 
         HorizontalSplitPanel pixelPositionWithPixelLimitsHorizontal = new HorizontalSplitPanel();
@@ -59,7 +61,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 550 px"));
         pixelPositionWithPixelLimitsHorizontal.setSplitPosition(400,
                 Sizeable.UNITS_PIXELS);
-        horizontalSplitsLayout
+        verticalLayout
                 .addComponent(pixelPositionWithPixelLimitsHorizontal);
 
         HorizontalSplitPanel percentagePositionWithPixelLimitsHorizontal = new HorizontalSplitPanel();
@@ -73,7 +75,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 550 px"));
         percentagePositionWithPixelLimitsHorizontal.setSplitPosition(30,
                 Sizeable.UNITS_PERCENTAGE);
-        horizontalSplitsLayout
+        verticalLayout
                 .addComponent(percentagePositionWithPixelLimitsHorizontal);
 
         HorizontalSplitPanel percentagePositionWithPercentageLimitsHorizontalResersed = new HorizontalSplitPanel();
@@ -88,7 +90,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 10 %"));
         percentagePositionWithPercentageLimitsHorizontalResersed
                 .setSplitPosition(50, Sizeable.UNITS_PERCENTAGE, true);
-        horizontalSplitsLayout.addComponent(
+        verticalLayout.addComponent(
                 percentagePositionWithPercentageLimitsHorizontalResersed);
 
         HorizontalSplitPanel pixelPositionWithPercentageLimitsHorizontalResersed = new HorizontalSplitPanel();
@@ -102,7 +104,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 10 %"));
         pixelPositionWithPercentageLimitsHorizontalResersed
                 .setSplitPosition(400, Sizeable.UNITS_PIXELS, true);
-        horizontalSplitsLayout.addComponent(
+        verticalLayout.addComponent(
                 pixelPositionWithPercentageLimitsHorizontalResersed);
 
         HorizontalSplitPanel pixelPositionWithPixelLimitsHorizontalResersed = new HorizontalSplitPanel();
@@ -116,7 +118,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 100 px"));
         pixelPositionWithPixelLimitsHorizontalResersed.setSplitPosition(400,
                 Sizeable.UNITS_PIXELS, true);
-        horizontalSplitsLayout
+        verticalLayout
                 .addComponent(pixelPositionWithPixelLimitsHorizontalResersed);
 
         HorizontalSplitPanel percentagePositionWithPixelLimitsHorizontalResersed = new HorizontalSplitPanel();
@@ -130,14 +132,15 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 100 px"));
         percentagePositionWithPixelLimitsHorizontalResersed.setSplitPosition(30,
                 Sizeable.UNITS_PERCENTAGE, true);
-        horizontalSplitsLayout.addComponent(
+        verticalLayout.addComponent(
                 percentagePositionWithPixelLimitsHorizontalResersed);
 
-        horizontalSplitsLayout.setSizeFull();
-        tabs.addComponent(horizontalSplitsLayout);
+        verticalLayout.setSizeFull();
+        tabs.addComponent(verticalLayout);
 
-        HorizontalLayout verticalSplitsLayout = new HorizontalLayout();
-        verticalSplitsLayout.setCaption("Vertical splits");
+        HorizontalLayout horizontalLayout = new HorizontalLayout();
+        horizontalLayout.setSpacing(false);
+        horizontalLayout.setCaption("Vertical splits");
 
         VerticalSplitPanel percentagePositionWithPercentageLimitsVertical = new VerticalSplitPanel();
         percentagePositionWithPercentageLimitsVertical.setMinSplitPosition(10,
@@ -150,7 +153,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 80 %"));
         percentagePositionWithPercentageLimitsVertical.setSplitPosition(50,
                 Sizeable.UNITS_PERCENTAGE);
-        verticalSplitsLayout
+        horizontalLayout
                 .addComponent(percentagePositionWithPercentageLimitsVertical);
 
         VerticalSplitPanel pixelPositionWithPercentageLimitsVertical = new VerticalSplitPanel();
@@ -164,7 +167,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 80 %"));
         pixelPositionWithPercentageLimitsVertical.setSplitPosition(400,
                 Sizeable.UNITS_PIXELS);
-        verticalSplitsLayout
+        horizontalLayout
                 .addComponent(pixelPositionWithPercentageLimitsVertical);
 
         VerticalSplitPanel pixelPositionWithPixelLimitsVertical = new VerticalSplitPanel();
@@ -178,7 +181,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 450 px"));
         pixelPositionWithPixelLimitsVertical.setSplitPosition(400,
                 Sizeable.UNITS_PIXELS);
-        verticalSplitsLayout.addComponent(pixelPositionWithPixelLimitsVertical);
+        horizontalLayout.addComponent(pixelPositionWithPixelLimitsVertical);
 
         VerticalSplitPanel percentagePositionWithPixelLimitsVertical = new VerticalSplitPanel();
         percentagePositionWithPixelLimitsVertical.setMinSplitPosition(100,
@@ -191,7 +194,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Max 450 px"));
         percentagePositionWithPixelLimitsVertical.setSplitPosition(30,
                 Sizeable.UNITS_PERCENTAGE);
-        verticalSplitsLayout
+        horizontalLayout
                 .addComponent(percentagePositionWithPixelLimitsVertical);
 
         VerticalSplitPanel percentagePositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
@@ -206,7 +209,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 10 %"));
         percentagePositionWithPercentageLimitsVerticalReversed
                 .setSplitPosition(50, Sizeable.UNITS_PERCENTAGE, true);
-        verticalSplitsLayout.addComponent(
+        horizontalLayout.addComponent(
                 percentagePositionWithPercentageLimitsVerticalReversed);
 
         VerticalSplitPanel pixelPositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
@@ -220,7 +223,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 10 %"));
         pixelPositionWithPercentageLimitsVerticalReversed.setSplitPosition(400,
                 Sizeable.UNITS_PIXELS, true);
-        verticalSplitsLayout.addComponent(
+        horizontalLayout.addComponent(
                 pixelPositionWithPercentageLimitsVerticalReversed);
 
         VerticalSplitPanel pixelPositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
@@ -234,7 +237,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 100 px"));
         pixelPositionWithPixelLimitsVerticalReversed.setSplitPosition(300,
                 Sizeable.UNITS_PIXELS, true);
-        verticalSplitsLayout
+        horizontalLayout
                 .addComponent(pixelPositionWithPixelLimitsVerticalReversed);
 
         VerticalSplitPanel percentagePositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
@@ -248,13 +251,15 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
                 .setSecondComponent(new Label("Min 100 px"));
         percentagePositionWithPixelLimitsVerticalReversed.setSplitPosition(30,
                 Sizeable.UNITS_PERCENTAGE, true);
-        verticalSplitsLayout.addComponent(
+        horizontalLayout.addComponent(
                 percentagePositionWithPixelLimitsVerticalReversed);
 
-        tabs.addComponent(verticalSplitsLayout);
-        verticalSplitsLayout.setSizeFull();
+        tabs.addComponent(horizontalLayout);
+        horizontalLayout.setSizeFull();
 
         final VerticalLayout togglableSplitPanelLayout = new VerticalLayout();
+        togglableSplitPanelLayout.setSpacing(false);
+        togglableSplitPanelLayout.setMargin(false);
         togglableSplitPanelLayout.setCaption("Togglable minimum/maximum");
 
         final HorizontalSplitPanel togglableSplitPanel = new HorizontalSplitPanel();
@@ -268,6 +273,7 @@ public class SplitPanelWithMinimumAndMaximum extends AbstractReindeerTestUI {
         togglableSplitPanelLayout.addComponent(togglableSplitPanel);
 
         final HorizontalLayout buttonLayout = new HorizontalLayout();
+        buttonLayout.setSpacing(false);
 
         Button disableMinimum = new Button("Disable min limit",
                 new Button.ClickListener() {
index 185780606c01cc20da06debf60f611ba2cb30166..a0ebe6fa1854356e35863600285428eb4bd17a2d 100644 (file)
@@ -18,7 +18,6 @@ public class Footer extends AbstractReindeerTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         HorizontalLayout layout = new HorizontalLayout();
-        layout.setSpacing(true);
 
         final Table table = new Table();
         table.setWidth("400px");
@@ -43,7 +42,7 @@ public class Footer extends AbstractReindeerTestUI {
 
         // Add some options to play with
         VerticalLayout options = new VerticalLayout();
-        options.setSpacing(true);
+        options.setMargin(false);
 
         final CheckBox visible = new CheckBox("Footers Visible", true);
         visible.addValueChangeListener(
@@ -60,6 +59,7 @@ public class Footer extends AbstractReindeerTestUI {
             }
         });
         HorizontalLayout footer1 = new HorizontalLayout();
+        footer1.setSpacing(false);
         footer1.addComponent(footer1Value);
         footer1.addComponent(footer1Btn);
         options.addComponent(footer1);
@@ -73,6 +73,7 @@ public class Footer extends AbstractReindeerTestUI {
             }
         });
         HorizontalLayout footer2 = new HorizontalLayout();
+        footer2.setSpacing(false);
         footer2.addComponent(footer2Value);
         footer2.addComponent(footer2Btn);
         options.addComponent(footer2);
@@ -86,6 +87,7 @@ public class Footer extends AbstractReindeerTestUI {
             }
         });
         HorizontalLayout footer3 = new HorizontalLayout();
+        footer3.setSpacing(false);
         footer3.addComponent(footer3Value);
         footer3.addComponent(footer3Btn);
         options.addComponent(footer3);
index 0a5d7e71071c76bb390e1fcd45668371773e42b0..6adf37fe4b6ece8e4b9331e330d30b62461cc31f 100644 (file)
@@ -48,6 +48,7 @@ public class HeaderSyncOnScroll extends AbstractReindeerTestUI {
         addComponent(table);
 
         HorizontalLayout buttonsLo = new HorizontalLayout();
+        buttonsLo.setSpacing(false);
         addComponent(buttonsLo);
 
         Button setTableWidth100 = new Button("table.setWidth(100%)",
index 264acaaac4aabecf83b0984f4e1c733f1ca13dac..7d4126f38f2fbfcaadb96d834bb079ac72239f6b 100644 (file)
@@ -30,9 +30,8 @@ public class TableChildMeasurementHint extends AbstractReindeerTestUI {
     protected void initMain() {
         ((AbstractOrderedLayout) getContent()).setMargin(false);
         layout = new HorizontalLayout();
-        layout.setSpacing(true);
-        layout.setMargin(false);
         layout.setSizeFull();
+        buttonLayout.setSpacing(false);
         addComponent(buttonLayout);
         addComponent(layout);
 
index 8b493ae1461e11fb83c0e87b76bf57f0985b57e7..bde56d2c21bad27d2a2c43839f8927700c28bc8a 100644 (file)
@@ -33,7 +33,7 @@ public class TableSizeInTabsheet extends AbstractReindeerTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         VerticalLayout layout = new VerticalLayout();
-        layout.setMargin(true);
+        layout.setSpacing(false);
         setContent(layout);
 
         TabSheet tabSheet = new TabSheet();
@@ -45,7 +45,9 @@ public class TableSizeInTabsheet extends AbstractReindeerTestUI {
     public class TabComposite extends CustomComponent {
 
         public TabComposite() {
-            Layout mainLayout = new VerticalLayout();
+            VerticalLayout mainLayout = new VerticalLayout();
+            mainLayout.setSpacing(false);
+            mainLayout.setMargin(false);
             addComponent(mainLayout);
             setCompositionRoot(mainLayout);
 
index 91f5a5e0c189d34e03d0eb778895910f75dfeb48..0bb6ffcfd01003a8c169732ed4053b7b5af41fce 100644 (file)
@@ -100,7 +100,9 @@ public class TabKeyboardNavigation extends AbstractReindeerTestUI {
     }
 
     private Tab addTab() {
-        Layout content = new VerticalLayout();
+        VerticalLayout content = new VerticalLayout();
+        content.setMargin(false);
+        content.setSpacing(false);
         tabs.add(content);
         Label label = new Label("Tab " + index);
         label.setId(labelID(index));
index a865b714522d672e31ea6a6806e75f14714d8f84..7de0eaf08361c23eea17906c2cfd416d07ccacf2 100644 (file)
@@ -21,7 +21,6 @@ public class ThemeTestUI extends AbstractReindeerTestUI {
         createCustomStyleStringField();
 
         HorizontalLayout selectors = new HorizontalLayout();
-        selectors.setSpacing(true);
 
         selectors.addComponent(customStyle);
         selectors.addComponent(setStyleName);
index 9280faf60024dce87f483ba2bbf7833ffb645365..81e0a9aa3d449dc68f33083959a8a39f58ea9d38 100644 (file)
@@ -20,6 +20,8 @@ public class FormsCssTest extends HorizontalLayout {
         setWidth("100%");
 
         VerticalLayout vl = new VerticalLayout();
+        vl.setSpacing(false);
+        vl.setMargin(false);
         FieldGroup fg = new BeanFieldGroup<>(Person.class);
         fg.setItemDataSource(new BeanItem<>(new Person()));
         for (Object propId : fg.getUnboundPropertyIds()) {
index 78ff89d5cbea164f02acbf9d98c946f857cb6091..3997c3ca4c17da460dd4f3b74adae85a0c39f4fa 100644 (file)
@@ -14,6 +14,8 @@ public class NotificationsCssTest extends VerticalLayout {
 
     public NotificationsCssTest(TestSampler parent) {
         this.parent = parent;
+        setSpacing(false);
+        setMargin(false);
         parent.registerComponent(this);
 
         Button humanized = new Button("Humanized message",
index c65a40b9463404656d18e8e77288e4a0e4735043..86d5bff57e9e9dc5a605c015cd0efe94650d9f71 100644 (file)
@@ -20,6 +20,8 @@ public class WindowsCssTest extends VerticalLayout {
 
     public WindowsCssTest(TestSampler parent) {
         this.parent = parent;
+        setMargin(false);
+        setSpacing(false);
         parent.registerComponent(this);
 
         Button defWindow = new Button("Default window",
index 9b5de2ed513f94477f8e02f9b2f20486a0adcce9..be75cd247d08eb961d7ea7237961c3cf024bb60f 100644 (file)
@@ -30,6 +30,8 @@ public class UploadImmediateButtonWidth extends AbstractReindeerTestUI {
         // Let's use a separate layout without margins to make the
         // button widths not dependent on the selected theme.
         VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(false);
+        layout.setSpacing(false);
         layout.setWidth("500px");
 
         layout.addComponent(getImmediateUpload("upload1", "300px"));
index 04f3d7c502f75e0978d82e7c86712fa43d6cad11..34a9fe6ae416368fc0f9a1dfc69961e251305c3f 100644 (file)
@@ -76,6 +76,8 @@ public class BottomComponentScrollsUp extends AbstractReindeerTestUI {
         Panel p = new Panel();
 
         VerticalLayout content = new VerticalLayout();
+        content.setMargin(false);
+        content.setSpacing(false);
         p.setContent(content);
         content.setHeight("500px");
 
index 4bdcf4f0f7e0329db265027285b7eb94b4364bb7..25861e0eab7dbd0c745d9771e2c27d78c350859c 100644 (file)
@@ -42,6 +42,8 @@ public class ComboboxScrollableWindow extends AbstractReindeerTestUI {
         w.center();
 
         VerticalLayout content = new VerticalLayout();
+        content.setMargin(false);
+        content.setSpacing(false);
         w.setContent(content);
         content.setHeight("1000px");
         ComboBox<String> cb = new ComboBox<>();
index cb42e5f505038dd4bf9611540e0470447d52fef3..e3b66cb2bb7bc7bc7d54796a9d178b8365d9ed08 100644 (file)
@@ -23,11 +23,15 @@ public class WindowMaxHeight extends UI {
             setWidth(200, Unit.PIXELS);
 
             VerticalLayout layoutRoot = new VerticalLayout();
+            layoutRoot.setMargin(false);
+            layoutRoot.setSpacing(false);
 
             Panel container = new Panel();
             container.setHeight(200, Unit.PIXELS);
 
             VerticalLayout containerContent = new VerticalLayout();
+            containerContent.setMargin(false);
+            containerContent.setSpacing(false);
             for (int i = 0; i < 300; i++) {
                 Panel hello = new Panel("hello");
                 containerContent.addComponent(hello);
index feff3aa3eabeceb1db93830ba18e1ed83c1b305f..d1dd1b73c5ed6d13f84d91192cba8853ee89baa9 100644 (file)
@@ -30,6 +30,7 @@ public class ResponsiveLayoutUpdate extends AbstractReindeerTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         HorizontalLayout layout = new HorizontalLayout();
+        layout.setSpacing(false);
         layout.addStyleName("layout-update");
         layout.setWidth("100%");
         setContent(layout);
index a2270f7925e1578f3a08115e4094645c9fcfd8be..c57f9e8f4b7c6e82a1dd504385c0e91e5b0be4fa 100644 (file)
@@ -67,7 +67,7 @@ public class FontIcons extends AbstractReindeerTestUI {
     private void buildUI(final Resource icon) {
         VerticalLayout layout = new VerticalLayout();
         setContent(layout);
-        layout.setMargin(true);
+        layout.setSpacing(false);
 
         layout.setIcon(icon);
 
index d8993099214dbaef9522c1eb2e8e3efb2de0d88e..d75bab9fe229d07e5bede12ac655ddcaa8e3f189 100644 (file)
@@ -14,12 +14,16 @@ public class GridLayoutWidthChange extends AbstractReindeerTestUI {
 
     private GridLayout generateLayout() {
         VerticalLayout fields1 = new VerticalLayout();
+        fields1.setMargin(false);
+        fields1.setSpacing(false);
 
         NativeButton nb = new NativeButton("A button");
         nb.setHeight("300px");
         fields1.addComponent(nb);
 
         VerticalLayout fields3 = new VerticalLayout();
+        fields3.setMargin(false);
+        fields3.setSpacing(false);
         fields3.addComponent(new TextField("field14"));
 
         NativeButton b = new NativeButton("A big button");
index 841d77b650c01c654cfe9ea013001d34732687b0..c950a5cdaff2baaeb09860f4f86bdeb6d01a323d 100644 (file)
@@ -53,6 +53,8 @@ abstract public class BaseAlignment extends BaseLayoutTestUI {
                 // TODO Auto-generated catch block
                 e.printStackTrace();
             }
+            layout.setMargin(false);
+            layout.setSpacing(false);
             layout.setHeight("300px");
             layout.setWidth("200px");
             layout.addComponent(components[i]);
index 7515ca4f9f37a138ec961b38c5a309a7492e0073..4d801fbf76b3c8f5154b93638f6eb4fb871653b7 100644 (file)
@@ -74,6 +74,10 @@ public abstract class BaseLayoutTestUI extends AbstractReindeerTestUI {
         try {
             l1 = (AbstractOrderedLayout) layoutClass.newInstance();
             l2 = (AbstractOrderedLayout) layoutClass.newInstance();
+            l1.setMargin(false);
+            l1.setSpacing(false);
+            l2.setMargin(false);
+            l2.setSpacing(false);
         } catch (InstantiationException e1) {
             // TODO Auto-generated catch block
             e1.printStackTrace();
@@ -180,10 +184,16 @@ public abstract class BaseLayoutTestUI extends AbstractReindeerTestUI {
     protected AbstractLayout createLabelsFields(
             Class<? extends AbstractComponent> compType, boolean useIcon,
             String ErrorMessage) {
-        AbstractLayout mainLayout = new VerticalLayout();
+        AbstractOrderedLayout mainLayout = new VerticalLayout();
+        mainLayout.setSpacing(false);
+        mainLayout.setMargin(false);
         AbstractLayout curLayout = null;
         try {
             curLayout = layoutClass.newInstance();
+            if(curLayout instanceof AbstractOrderedLayout) {
+                ((AbstractOrderedLayout)curLayout).setMargin(false);
+                ((AbstractOrderedLayout)curLayout).setSpacing(false);
+            }
         } catch (InstantiationException e1) {
             // TODO Auto-generated catch block
             e1.printStackTrace();
@@ -238,6 +248,8 @@ public abstract class BaseLayoutTestUI extends AbstractReindeerTestUI {
      */
     @Override
     protected void setup(VaadinRequest request) {
+        mainLayout.setMargin(false);
+        mainLayout.setSpacing(false);
         mainLayout.addComponent(l1);
         mainLayout.addComponent(l2);
         addComponent(mainLayout);
index c2492d72fc861c75414a3094f8996c756c615cbf..0fc49efb77d1ca607588710c72d4e840f08998b3 100644 (file)
@@ -20,9 +20,6 @@ import com.vaadin.ui.HorizontalLayout;
 
 public class HCaption extends BaseCaption {
 
-    /**
-     * @param layoutClass
-     */
     public HCaption() {
         super(HorizontalLayout.class);
     }
index 9892531ac573021937905888009d9d7c464f6543..9c8b38714ba8f2303a3ee6a49369567d270f66fc 100644 (file)
@@ -26,9 +26,6 @@ import com.vaadin.ui.HorizontalLayout;
 
 public class HComponentSizing extends BaseComponentSizing {
 
-    /**
-     * @param layoutClass
-     */
     public HComponentSizing() {
         super(HorizontalLayout.class);
     }
index 4591b31108385a25cdb4ee6fa45ae81bf95ebb56..c05fe3b3d26e53ff76149132d37fb1e97ae2817f 100644 (file)
@@ -26,9 +26,6 @@ import com.vaadin.ui.VerticalLayout;
 
 public class VCaption extends BaseCaption {
 
-    /**
-     * @param layoutClass
-     */
     public VCaption() {
         super(VerticalLayout.class);
         // TODO Auto-generated constructor stub
index 982afb256264b6a56a8d1a8a681f8e6a33bc0175..454fb9f7b93da6a8a2343e047b8e6afb1ab63e9b 100644 (file)
@@ -73,7 +73,6 @@ public class ThemeChangeOnTheFly extends AbstractTestUIWithLog {
         gl.setHeight("800px");
 
         HorizontalLayout images = new HorizontalLayout();
-        images.setSpacing(true);
 
         Label l = new Label("Chameleon theme image in caption");
         l.setIcon(new ThemeResource("img/magnifier.png"));
@@ -90,7 +89,10 @@ public class ThemeChangeOnTheFly extends AbstractTestUIWithLog {
         getLayout().setSpacing(true);
 
         Window w = new Window();
-        w.setContent(new VerticalLayout(new Button("Button in window")));
+        VerticalLayout content = new VerticalLayout(new Button("Button in window"));
+        content.setSpacing(false);
+        content.setMargin(false);
+        w.setContent(content);
         addWindow(w);
     }
 
index 7a54385fd4baf1f3ddf67819ad48e5e82aa50c77..0beca074e63d093a88819ec6b682e58748ee2cbc 100644 (file)
@@ -25,14 +25,13 @@ import com.vaadin.ui.themes.ValoTheme;
 
 public class Accordions extends VerticalLayout implements View {
     public Accordions() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Accordions");
         h1.addStyleName(ValoTheme.LABEL_H1);
         addComponent(h1);
 
         HorizontalLayout row = new HorizontalLayout();
-        row.setSpacing(true);
         row.setWidth("100%");
         addComponent(row);
 
index 4b5a8a56615fdf91c629ee54ceae195b8fafbb22..a8f733d3e14fb329a5414c5ba82a0c5b737985cd 100644 (file)
@@ -37,7 +37,7 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
     *
     */
     public ButtonsAndLinks() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Buttons");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -45,7 +45,6 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         Button button = new Button("Normal");
@@ -154,7 +153,6 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
 
         row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         Link link = new Link("vaadin.com",
index 788d9d29f73fa55e525eed86ab7481c84238c9b0..42c8521b86300d49ccbfcbfb57c67fddee9ea26f 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.v7.ui.OptionGroup;
 
 public class CheckBoxes extends VerticalLayout implements View {
     public CheckBoxes() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Check Boxes");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -35,7 +35,6 @@ public class CheckBoxes extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         CheckBox check = new CheckBox("Checked", true);
@@ -96,7 +95,6 @@ public class CheckBoxes extends VerticalLayout implements View {
 
         row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         OptionGroup options = new OptionGroup("Choose one, explicit width");
index 6370762e699e89fa20cb735b7cf1da71491c9d55..39db451bfec84eaab68dc849934154ec531a87ed 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.ui.VerticalLayout;
 
 public class ColorPickers extends VerticalLayout implements View {
     public ColorPickers() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Color Pickers");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -35,7 +35,6 @@ public class ColorPickers extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         TestIcon testIcon = new TestIcon(40);
index a5e273a4c12362d68f6b7cee7866e811c87ad6bd..c51e7552bd233e84b1bb3db01344f05d102df00d 100644 (file)
@@ -29,7 +29,7 @@ import com.vaadin.v7.ui.ComboBox;
 
 public class ComboBoxes extends VerticalLayout implements View {
     public ComboBoxes() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Combo Boxes");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -37,7 +37,6 @@ public class ComboBoxes extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         ComboBox combo = new ComboBox("Normal");
index 99c83a71322d0ba30004b22456f3847eb3eca4d3..e027fcf4a3249ed410684223b188ad6220ff4186 100644 (file)
@@ -53,7 +53,7 @@ import com.vaadin.ui.themes.ValoTheme;
 
 public class CommonParts extends VerticalLayout implements View {
     public CommonParts() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Common UI Elements");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -75,8 +75,6 @@ public class CommonParts extends VerticalLayout implements View {
         Panel p = new Panel("Loading Indicator");
         VerticalLayout content = new VerticalLayout();
         p.setContent(content);
-        content.setSpacing(true);
-        content.setMargin(true);
         content.addComponent(new Label(
                 "You can test the loading indicator by pressing the buttons."));
 
@@ -152,9 +150,6 @@ public class CommonParts extends VerticalLayout implements View {
             String styleString = "";
             TextField delay = new TextField();
             {
-                setSpacing(true);
-                setMargin(true);
-
                 title.setPlaceholder("Title for the notification");
                 title.addValueChangeListener(event -> {
                     if (title.getValue() == null
@@ -385,7 +380,6 @@ public class CommonParts extends VerticalLayout implements View {
         Panel p = new Panel("Tooltips");
         HorizontalLayout content = new HorizontalLayout() {
             {
-                setSpacing(true);
                 setMargin(true);
                 addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
 
index 96c14a26aac7b313da7f499ca6537af3088ab5ff..adce66063f07492f684082f4e0ff731968dc5402 100644 (file)
@@ -41,7 +41,7 @@ import com.vaadin.v7.data.util.PropertysetItem;
 
 public class DateFields extends VerticalLayout implements View {
     public DateFields() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Date Fields");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -49,7 +49,6 @@ public class DateFields extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         AbstractDateField date = new TestDateField("Default resolution");
index d4608a89bec169570c4128360b89361e5a813d68..547a78794bc6a8062d40bf906ebcab8bf19f99f8 100644 (file)
@@ -58,8 +58,6 @@ public class Dragging extends VerticalLayout implements View {
     SortableLayout sample;
 
     public Dragging() {
-        setMargin(true);
-        setSpacing(true);
 
         Label h1 = new Label("Dragging Components");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -152,6 +150,8 @@ public class Dragging extends VerticalLayout implements View {
         components.add(documentLayout);
 
         final VerticalLayout buttonLayout = new VerticalLayout();
+        buttonLayout.setSpacing(false);
+        buttonLayout.setMargin(false);
         final Button button = new Button("Button");
         button.addClickListener(new Button.ClickListener() {
             @Override
@@ -238,6 +238,7 @@ public class Dragging extends VerticalLayout implements View {
         public SortableLayout() {
             layout = new HorizontalLayout();
             layout.setMargin(true);
+            layout.setSpacing(false);
             dropHandler = new ReorderLayoutDropHandler(layout);
 
             // final DragAndDropWrapper pane = new DragAndDropWrapper(layout);
index 40b6ab86e700861d57089cd88b0d8ffe1f4ab407..4bb84bcd37d36458f6c2120b2a12a99a75019698 100644 (file)
@@ -32,7 +32,7 @@ import com.vaadin.ui.themes.ValoTheme;
  */
 public class Labels extends VerticalLayout implements View {
     public Labels() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Labels");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -40,9 +40,11 @@ public class Labels extends VerticalLayout implements View {
 
         HorizontalLayout split = new HorizontalLayout();
         split.setWidth("100%");
+        split.setSpacing(false);
         addComponent(split);
 
         VerticalLayout left = new VerticalLayout();
+        left.setSpacing(false);
         left.setMargin(new MarginInfo(false, true, false, false));
         split.addComponent(left);
 
@@ -95,8 +97,6 @@ public class Labels extends VerticalLayout implements View {
         split.addComponent(p);
 
         VerticalLayout right = new VerticalLayout();
-        right.setSpacing(true);
-        right.setMargin(true);
         p.setContent(right);
 
         Label label = new Label(
index 65fd66a3533d52382725564ec0e73f08787c7819..16778def613048709dc8b20854f31eb3b1d65b2a 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.v7.ui.TwinColSelect;
 
 public class NativeSelects extends VerticalLayout implements View {
     public NativeSelects() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Selects");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -35,7 +35,6 @@ public class NativeSelects extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         NativeSelect select = new NativeSelect("Drop Down Select");
index cbd104071886fe4385db2837c48bf5382f926946..06ec25e653e3575bcdf41facff076c35a5bd2aaa 100644 (file)
@@ -31,7 +31,7 @@ import com.vaadin.ui.VerticalLayout;
 
 public class Panels extends VerticalLayout implements View {
     public Panels() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Panels & Layout panels");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -39,7 +39,6 @@ public class Panels extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
         TestIcon testIcon = new TestIcon(60);
 
@@ -104,6 +103,7 @@ public class Panels extends VerticalLayout implements View {
         layout.addStyleName(ValoTheme.LAYOUT_CARD);
         row.addComponent(layout);
         HorizontalLayout panelCaption = new HorizontalLayout();
+        panelCaption.setSpacing(false);
         panelCaption.addStyleName("v-panel-caption");
         panelCaption.setWidth("100%");
         // panelCaption.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
@@ -143,8 +143,6 @@ public class Panels extends VerticalLayout implements View {
     Component panelContent() {
         VerticalLayout layout = new VerticalLayout();
         layout.setSizeFull();
-        layout.setMargin(true);
-        layout.setSpacing(true);
         Label content = new Label(
                 "Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio.");
         content.setWidth("10em");
@@ -157,8 +155,6 @@ public class Panels extends VerticalLayout implements View {
 
     Component panelContentScroll() {
         VerticalLayout layout = new VerticalLayout();
-        layout.setMargin(true);
-        layout.setSpacing(true);
         Label content = new Label(
                 "Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio. Suspendisse dictum feugiat nisl ut dapibus. Mauris iaculis porttitor posuere. Praesent id metus massa, ut blandit odio.");
         content.setWidth("10em");
index 3e8d87b3534f82a7babb58ac1b09b9f598ddeae4..fdd9619849caf1e67543e4bda523a4a6e415effc 100644 (file)
@@ -28,7 +28,7 @@ import com.vaadin.ui.VerticalLayout;
 
 public class PopupViews extends VerticalLayout implements View {
     public PopupViews() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Popup Views");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -36,7 +36,6 @@ public class PopupViews extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         PopupView pv = new PopupView(new Content() {
@@ -44,7 +43,7 @@ public class PopupViews extends VerticalLayout implements View {
             public Component getPopupComponent() {
                 return new VerticalLayout() {
                     {
-                        setMargin(true);
+                        setSpacing(false);
                         setWidth("300px");
                         addComponent(new Label(
                                 "Fictum,  deserunt mollit anim laborum astutumque! Magna pars studiorum, prodita quaerimus."));
@@ -73,7 +72,7 @@ public class PopupViews extends VerticalLayout implements View {
                 }
                 return new VerticalLayout() {
                     {
-                        setMargin(true);
+                        setSpacing(false);
                         addComponent(
                                 new Label(
                                         "<h3>Thanks for waiting!</h3><p>You've opened this popup <b>"
index 58a66f37b8463a7527995a0aebd2edfbff81cb70..1e4aeefe43ccfcf6483fcd4672013754f603f5c5 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.ui.themes.ValoTheme;
 
 public class Sliders extends VerticalLayout implements View {
     public Sliders() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Sliders");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -35,7 +35,6 @@ public class Sliders extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         Slider slider = new Slider("Horizontal");
@@ -143,7 +142,6 @@ public class Sliders extends VerticalLayout implements View {
 
         row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         pb = new ProgressBar();
index e113cf677e8039eb3942827d8f50516a80032aa0..171c81c24f9ded189f448f66feea9904d06bc13b 100644 (file)
@@ -27,7 +27,7 @@ import com.vaadin.ui.themes.ValoTheme;
 
 public class SplitPanels extends VerticalLayout implements View {
     public SplitPanels() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Split Panels");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -40,7 +40,6 @@ public class SplitPanels extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         row.setMargin(new MarginInfo(true, false, false, false));
         addComponent(row);
 
@@ -82,7 +81,7 @@ public class SplitPanels extends VerticalLayout implements View {
     VerticalLayout getContent() {
         return new VerticalLayout() {
             {
-                setMargin(true);
+                setSpacing(false);
                 Label label = new Label(
                         "Fictum,  deserunt mollit anim laborum astutumque!");
                 label.setWidth("100%");
index 309a627dbc59cd2bc543e701dd5918fe3c599cc7..2848b51d87808160de561b9f5be4754d203d5c2e 100644 (file)
@@ -34,14 +34,13 @@ public class Tabsheets extends VerticalLayout implements View {
     TabSheet tabs;
 
     public Tabsheets() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Tabs");
         h1.addStyleName(ValoTheme.LABEL_H1);
         addComponent(h1);
 
         HorizontalLayout wrap = new HorizontalLayout();
-        wrap.setSpacing(true);
         wrap.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
         addComponent(wrap);
 
@@ -65,7 +64,6 @@ public class Tabsheets extends VerticalLayout implements View {
         addComponent(h3);
 
         wrap = new HorizontalLayout();
-        wrap.setSpacing(true);
         wrap.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
         wrap.setMargin(new MarginInfo(false, false, true, false));
         addComponent(wrap);
@@ -143,8 +141,6 @@ public class Tabsheets extends VerticalLayout implements View {
                     ? sg.nextString(true) + " " + sg.nextString(false) : null;
 
             VerticalLayout content = new VerticalLayout();
-            content.setMargin(true);
-            content.setSpacing(true);
             content.addComponent(new Label("Content for tab " + i));
             if (i == 2) {
                 content.addComponent(new Label(
index a62634512857ad96b5b954e1be3353700e5d4976..e9df9774aaa64167cbfd0938683062745d403e29 100644 (file)
@@ -34,7 +34,7 @@ public class TextFields extends VerticalLayout implements View {
     private TestIcon testIcon = new TestIcon(140);
 
     public TextFields() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Text Fields");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -42,7 +42,6 @@ public class TextFields extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         TextField tf = new TextField("Normal");
@@ -199,7 +198,6 @@ public class TextFields extends VerticalLayout implements View {
 
         row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         TextArea ta = new TextArea("Normal");
index a34455dfc40e9dd46a0909d1dcd62b0ea4d959e0..e0558f68b6c9c0cc87d4bd78f0399c09caa68358 100644 (file)
@@ -32,7 +32,7 @@ import com.vaadin.v7.ui.Tree.TreeDragMode;
 
 public class Trees extends VerticalLayout implements View {
     public Trees() {
-        setMargin(true);
+        setSpacing(false);
 
         Label h1 = new Label("Trees");
         h1.addStyleName(ValoTheme.LABEL_H1);
@@ -40,7 +40,6 @@ public class Trees extends VerticalLayout implements View {
 
         HorizontalLayout row = new HorizontalLayout();
         row.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);
-        row.setSpacing(true);
         addComponent(row);
 
         Tree tree = new Tree();
index 630014ac8af2b6eb50489824596bce913033d700..b6712681c71ed72339df24573ced0b1bd5270e18 100644 (file)
@@ -34,6 +34,7 @@ public class ValoMenuLayout extends HorizontalLayout {
 
     public ValoMenuLayout() {
         setSizeFull();
+        setSpacing(false);
 
         menuArea.setPrimaryStyleName(ValoTheme.MENU_ROOT);
 
index b389d545b6671c5d931b5e36a9899f934f178b06..59b1dbbeefff63b0ccab89d354396ac9091886d3 100644 (file)
@@ -240,6 +240,7 @@ public class ValoThemeUI extends UI {
 
         HorizontalLayout top = new HorizontalLayout();
         top.setWidth("100%");
+        top.setSpacing(false);
         top.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
         top.addStyleName(ValoTheme.MENU_TITLE);
         menu.addComponent(top);
index 5c1391e9328bd7a8bb33777b3c662dbd05e2cd31..01b290711a97acf2ce38f30ec5d3e5bb83016cfc 100644 (file)
@@ -13,6 +13,8 @@ public class Log extends VerticalLayout {
     private int nextLogNr = 1;
 
     public Log(int nr) {
+        setSpacing(false);
+        setMargin(false);
         for (int i = 0; i < nr; i++) {
             Label l = createEventLabel();
             l.setId("Log_row_" + i);
index 53e585120efc3db36cf41062ca27198279ab080c..13cc3605a934cac60faffad235bd501a0cbf7770 100644 (file)
@@ -16,6 +16,8 @@ public class InitiallyDisabledGrid extends UI {
     @Override
     protected void init(VaadinRequest request) {
         VerticalLayout layout = new VerticalLayout();
+        layout.setMargin(false);
+        layout.setSpacing(false);
         setContent(layout);
         layout.setSizeFull();
         layout.setWidth("600px");
index 330bad00d355daf560a8bd2ea704bf3ba97588c0..2651bb43ed38fcb7e84a512261cdc59ce790cd8b 100644 (file)
@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <html>
  <body>
-  <v-vertical-layout size-auto="true">
+  <v-vertical-layout size-auto="true" margin="false" spacing="false">
   <v-vertical-layout spacing="true" size-auto="true" margin="true">
 
    <v-css-layout _id="narrow" caption="801-1100px = narrow menu" width="801px" height="200px">
-    <v-horizontal-layout style-name="valo-menu-responsive" responsive="true" size-full="true">
+    <v-horizontal-layout style-name="valo-menu-responsive" responsive="true" size-full="true" spacing="false">
      <v-css-layout style-name="valo-menu">
       <v-css-layout style-name="valo-menu-part">
-       <v-horizontal-layout style-name="valo-menu-title" width-full="true" >
+       <v-horizontal-layout style-name="valo-menu-title" width-full="true" spacing="false">
         <v-label size-auto="true"  :middle="" :expand="">
           The
          <strong>Application</strong>
    </v-css-layout>
    
    <v-css-layout _id="wide" caption="Over 1100px = wide menu" width="1101px" height="200px">
-    <v-horizontal-layout style-name="valo-menu-responsive" responsive="true" size-full="true">
+    <v-horizontal-layout style-name="valo-menu-responsive" responsive="true" size-full="true" spacing="false">
      <v-css-layout style-name="valo-menu">
       <v-css-layout style-name="valo-menu-part">
-       <v-horizontal-layout style-name="valo-menu-title" width-full="true" >
+       <v-horizontal-layout style-name="valo-menu-title" width-full="true"  spacing="false">
         <v-label size-auto="true"  :middle="" :expand="">
           The
          <strong>Application</strong>
      <v-vertical-layout spacing="true" margin="true"  :expand=""></v-vertical-layout>
     </v-horizontal-layout>
    </v-css-layout>
- </v-vertical-layout>  
+ </v-vertical-layout>
       <v-css-layout _id="collapsed" caption="Collapsed menu w/ hover" width="500px" height="200px">
-    <v-horizontal-layout style-name="valo-menu-responsive" responsive="true" size-full="true">
+    <v-horizontal-layout style-name="valo-menu-responsive" responsive="true" size-full="true"  spacing="false">
      <v-css-layout style-name="valo-menu valo-menu-hover">
       <v-css-layout style-name="valo-menu-part">
-       <v-horizontal-layout style-name="valo-menu-title" width-full="true">
+       <v-horizontal-layout style-name="valo-menu-title" width-full="true"  spacing="false">
         <v-label size-auto="true" :middle="" :expand="">
           The
          <strong>Application</strong>