public void populate(FormItemRepresentation rep) throws FormBuilderException {
if (!(rep instanceof HorizontalPanelRepresentation)) {
throw new FormBuilderException(i18n.RepNotOfType(rep.getClass().getName(), "HorizontalPanelRepresentation"));
}
super.populate(rep);
HorizontalPanelRepresentation hrep = (HorizontalPanelRepresentation) rep;
this.borderWidth = hrep.getBorderWidth();
this.cssClassName = hrep.getCssClassName();
this.horizontalAlignment = hrep.getHorizontalAlignment();
this.id = hrep.getId();
this.spacing = hrep.getSpacing();
this.title = hrep.getTitle();
this.verticalAlignment = hrep.getVerticalAlignment();
this.panel.clear();
super.getItems().clear();
populate(this.panel);
if (hrep.getItems() != null) {
for (FormItemRepresentation item : hrep.getItems()) {
add(super.createItem(item));
}
}
}