@Test public void testDeleteChild() { WiresShapeView parent = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); WiresShapeView child = new WiresShapeView(new MultiPath().rect(0, 0, 50, 50)); tested.deleteChild(parent, child); verify(wiresLayer, times(1)).deleteChild(eq(parent), eq(child)); }
@Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject  WiresCanvasView(final WiresLayer layer); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject  WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent,
                                     final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent,
                                        final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent,
                                 final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent,
                                   final ShapeView<?> child); @Override WiresLayer getLayer(); }
WiresCanvasView extends LienzoCanvasView<WiresLayer> { @Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); childShape.shapeMoved(); return this; } @Inject  WiresCanvasView(final WiresLayer layer); void use(final WiresManager wiresManager); @Override LienzoCanvasView<WiresLayer> add(final ShapeView<?> shape); LienzoCanvasView addRoot(final ShapeView<?> shape); @Override LienzoCanvasView<WiresLayer> delete(final ShapeView<?> shape); LienzoCanvasView deleteRoot(final ShapeView<?> shape); @Override LienzoCanvasView addChild(final ShapeView<?> parent,
                                     final ShapeView<?> child); @Override LienzoCanvasView deleteChild(final ShapeView<?> parent,
                                        final ShapeView<?> child); @Override LienzoCanvasView dock(final ShapeView<?> parent,
                                 final ShapeView<?> child); @Override LienzoCanvasView undock(final ShapeView<?> childParent,
                                   final ShapeView<?> child); @Override WiresLayer getLayer();  }