From: Artur Signell Date: Mon, 20 Jan 2014 18:35:41 +0000 (+0200) Subject: Add deprecated expand ratio methods to FormLayout (#12876) X-Git-Tag: 7.1.11~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3897025e537f65e484078d4cbfbea1500ba6368b;p=vaadin-framework.git 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 --- 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); + } }