public void layout() {
updateSizes();
}
void updateSizes() {
VPanel panel = getWidget();
LayoutManager layoutManager = getLayoutManager();
Profiler.enter("PanelConnector.layout getHeights");
int top = layoutManager.getOuterHeight(panel.captionNode);
int bottom = layoutManager.getInnerHeight(panel.bottomDecoration);
Profiler.leave("PanelConnector.layout getHeights");
Profiler.enter("PanelConnector.layout modify style");
Style style = panel.getElement().getStyle();
panel.captionNode.getParentElement().getStyle()
.setMarginTop(-top, Unit.PX);
panel.bottomDecoration.getStyle().setMarginBottom(-bottom, Unit.PX);
style.setPaddingTop(top, Unit.PX);
style.setPaddingBottom(bottom, Unit.PX);