summaryrefslogtreecommitdiffstats
path: root/shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'shared/src')
-rw-r--r--shared/src/com/vaadin/shared/ui/ComponentStateUtil.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java b/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java
index a7b3d5a281..5e6700b425 100644
--- a/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java
+++ b/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java
@@ -26,6 +26,14 @@ public final class ComponentStateUtil {
return state.styles != null && !state.styles.isEmpty();
}
+ public static final boolean isRelativeWidth(ComponentState state) {
+ return state.width != null && state.width.endsWith("%");
+ }
+
+ public static final boolean isRelativeHeight(ComponentState state) {
+ return state.height != null && state.height.endsWith("%");
+ }
+
/**
* Removes an event listener id.
*