Search in sources :

Example 1 with OptGroup

use of org.gwtbootstrap3.extras.select.client.ui.OptGroup in project kie-wb-common by kiegroup.

the class DataTypePickerWidget method addBuiltInTypes.

void addBuiltInTypes() {
    final OptGroup group = GWT.create(OptGroup.class);
    group.setLabel(translationService.getTranslation(DMNEditorConstants.DataTypeSelectView_DefaultTitle));
    Stream.of(BuiltInType.values()).sorted(BUILT_IN_TYPE_COMPARATOR).map(this::makeTypeSelector).filter(Optional::isPresent).forEach(o -> group.add(o.get()));
    typeSelector.add(group);
}
Also used : OptGroup(org.gwtbootstrap3.extras.select.client.ui.OptGroup)

Example 2 with OptGroup

use of org.gwtbootstrap3.extras.select.client.ui.OptGroup in project kie-wb-common by kiegroup.

the class DataTypePickerWidget method addItemDefinitions.

void addItemDefinitions() {
    final Definitions definitions = dmnGraphUtils.getModelDefinitions();
    final List<ItemDefinition> itemDefinitions = definitions != null ? definitions.getItemDefinition() : Collections.emptyList();
    final OptGroup group = GWT.create(OptGroup.class);
    group.setLabel(translationService.getTranslation(DMNEditorConstants.DataTypeSelectView_CustomTitle));
    itemDefinitions.stream().sorted(ITEM_DEFINITION_COMPARATOR).map(this::makeTypeSelector).filter(Optional::isPresent).forEach(o -> group.add(o.get()));
    typeSelector.add(group);
}
Also used : Definitions(org.kie.workbench.common.dmn.api.definition.model.Definitions) ItemDefinition(org.kie.workbench.common.dmn.api.definition.model.ItemDefinition) OptGroup(org.gwtbootstrap3.extras.select.client.ui.OptGroup)

Aggregations

OptGroup (org.gwtbootstrap3.extras.select.client.ui.OptGroup)2 Definitions (org.kie.workbench.common.dmn.api.definition.model.Definitions)1 ItemDefinition (org.kie.workbench.common.dmn.api.definition.model.ItemDefinition)1