public static FormLayout.LayoutInfo getLayoutInfo(LayoutPanel layoutPanel) {
if (!(layoutPanel.getLayout() instanceof FormLayout)) {
throw new IllegalArgumentException(
"The container must use an instance of FormLayout.");
}
FormLayout layout = (FormLayout) layoutPanel.getLayout();
return layout.getLayoutInfo(layoutPanel);
}