From 3897025e537f65e484078d4cbfbea1500ba6368b Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 20 Jan 2014 20:35:41 +0200 Subject: [PATCH] Add deprecated expand ratio methods to FormLayout (#12876) FormLayout has never implemented expand ratios but does not tell the developer about it either. Throwing an UnsupportedOperationException would make this very clear but at the same time would break existing applications which use the methods or which handle AbstractOrderedLayouts in a generic way. Change-Id: I0208f91c3c07aff98a78153887fbbea9dbc1d3d1 --- server/src/com/vaadin/ui/FormLayout.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/src/com/vaadin/ui/FormLayout.java b/server/src/com/vaadin/ui/FormLayout.java index 9d5e637068..9dc0b24cad 100644 --- a/server/src/com/vaadin/ui/FormLayout.java +++ b/server/src/com/vaadin/ui/FormLayout.java @@ -52,4 +52,23 @@ public class FormLayout extends AbstractOrderedLayout { addComponents(children); } + /** + * @deprecated This method currently has no effect as expand ratios are not + * implemented in FormLayout + */ + @Override + @Deprecated + public void setExpandRatio(Component component, float ratio) { + super.setExpandRatio(component, ratio); + } + + /** + * @deprecated This method currently has no effect as expand ratios are not + * implemented in FormLayout + */ + @Override + @Deprecated + public float getExpandRatio(Component component) { + return super.getExpandRatio(component); + } } -- 2.39.5