use of com.ait.lienzo.client.core.event.NodeGestureEndHandler in project kie-wb-common by kiegroup.
the class ViewEventHandlerManager method registerGestureHandler.
protected HandlerRegistration[] registerGestureHandler(final GestureHandler gestureHandler) {
HandlerRegistration gestureStartReg = node.addNodeGestureStartHandler(new NodeGestureStartHandler() {
@Override
public void onNodeGestureStart(final NodeGestureStartEvent event) {
if (isEnabled()) {
final GestureEvent event1 = buildGestureEvent(event);
if (null != event1) {
gestureHandler.start(event1);
}
}
}
});
HandlerRegistration gestureChangeReg = node.addNodeGestureChangeHandler(new NodeGestureChangeHandler() {
@Override
public void onNodeGestureChange(final NodeGestureChangeEvent event) {
if (isEnabled()) {
final GestureEvent event1 = buildGestureEvent(event);
if (null != event1) {
gestureHandler.change(event1);
}
}
}
});
HandlerRegistration gestureEndReg = node.addNodeGestureEndHandler(new NodeGestureEndHandler() {
@Override
public void onNodeGestureEnd(final NodeGestureEndEvent event) {
if (isEnabled()) {
final GestureEvent event1 = buildGestureEvent(event);
if (null != event1) {
gestureHandler.end(event1);
}
}
}
});
return new HandlerRegistration[] { gestureStartReg, gestureChangeReg, gestureEndReg };
}
Aggregations