use of org.kie.workbench.common.stunner.core.client.components.toolbox.actions.IsToolboxActionDraggable in project kie-wb-common by kiegroup.
the class AbstractActionsToolboxView method initButtons.
@SuppressWarnings("unchecked")
private void initButtons(final ActionsToolbox<ActionsToolboxView<?>> toolbox) {
for (ToolboxAction toolboxAction : toolbox) {
final ButtonItem button = addButton(toolbox.getGlyph(toolboxAction), toolbox.getTitle(toolboxAction));
button.onClick(event -> {
onButtonClick(toolbox, toolboxAction, button, event);
});
if (toolboxAction instanceof IsToolboxActionDraggable) {
button.onMoveStart(event -> {
onButtonMoveStart(toolbox, (IsToolboxActionDraggable) toolboxAction, button, event);
});
}
}
}
Aggregations