use of org.uberfire.ext.widgets.common.client.common.DecoratedDisclosurePanel in project drools-wb by kiegroup.
the class GuidedScoreCardEditor method setContent.
public void setContent(final ScoreCardModel model, final AsyncPackageDataModelOracle oracle) {
this.model = model;
this.oracle = oracle;
final DecoratedDisclosurePanel disclosurePanel = new DecoratedDisclosurePanel(GuidedScoreCardConstants.INSTANCE.scoreCardTitle0(model.getName()));
disclosurePanel.setWidth("100%");
disclosurePanel.setTitle(GuidedScoreCardConstants.INSTANCE.scorecard());
disclosurePanel.setOpen(true);
final DecoratedDisclosurePanel configPanel = new DecoratedDisclosurePanel(GuidedScoreCardConstants.INSTANCE.setupParameters());
configPanel.setWidth("95%");
configPanel.setOpen(true);
configPanel.add(getScorecardProperties());
final DecoratedDisclosurePanel ruleAttributesPanel = new DecoratedDisclosurePanel(GuidedScoreCardConstants.INSTANCE.ruleAttributes());
ruleAttributesPanel.setWidth("95%");
ruleAttributesPanel.setOpen(false);
ruleAttributesPanel.add(getRuleAttributesPanel());
final DecoratedDisclosurePanel characteristicsPanel = new DecoratedDisclosurePanel(GuidedScoreCardConstants.INSTANCE.characteristics());
characteristicsPanel.setOpen(model.getCharacteristics().size() > 0);
characteristicsPanel.setWidth("95%");
characteristicsPanel.add(getCharacteristics());
final VerticalPanel config = new VerticalPanel();
config.setWidth("100%");
config.add(ruleAttributesPanel);
config.add(configPanel);
config.add(characteristicsPanel);
disclosurePanel.add(config);
container.setWidget(disclosurePanel);
characteristicsAttrMap.clear();
characteristicsAttrPanelMap.clear();
for (final Characteristic characteristic : model.getCharacteristics()) {
final FlexTable flexTable = addCharacteristic(characteristic);
for (Attribute attribute : characteristic.getAttributes()) {
addAttribute(flexTable, attribute);
}
}
}
Aggregations