aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorIlia Motornyi <elmot@vaadin.com>2016-12-12 17:44:54 +0200
committerGitHub <noreply@github.com>2016-12-12 17:44:54 +0200
commit95a61630bb71237acc9614d492ba13939dba146c (patch)
treebeeeb9b83b3a7b0e2c70e0df28979ef48af4355b /shared
parente63b51a831676bdcc15b889c1636c0dcccbc0bc0 (diff)
downloadvaadin-framework-95a61630bb71237acc9614d492ba13939dba146c.tar.gz
vaadin-framework-95a61630bb71237acc9614d492ba13939dba146c.zip
VerticalLayout has spacing = true and margin = true by default .
HorizontalLayout has spacing = true and margin = false by default. Fixes vaadin/framework8-issues#526
Diffstat (limited to 'shared')
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java11
1 files changed, 11 insertions, 0 deletions
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