use of com.ait.lienzo.client.core.shape.GridLayer in project kie-wb-common by kiegroup.
the class LienzoGridLayerBuilder method getLienzoGridFor.
public static GridLayer getLienzoGridFor(final CanvasGrid canvasGrid) {
final CanvasGrid.GridLine line1 = canvasGrid.getLine1();
final CanvasGrid.GridLine line2 = canvasGrid.getLine2();
final Line gridLine1 = createLine(line1);
final Line gridLine2 = null != line2 ? createLine(line2) : null;
if (null != gridLine2) {
return new GridLayer(line1.getDistance(), gridLine1, line2.getDistance(), gridLine2);
} else {
return new GridLayer(line1.getDistance(), gridLine1);
}
}
use of com.ait.lienzo.client.core.shape.GridLayer in project kie-wb-common by kiegroup.
the class CanvasView method setGrid.
@Override
public AbstractCanvas.View setGrid(final CanvasGrid grid) {
if (null != grid) {
GridLayer gridLayer = LienzoGridLayerBuilder.getLienzoGridFor(grid);
panel.setBackgroundLayer(gridLayer);
} else {
panel.setBackgroundLayer(null);
}
return this;
}
use of com.ait.lienzo.client.core.shape.GridLayer in project kie-wb-common by kiegroup.
the class LienzoCanvasView method setGrid.
@Override
public LienzoCanvasView<L> setGrid(final CanvasGrid grid) {
if (null != grid) {
GridLayer gridLayer = LienzoGridLayerBuilder.getLienzoGridFor(grid);
getLienzoPanel().setBackgroundLayer(gridLayer);
} else {
getLienzoPanel().setBackgroundLayer(null);
}
return this;
}
Aggregations