@Test public void testShapeControlResizeHandlerMoveDividerEvents() { final MoveDividerControlHandle moveDividerControlHandle = getMoveDividerControlHandle(); view.addDividerDragHandler(dragHandler); moveDividerControlHandle.getControl().fireEvent(nodeDragStartEvent); verify(dragHandler).start(any(DragEvent.class)); moveDividerControlHandle.getControl().fireEvent(nodeDragMoveEvent); verify(dragHandler).handle(any(DragEvent.class)); moveDividerControlHandle.getControl().fireEvent(nodeDragEndEvent); verify(dragHandler).end(any(DragEvent.class)); }
public DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler) { final HandlerManager handlerManager = getHandlerManager(); final HandlerRegistration dragStartRegistration = handlerManager.addHandler(MoveDividerStartEvent.TYPE, event -> dragHandler.start(buildDragEvent(event))); final HandlerRegistration dragStepRegistration = handlerManager.addHandler(MoveDividerStepEvent.TYPE, event -> dragHandler.handle(buildDragEvent(event))); final HandlerRegistration dragEndRegistration = handlerManager.addHandler(MoveDividerEndEvent.TYPE, event -> dragHandler.end(buildDragEvent(event))); final HandlerRegistration[] registrations = new HandlerRegistration[]{dragStartRegistration, dragStepRegistration, dragEndRegistration}; getEventHandlerManager().addHandlersRegistration(ViewEventType.DRAG, registrations); return this; }
DecisionServiceSVGShapeView extends SVGShapeViewImpl { public DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler) { final HandlerManager handlerManager = getHandlerManager(); final HandlerRegistration dragStartRegistration = handlerManager.addHandler(MoveDividerStartEvent.TYPE, event -> dragHandler.start(buildDragEvent(event))); final HandlerRegistration dragStepRegistration = handlerManager.addHandler(MoveDividerStepEvent.TYPE, event -> dragHandler.handle(buildDragEvent(event))); final HandlerRegistration dragEndRegistration = handlerManager.addHandler(MoveDividerEndEvent.TYPE, event -> dragHandler.end(buildDragEvent(event))); final HandlerRegistration[] registrations = new HandlerRegistration[]{dragStartRegistration, dragStepRegistration, dragEndRegistration}; getEventHandlerManager().addHandlersRegistration(ViewEventType.DRAG, registrations); return this; } }
DecisionServiceSVGShapeView extends SVGShapeViewImpl { public DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler) { final HandlerManager handlerManager = getHandlerManager(); final HandlerRegistration dragStartRegistration = handlerManager.addHandler(MoveDividerStartEvent.TYPE, event -> dragHandler.start(buildDragEvent(event))); final HandlerRegistration dragStepRegistration = handlerManager.addHandler(MoveDividerStepEvent.TYPE, event -> dragHandler.handle(buildDragEvent(event))); final HandlerRegistration dragEndRegistration = handlerManager.addHandler(MoveDividerEndEvent.TYPE, event -> dragHandler.end(buildDragEvent(event))); final HandlerRegistration[] registrations = new HandlerRegistration[]{dragStartRegistration, dragStepRegistration, dragEndRegistration}; getEventHandlerManager().addHandlersRegistration(ViewEventType.DRAG, registrations); return this; } DecisionServiceSVGShapeView(final String name,
                                       final SVGPrimitiveShape svgPrimitive,
                                       final double width,
                                       final double height,
                                       final boolean resizable); }
DecisionServiceSVGShapeView extends SVGShapeViewImpl { public DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler) { final HandlerManager handlerManager = getHandlerManager(); final HandlerRegistration dragStartRegistration = handlerManager.addHandler(MoveDividerStartEvent.TYPE, event -> dragHandler.start(buildDragEvent(event))); final HandlerRegistration dragStepRegistration = handlerManager.addHandler(MoveDividerStepEvent.TYPE, event -> dragHandler.handle(buildDragEvent(event))); final HandlerRegistration dragEndRegistration = handlerManager.addHandler(MoveDividerEndEvent.TYPE, event -> dragHandler.end(buildDragEvent(event))); final HandlerRegistration[] registrations = new HandlerRegistration[]{dragStartRegistration, dragStepRegistration, dragEndRegistration}; getEventHandlerManager().addHandlersRegistration(ViewEventType.DRAG, registrations); return this; } DecisionServiceSVGShapeView(final String name,
                                       final SVGPrimitiveShape svgPrimitive,
                                       final double width,
                                       final double height,
                                       final boolean resizable); DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler); double getDividerLineY(); void setDividerLineY(final double y); @Override //Override to increase visibility for Unit Tests HandlerManager getHandlerManager(); @Override void destroy(); }
DecisionServiceSVGShapeView extends SVGShapeViewImpl { public DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler) { final HandlerManager handlerManager = getHandlerManager(); final HandlerRegistration dragStartRegistration = handlerManager.addHandler(MoveDividerStartEvent.TYPE, event -> dragHandler.start(buildDragEvent(event))); final HandlerRegistration dragStepRegistration = handlerManager.addHandler(MoveDividerStepEvent.TYPE, event -> dragHandler.handle(buildDragEvent(event))); final HandlerRegistration dragEndRegistration = handlerManager.addHandler(MoveDividerEndEvent.TYPE, event -> dragHandler.end(buildDragEvent(event))); final HandlerRegistration[] registrations = new HandlerRegistration[]{dragStartRegistration, dragStepRegistration, dragEndRegistration}; getEventHandlerManager().addHandlersRegistration(ViewEventType.DRAG, registrations); return this; } DecisionServiceSVGShapeView(final String name,
                                       final SVGPrimitiveShape svgPrimitive,
                                       final double width,
                                       final double height,
                                       final boolean resizable); DecisionServiceSVGShapeView addDividerDragHandler(final DragHandler dragHandler); double getDividerLineY(); void setDividerLineY(final double y); @Override //Override to increase visibility for Unit Tests HandlerManager getHandlerManager(); @Override void destroy();  }