use of org.kie.workbench.common.stunner.lienzo.toolbox.items.DecoratorItem in project kie-wb-common by kiegroup.
the class ButtonGridItemImpl method decorateGrid.
@Override
public ButtonGridItemImpl decorateGrid(final DecoratorItem<?> decorator) {
removeDecoratorHandlers();
toolbox.decorate(decorator);
if (decorator instanceof AbstractDecoratorItem) {
final AbstractDecoratorItem instance = (AbstractDecoratorItem) decorator;
decoratorHandlers[0] = instance.asPrimitive().setListening(true).addNodeMouseEnterHandler(event -> itemFocusCallback.execute());
decoratorHandlers[1] = instance.asPrimitive().addNodeMouseExitHandler(event -> itemUnFocusCallback.execute());
registrations().register(decoratorHandlers[0]);
registrations().register(decoratorHandlers[1]);
}
return this;
}
Aggregations