diff options
author | John Ahlroos <john@vaadin.com> | 2012-08-31 16:13:40 +0300 |
---|---|---|
committer | John Ahlroos <john@vaadin.com> | 2012-08-31 16:13:40 +0300 |
commit | 5abe444f28b89cc6c06cc178912a8fa3e03107c9 (patch) | |
tree | 15c67af25779901648e8440302dd75b1f76a2ebd /shared/src/com/vaadin | |
parent | 4e7104a68bafa96455518f006ad1ee310e185cd8 (diff) | |
download | vaadin-framework-5abe444f28b89cc6c06cc178912a8fa3e03107c9.tar.gz vaadin-framework-5abe444f28b89cc6c06cc178912a8fa3e03107c9.zip |
Add helper methods for checking state
Diffstat (limited to 'shared/src/com/vaadin')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/ComponentStateUtil.java | 8 |
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 556c46518f..dd2611f04b 100644 --- a/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java +++ b/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java @@ -18,6 +18,14 @@ public final class ComponentStateUtil { return state.height == null || "".equals(state.height); } + public static final boolean hasDescription(ComponentState state) { + return state.description != null && !"".equals(state.description); + } + + public static final boolean hasStyles(ComponentState state) { + return state.styles != null && !state.styles.isEmpty(); + } + /** * Removes an event listener id. * |