aboutsummaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorpatrik <patrik@vaadin.com>2015-04-08 10:00:57 +0300
committerpatrik <patrik@vaadin.com>2015-04-09 12:04:07 +0300
commit8a50c558bcee3ede27ff5553785065e23c74748d (patch)
tree45ad7a03d2b430840c8903fd0d208041df3e42c3 /shared
parenta1a154bcd56185ee1607d1d4ec0d50af3036cc08 (diff)
downloadvaadin-framework-8a50c558bcee3ede27ff5553785065e23c74748d.tar.gz
vaadin-framework-8a50c558bcee3ede27ff5553785065e23c74748d.zip
Add granular declarative margin support (#17190)
Change-Id: I36227feeeaf08f41a9d5c179547dfcb575a1fb09
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ui/MarginInfo.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/MarginInfo.java b/shared/src/com/vaadin/shared/ui/MarginInfo.java
index 3b1fece88a..4c0255a9ba 100644
--- a/shared/src/com/vaadin/shared/ui/MarginInfo.java
+++ b/shared/src/com/vaadin/shared/ui/MarginInfo.java
@@ -24,6 +24,7 @@ public class MarginInfo implements Serializable {
private static final int RIGHT = 2;
private static final int BOTTOM = 4;
private static final int LEFT = 8;
+ private static final int ALL = TOP | RIGHT | BOTTOM | LEFT;
private int bitMask;
@@ -51,6 +52,10 @@ public class MarginInfo implements Serializable {
bitMask = marginInfo.bitMask;
}
+ public boolean hasAll() {
+ return (bitMask & ALL) == ALL;
+ }
+
public boolean hasLeft() {
return (bitMask & LEFT) == LEFT;
}