diff options
author | patrik <patrik@vaadin.com> | 2015-04-07 13:31:32 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-04-07 11:53:09 +0000 |
commit | 0f1dcd23a0bffae76fc312d95d7b64bf7861df88 (patch) | |
tree | 912b142a7dc7310cff55ee4781daa77b8ed9bac3 /server/src/com/vaadin/ui/AbstractComponent.java | |
parent | a9a48519ef306db52be20b2d302887ee8783c398 (diff) | |
download | vaadin-framework-0f1dcd23a0bffae76fc312d95d7b64bf7861df88.tar.gz vaadin-framework-0f1dcd23a0bffae76fc312d95d7b64bf7861df88.zip |
Enable setResponsive/isReponsive API for AbstractComponent (#17369)
Change-Id: I2fb48bff5e55d3d494d9fa927305447dc0c4d816
Diffstat (limited to 'server/src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponent.java | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index ebe438b908..dae073904b 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -982,11 +982,6 @@ public abstract class AbstractComponent extends AbstractClientConnector Integer.class)); } - // handle responsive - if (attr.hasKey("responsive")) { - setResponsive(DesignAttributeHandler.getFormatter().parse( - attr.get("responsive"), Boolean.class)); - } // check for unsupported attributes Set<String> supported = new HashSet<String>(); supported.addAll(getDefaultAttributes()); @@ -1032,11 +1027,11 @@ public abstract class AbstractComponent extends AbstractClientConnector /** * Toggles responsiveness of this component. * - * @since 7.4 + * @since * @param responsive * boolean enables responsiveness, false disables */ - private void setResponsive(boolean responsive) { + public void setResponsive(boolean responsive) { if (responsive) { // make responsive if necessary if (!isResponsive()) { @@ -1057,10 +1052,10 @@ public abstract class AbstractComponent extends AbstractClientConnector /** * Returns true if the component is responsive * - * @since 7.4 + * @since * @return true if the component is responsive */ - private boolean isResponsive() { + public boolean isResponsive() { for (Extension e : getExtensions()) { if (e instanceof Responsive) { return true; @@ -1233,8 +1228,8 @@ public abstract class AbstractComponent extends AbstractClientConnector private static final String[] customAttributes = new String[] { "width", "height", "debug-id", "error", "width-auto", "height-auto", - "width-full", "height-full", "size-auto", "size-full", - "responsive", "immediate", "locale", "read-only", "_id" }; + "width-full", "height-full", "size-auto", "size-full", "immediate", + "locale", "read-only", "_id" }; /* * (non-Javadoc) @@ -1280,10 +1275,6 @@ public abstract class AbstractComponent extends AbstractClientConnector ((Focusable) def).getTabIndex(), Integer.class); } - // handle responsive - if (isResponsive()) { - attr.put("responsive", ""); - } } /* |