public static void assertShapeGroup(final IDrawable<?> shape, final String group) { final UserData ud = assertUserData(shape); ud.setGroup(group); }
@Override public LienzoCanvasView delete(final ShapeView<?> shape) { if (WiresUtils.isWiresShape(shape)) { layer.delete((WiresShape) shape); } else if (WiresUtils.isWiresConnector(shape)) { layer.delete((WiresConnector) shape); } else { return super.delete(shape); } return this; }
@Override public LienzoCanvasView add(final ShapeView<?> shape) { if (WiresUtils.isWiresShape(shape)) { layer.add((WiresShape) shape); } else if (WiresUtils.isWiresConnector(shape)) { layer.add((WiresConnector) shape); } else { return super.add(shape); } return this; }
@Override protected void deleteChild(final Shape shape) { getView().deleteRoot(shape.getShapeView()); }
@SuppressWarnings("unchecked") @Override protected void onAfterCanvasInitialized() { super.onAfterCanvasInitialized(); canvas.getView().setDecoratorFactory(LienzoCanvasDecoratorFactory.PREVIEW); }
protected boolean isWiresViewAccept(final WiresContainer wiresContainer, final WiresShape wiresShape) { return WiresUtils.isWiresShape(wiresContainer) || WiresUtils.isWiresShape(wiresShape); }
public static void assertShapeUUID(final IDrawable<?> shape, final String uuid) { final UserData ud = assertUserData(shape); ud.setUuid(uuid); shape.setID(uuid); }
private static boolean hasUUID(final com.ait.lienzo.client.core.shape.Node<?> node) { return WiresUtils.getShapeUUID(node) != null; }
@Override public LienzoCanvasView dock(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.dock(parentShape, childShape); return this; }
@Override public LienzoCanvasView deleteChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.deleteChild(parentShape, childShape); return this; }
@Override public LienzoCanvasView undock(final ShapeView<?> childParent, final ShapeView<?> child) { final WiresShape childShape = (WiresShape) child; layer.undock(childShape); return this; }
@Override public LienzoCanvasView addChild(final ShapeView<?> parent, final ShapeView<?> child) { final WiresContainer parentShape = (WiresContainer) parent; final WiresShape childShape = (WiresShape) child; layer.addChild(parentShape, childShape); return this; }
public void use(final WiresManager wiresManager) { layer.use(wiresManager); }
private static String getNodeViewUUID(final com.ait.lienzo.client.core.shape.Node<?> node) { return WiresUtils.getShapeUUID(node); } }