@Override public void addShape(final WiresBaseShape shape) { //Attach relevant handlers shape.setSelectionManager(this); if (shape instanceof RequiresShapesManager) { ((RequiresShapesManager) shape).setShapesManager(this); } if (shape instanceof RequiresMagnetManager) { ((RequiresMagnetManager) shape).setMagnetManager(this); } canvasLayer.add(shape); shapesInCanvas.add(shape); //Containers are always at the bottom of the render stack if (shape instanceof WiresContainer) { shape.moveToBottom(); } canvasLayer.batch(); }
@Override public void addShape(final WiresBaseShape shape) { //Attach relevant handlers shape.setSelectionManager(this); if (shape instanceof RequiresShapesManager) { ((RequiresShapesManager) shape).setShapesManager(this); } if (shape instanceof RequiresMagnetManager) { ((RequiresMagnetManager) shape).setMagnetManager(this); } canvasLayer.add(shape); shapesInCanvas.add(shape); //Containers are always at the bottom of the render stack if (shape instanceof WiresContainer) { shape.moveToBottom(); } canvasLayer.batch(); }