Search in sources :

Example 1 with PaletteGroup

use of org.kie.workbench.common.stunner.core.client.components.palette.PaletteGroup in project kie-wb-common by kiegroup.

the class DefinitionPaletteCategoryWidget method renderItems.

private void renderItems(final List<DefaultPaletteItem> items, final ShapeFactory<?, ?> shapeFactory) {
    if (items != null && !items.isEmpty()) {
        items.forEach(item -> {
            if (item instanceof PaletteGroup) {
                renderGroup((DefaultPaletteGroup) item, shapeFactory);
            } else {
                DefinitionPaletteItemWidget categoryItemWidget = definitionPaletteItemWidgetInstance.get();
                categoryItemWidget.initialize(item, shapeFactory, itemMouseDownCallback);
                view.addItem(categoryItemWidget);
            }
        });
    }
}
Also used : DefinitionPaletteItemWidget(org.kie.workbench.common.stunner.client.widgets.palette.categories.items.DefinitionPaletteItemWidget) DefaultPaletteGroup(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteGroup) PaletteGroup(org.kie.workbench.common.stunner.core.client.components.palette.PaletteGroup)

Aggregations

DefinitionPaletteItemWidget (org.kie.workbench.common.stunner.client.widgets.palette.categories.items.DefinitionPaletteItemWidget)1 DefaultPaletteGroup (org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteGroup)1 PaletteGroup (org.kie.workbench.common.stunner.core.client.components.palette.PaletteGroup)1