aboutsummaryrefslogtreecommitdiffstats
path: root/shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'shared/src')
-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