@Test public void testRegister() { tested.init(canvasHandler); assertFalse(tested.isRegistered(element)); tested.register(element); verify(shapeView, times(1)).supports(eq(ViewEventType.RESIZE)); verify(shapeView, times(1)).addHandler(eq(ViewEventType.RESIZE), any(ResizeHandler.class)); assertTrue(tested.isRegistered(element)); }
@Override @SuppressWarnings("unchecked") public void register(final Element element) { if (checkNotRegistered(element)) { final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); if (supportsResize(shape)) { registerResizeHandlers(element, shape); } } }
ResizeControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ResizeControl<AbstractCanvasHandler, Element> { @Override @SuppressWarnings("unchecked") public void register(final Element element) { if (checkNotRegistered(element)) { final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); if (supportsResize(shape)) { registerResizeHandlers(element, shape); } } } }
ResizeControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ResizeControl<AbstractCanvasHandler, Element> { @Override @SuppressWarnings("unchecked") public void register(final Element element) { if (checkNotRegistered(element)) { final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); if (supportsResize(shape)) { registerResizeHandlers(element, shape); } } } protected  ResizeControlImpl(); @Inject  ResizeControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory); }
ResizeControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ResizeControl<AbstractCanvasHandler, Element> { @Override @SuppressWarnings("unchecked") public void register(final Element element) { if (checkNotRegistered(element)) { final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); if (supportsResize(shape)) { registerResizeHandlers(element, shape); } } } protected  ResizeControlImpl(); @Inject  ResizeControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory); @Override @SuppressWarnings("unchecked") void register(final Element element); @Override @SuppressWarnings("unchecked") CommandResult<CanvasViolation> resize(final Element element,
                                                 final double width,
                                                 final double height); @Override void setCommandManagerProvider(final RequiresCommandManager.CommandManagerProvider<AbstractCanvasHandler> provider); }
ResizeControlImpl extends AbstractCanvasHandlerRegistrationControl<AbstractCanvasHandler> implements ResizeControl<AbstractCanvasHandler, Element> { @Override @SuppressWarnings("unchecked") public void register(final Element element) { if (checkNotRegistered(element)) { final Canvas<?> canvas = canvasHandler.getCanvas(); final Shape<?> shape = canvas.getShape(element.getUUID()); if (supportsResize(shape)) { registerResizeHandlers(element, shape); } } } protected  ResizeControlImpl(); @Inject  ResizeControlImpl(final CanvasCommandFactory<AbstractCanvasHandler> canvasCommandFactory); @Override @SuppressWarnings("unchecked") void register(final Element element); @Override @SuppressWarnings("unchecked") CommandResult<CanvasViolation> resize(final Element element,
                                                 final double width,
                                                 final double height); @Override void setCommandManagerProvider(final RequiresCommandManager.CommandManagerProvider<AbstractCanvasHandler> provider);  }