From b179103e8fd82d8b67d87799290e2d5f6aa62ff1 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Fri, 4 Apr 2014 09:48:37 +0300 Subject: Adds methods for setting only width or height undefined #13546 Change-Id: Ieebe48c75370c0744a2a2619e1ed81dbd090a544 --- server/src/com/vaadin/ui/AbstractComponent.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server/src/com/vaadin/ui') diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index d0406c3eb7..d980c27916 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -825,7 +825,27 @@ public abstract class AbstractComponent extends AbstractClientConnector */ @Override public void setSizeUndefined() { + setWidthUndefined(); + setHeightUndefined(); + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.server.Sizeable#setWidthUndefined() + */ + @Override + public void setWidthUndefined() { setWidth(-1, Unit.PIXELS); + } + + /* + * (non-Javadoc) + * + * @see com.vaadin.server.Sizeable#setHeightUndefined() + */ + @Override + public void setHeightUndefined() { setHeight(-1, Unit.PIXELS); } -- cgit v1.2.3