use of org.kie.workbench.common.stunner.lienzo.primitive.WiresConnectorDragProxy in project kie-wb-common by kiegroup.
the class ShapeViewDragProxyImpl method show.
@Override
public DragProxy<AbstractCanvas, ShapeView<?>, DragProxyCallback> show(final ShapeView<?> item, final int x, final int y, final DragProxyCallback callback) {
final AbstractDragProxy.Callback c = new AbstractDragProxy.Callback() {
@Override
public void onStart(final int x, final int y) {
callback.onStart(x, y);
}
@Override
public void onMove(final int x, final int y) {
callback.onMove(x, y);
}
@Override
public void onComplete(final int x, final int y) {
callback.onComplete(x, y);
}
};
if (item instanceof WiresShape) {
final WiresShape wiresShape = (WiresShape) item;
this.proxy = new WiresShapeDragProxy(getLayer().getLienzoLayer(), wiresShape, x, y, 100, c);
} else if (item instanceof WiresConnector) {
final WiresConnector wiresConnector = (WiresConnector) item;
this.proxy = new WiresConnectorDragProxy(getLayer().getLienzoLayer(), wiresConnector, x, y, 100, c);
}
return this;
}
Aggregations