aboutsummaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorTeppo Kurki <teppo.kurki@vaadin.com>2015-06-11 13:40:30 +0300
committerVaadin Code Review <review@vaadin.com>2015-06-11 14:35:58 +0000
commit40bfdbf83d2e622aa826c8b66f3e2ad7d29ddb6b (patch)
tree85bacb36c661dfa794f5a8aee50450ccc944d128 /server/src
parentf50b536d99cae402a604550a3493f111bab955da (diff)
downloadvaadin-framework-40bfdbf83d2e622aa826c8b66f3e2ad7d29ddb6b.tar.gz
vaadin-framework-40bfdbf83d2e622aa826c8b66f3e2ad7d29ddb6b.zip
Adds margin support to GridLayout declarative format (#18238)
Change-Id: I5561ccf38f6bac3a304f6e8ab6262cb8bd391021
Diffstat (limited to 'server/src')
-rw-r--r--server/src/com/vaadin/ui/GridLayout.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java
index 96b58d7e67..6ccb272704 100644
--- a/server/src/com/vaadin/ui/GridLayout.java
+++ b/server/src/com/vaadin/ui/GridLayout.java
@@ -1317,6 +1317,8 @@ public class GridLayout extends AbstractLayout implements
public void readDesign(Element design, DesignContext designContext) {
super.readDesign(design, designContext);
+ setMargin(readMargin(design, getMargin(), designContext));
+
// Prepare a 2D map for reading column contents
Elements rowElements = design.getElementsByTag("row");
List<Map<Integer, Component>> rows = new ArrayList<Map<Integer, Component>>();
@@ -1447,6 +1449,9 @@ public class GridLayout extends AbstractLayout implements
super.writeDesign(design, designContext);
GridLayout def = designContext.getDefaultInstance(this);
+
+ writeMargin(design, getMargin(), def.getMargin(), designContext);
+
if (components.isEmpty()
|| !designContext.shouldWriteChildren(this, def)) {
return;