}
public int getPaddingRight(Element element) {
- return getMeasuredSize(element, null).getPaddingRight();
+ return getMeasuredSize(element, nullSize).getPaddingRight();
+ }
+
+ public int getMarginTop(Element element) {
+ return getMeasuredSize(element, nullSize).getMarginTop();
+ }
+
+ public int getMarginRight(Element element) {
+ return getMeasuredSize(element, nullSize).getMarginRight();
+ }
+
+ public int getMarginBottom(Element element) {
+ return getMeasuredSize(element, nullSize).getMarginBottom();
+ }
+
+ public int getMarginLeft(Element element) {
+ return getMeasuredSize(element, nullSize).getMarginLeft();
}
}
import com.vaadin.terminal.gwt.client.ComponentConnector;
import com.vaadin.terminal.gwt.client.ComponentState;
import com.vaadin.terminal.gwt.client.ConnectorMap;
+import com.vaadin.terminal.gwt.client.LayoutManager;
import com.vaadin.terminal.gwt.client.UIDL;
public class FormConnector extends AbstractComponentContainerConnector
public void layout() {
VForm form = getWidget();
- int footerHeight = getLayoutManager().getOuterHeight(
- form.footerContainer);
+ LayoutManager lm = getLayoutManager();
+ int footerHeight = lm.getOuterHeight(form.footerContainer)
+ - lm.getMarginTop(form.footerContainer);
form.fieldContainer.getStyle().setPaddingBottom(footerHeight, Unit.PX);
form.footerContainer.getStyle().setMarginTop(-footerHeight, Unit.PX);