public void populate(FormItemRepresentation rep) throws FormBuilderException {
if (!(rep instanceof TabbedPanelRepresentation)) {
throw new FormBuilderException(i18n.RepNotOfType(rep.getClass().getName(), "TabbedPanelRepresentation"));
}
super.populate(rep);
TabbedPanelRepresentation trep = (TabbedPanelRepresentation) rep;
this.cssClassName = trep.getCssClassName();
this.id = trep.getId();
this.tabWidth = trep.getTabWidth();
this.titles.clear();
for (TabbedPanelRepresentation.IndexedString title : trep.getTabTitles()) {
TabLabelFormItem label = new TabLabelFormItem(getFormEffects());
label.getLabel().setText(title.getString());
if (this.tabWidth != null && !"".equals(tabWidth)) {
label.setWidth(this.tabWidth);
}
FormItemRepresentation subRep = trep.getTabContents().get(title);
FlowLayoutFormItem subItem = (FlowLayoutFormItem) FBFormItem.createItem(subRep);
if (this.cssClassName != null && !"".equals(this.cssClassName)) {
subItem.setStyleName(this.cssClassName);
}
this.tabs.add(subItem);