diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2016-12-12 17:44:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 17:44:54 +0200 |
commit | 95a61630bb71237acc9614d492ba13939dba146c (patch) | |
tree | beeeb9b83b3a7b0e2c70e0df28979ef48af4355b /shared | |
parent | e63b51a831676bdcc15b889c1636c0dcccbc0bc0 (diff) | |
download | vaadin-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.java | 11 |
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 |