aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractLayout.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/HorizontalLayout.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/LegacyWindow.java5
-rw-r--r--server/src/main/java/com/vaadin/ui/VerticalLayout.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java34
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java2
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java11
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/TestBase.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/InitiallyDisabledGrid.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java54
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/Footer.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HeaderSyncOnScroll.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/ThemeTestUI.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/NotificationsCssTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowMaxHeight.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveLayoutUpdate.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChange.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAlignment.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java14
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HCaption.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/layouttester/VLayout/VCaption.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Accordions.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java8
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java3
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java1
-rw-r--r--uitest/src/main/java/com/vaadin/tests/util/Log.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/InitiallyDisabledGrid.java2
-rw-r--r--uitest/src/main/resources/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.html16
64 files changed, 190 insertions, 137 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractLayout.java b/server/src/main/java/com/vaadin/ui/AbstractLayout.java
index d4f8042355..fe073eb687 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractLayout.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractLayout.java
@@ -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);
diff --git a/server/src/main/java/com/vaadin/ui/HorizontalLayout.java b/server/src/main/java/com/vaadin/ui/HorizontalLayout.java
index 4682937ff5..07583c6712 100644
--- a/server/src/main/java/com/vaadin/ui/HorizontalLayout.java
+++ b/server/src/main/java/com/vaadin/ui/HorizontalLayout.java
@@ -33,7 +33,7 @@ public class HorizontalLayout extends AbstractOrderedLayout {
* Constructs an empty HorizontalLayout.
*/
public HorizontalLayout() {
-
+ setSpacing(true);
}
/**
diff --git a/server/src/main/java/com/vaadin/ui/LegacyWindow.java b/server/src/main/java/com/vaadin/ui/LegacyWindow.java
index 2705d56486..dda734899d 100644
--- a/server/src/main/java/com/vaadin/ui/LegacyWindow.java
+++ b/server/src/main/java/com/vaadin/ui/LegacyWindow.java
@@ -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);
}
diff --git a/server/src/main/java/com/vaadin/ui/VerticalLayout.java b/server/src/main/java/com/vaadin/ui/VerticalLayout.java
index 7fcf6d438a..d441e8a664 100644
--- a/server/src/main/java/com/vaadin/ui/VerticalLayout.java
+++ b/server/src/main/java/com/vaadin/ui/VerticalLayout.java
@@ -35,6 +35,8 @@ public class VerticalLayout extends AbstractOrderedLayout {
*/
public VerticalLayout() {
setWidth("100%");
+ setSpacing(true);
+ setMargin(true);
}
/**
diff --git a/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java b/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
index b264df1e1a..7aabfe4f7f 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/DeclarativeMarginTestBase.java
@@ -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 + " />";
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
index 9764692345..7e84bce54c 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstractorderedlayout/AbstractOrderedLayoutDeclarativeTest.java
@@ -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
diff --git a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
index a9003c23fc..43176a5ce8 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
@@ -38,7 +38,7 @@ public class GridLayoutDeclarativeTest
@Test
public void testMargins() {
- testMargins("vaadin-grid-layout");
+ testMargins("vaadin-grid-layout",false);
}
@Test
diff --git a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
index a3eada8f2f..9e958542d2 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java
@@ -149,6 +149,17 @@ public class MarginInfo implements Serializable {
}
/**
+ * 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.
*
* @return true if left edge margin is enabled
diff --git a/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
index e2e9488a1a..118f4e6b12 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/AbstractTestUI.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/TestBase.java b/uitest/src/main/java/com/vaadin/tests/components/TestBase.java
index 729e737cb7..6587a2dde3 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/TestBase.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/TestBase.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java b/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
index e0ebc9bf37..5c38d13d32 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/browserframe/BrowserFrameIsVisible.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java b/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
index 762d2d6489..ed79251be6 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/customfield/CustomFieldSize.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
index 1de7f1627a..09d16e1fd2 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/draganddropwrapper/DragStartModes.java
@@ -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(
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/InitiallyDisabledGrid.java b/uitest/src/main/java/com/vaadin/tests/components/grid/InitiallyDisabledGrid.java
index 74f69ef7ab..ddbbaa4d2e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/InitiallyDisabledGrid.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/InitiallyDisabledGrid.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
index bb88411fcd..d4e95b0b54 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java
index cc850f2f86..ffdb2a2fba 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/MoveComponentsFromGridLayoutToInnerLayout.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java b/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
index 161a0c471b..0bfe63761c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/layout/EmptySpaceOnPageAfterExpandedComponent.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java b/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
index 62b3dc5857..d8627911dc 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/panel/UndefinedSizeScrollbars.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
index 7e8ccf3fc8..96462b8888 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/slider/SliderResize.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
index 255b3dafca..4593f43b7a 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/splitpanel/SplitPanelWithMinimumAndMaximum.java
@@ -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() {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java b/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
index 185780606c..a0ebe6fa18 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/Footer.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderSyncOnScroll.java b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderSyncOnScroll.java
index 0a5d7e7107..6adf37fe4b 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HeaderSyncOnScroll.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HeaderSyncOnScroll.java
@@ -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%)",
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
index 264acaaac4..7d4126f38f 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableChildMeasurementHint.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
index 8b493ae146..bde56d2c21 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableSizeInTabsheet.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
index 91f5a5e0c1..0bb6ffcfd0 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabKeyboardNavigation.java
@@ -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));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/ThemeTestUI.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/ThemeTestUI.java
index a865b71452..7de0eaf083 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/ThemeTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/ThemeTestUI.java
@@ -21,7 +21,6 @@ public class ThemeTestUI extends AbstractReindeerTestUI {
createCustomStyleStringField();
HorizontalLayout selectors = new HorizontalLayout();
- selectors.setSpacing(true);
selectors.addComponent(customStyle);
selectors.addComponent(setStyleName);
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
index 9280faf600..81e0a9aa3d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/FormsCssTest.java
@@ -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()) {
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/NotificationsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/NotificationsCssTest.java
index 78ff89d5cb..3997c3ca4c 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/NotificationsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/NotificationsCssTest.java
@@ -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",
diff --git a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
index c65a40b946..86d5bff57e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/uitest/components/WindowsCssTest.java
@@ -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",
diff --git a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
index 9b5de2ed51..be75cd247d 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/upload/UploadImmediateButtonWidth.java
@@ -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"));
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java b/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
index 04f3d7c502..34a9fe6ae4 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/BottomComponentScrollsUp.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java b/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
index 4bdcf4f0f7..25861e0eab 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/ComboboxScrollableWindow.java
@@ -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<>();
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaxHeight.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaxHeight.java
index cb42e5f505..e3b66cb2bb 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaxHeight.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowMaxHeight.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveLayoutUpdate.java b/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveLayoutUpdate.java
index feff3aa3ea..d1dd1b73c5 100644
--- a/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveLayoutUpdate.java
+++ b/uitest/src/main/java/com/vaadin/tests/extensions/ResponsiveLayoutUpdate.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java b/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
index a2270f7925..c57f9e8f4b 100644
--- a/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/fonticon/FontIcons.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChange.java b/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChange.java
index d899309921..d75bab9fe2 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChange.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/gridlayout/GridLayoutWidthChange.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAlignment.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAlignment.java
index 841d77b650..c950a5cdaf 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAlignment.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseAlignment.java
@@ -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]);
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
index 7515ca4f9f..4d801fbf76 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/BaseLayoutTestUI.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HCaption.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HCaption.java
index c2492d72fc..0fc49efb77 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HCaption.java
@@ -20,9 +20,6 @@ import com.vaadin.ui.HorizontalLayout;
public class HCaption extends BaseCaption {
- /**
- * @param layoutClass
- */
public HCaption() {
super(HorizontalLayout.class);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java
index 9892531ac5..9c8b38714b 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/HLayout/HComponentSizing.java
@@ -26,9 +26,6 @@ import com.vaadin.ui.HorizontalLayout;
public class HComponentSizing extends BaseComponentSizing {
- /**
- * @param layoutClass
- */
public HComponentSizing() {
super(HorizontalLayout.class);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/VLayout/VCaption.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/VLayout/VCaption.java
index 4591b31108..c05fe3b3d2 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/VLayout/VCaption.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/VLayout/VCaption.java
@@ -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
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java b/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
index 982afb2562..454fb9f7b9 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/ThemeChangeOnTheFly.java
@@ -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);
}
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Accordions.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Accordions.java
index 7a54385fd4..0beca074e6 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Accordions.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Accordions.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
index 4b5a8a5661..a8f733d3e1 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
@@ -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",
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
index 788d9d29f7..42c8521b86 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CheckBoxes.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
index 6370762e69..39db451bfe 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ColorPickers.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
index a5e273a4c1..c51e7552bd 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ComboBoxes.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
index 99c83a7132..e027fcf4a3 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/CommonParts.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
index 96c14a26aa..adce66063f 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/DateFields.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
index d4608a89be..547a78794b 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Dragging.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
index 40b6ab86e7..4bb84bcd37 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Labels.java
@@ -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(
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
index 65fd66a353..16778def61 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/NativeSelects.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
index cbd1040718..06ec25e653 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Panels.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
index 3e8d87b353..fdd9619849 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/PopupViews.java
@@ -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>"
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
index 58a66f37b8..1e4aeefe43 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Sliders.java
@@ -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();
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
index e113cf677e..171c81c24f 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/SplitPanels.java
@@ -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%");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
index 309a627dbc..2848b51d87 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Tabsheets.java
@@ -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(
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
index a626345128..e9df9774aa 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/TextFields.java
@@ -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");
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
index a34455dfc4..e0558f68b6 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/Trees.java
@@ -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();
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
index 630014ac8a..b6712681c7 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoMenuLayout.java
@@ -34,6 +34,7 @@ public class ValoMenuLayout extends HorizontalLayout {
public ValoMenuLayout() {
setSizeFull();
+ setSpacing(false);
menuArea.setPrimaryStyleName(ValoTheme.MENU_ROOT);
diff --git a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
index b389d545b6..59b1dbbeef 100644
--- a/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
+++ b/uitest/src/main/java/com/vaadin/tests/themes/valo/ValoThemeUI.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/tests/util/Log.java b/uitest/src/main/java/com/vaadin/tests/util/Log.java
index 5c1391e932..01b290711a 100644
--- a/uitest/src/main/java/com/vaadin/tests/util/Log.java
+++ b/uitest/src/main/java/com/vaadin/tests/util/Log.java
@@ -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);
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/InitiallyDisabledGrid.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/InitiallyDisabledGrid.java
index 53e585120e..13cc3605a9 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/InitiallyDisabledGrid.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/InitiallyDisabledGrid.java
@@ -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");
diff --git a/uitest/src/main/resources/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.html b/uitest/src/main/resources/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.html
index 330bad00d3..2651bb43ed 100644
--- a/uitest/src/main/resources/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.html
+++ b/uitest/src/main/resources/com/vaadin/tests/themes/valo/ResponsiveStylesDesign.html
@@ -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>
@@ -30,10 +30,10 @@
</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>
@@ -53,12 +53,12 @@
<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>