本文整理了Java中com.ait.lienzo.client.core.shape.Rectangle.getLayer
方法的一些代码示例,展示了Rectangle.getLayer
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rectangle.getLayer
方法的具体详情如下:
包路径:com.ait.lienzo.client.core.shape.Rectangle
类名称:Rectangle
方法名:getLayer
暂无
代码示例来源:origin: org.dashbuilder/dashbuilder-lienzo-charts
@Override
public void onNodeDragMove(NodeDragMoveEvent event) {
int currentX = event.getX();
int currentY = event.getY();
int incrementX = currentX - initialXPosition;
int incrementY = currentY - initialYPosition;
double finalWidth = ChartResizer.this.width + incrementX;
double finalHeight = ChartResizer.this.height + incrementY;
resizeRectangle.setWidth(finalWidth).setHeight(finalHeight);
Point2D start = new Point2D(finalWidth / 2, finalHeight / 2);
resizeArrow1.setStart(start).setEnd(new Point2D(finalWidth, finalHeight / 2));
resizeArrow2.setStart(start).setEnd(new Point2D(finalWidth / 2, finalHeight));
resizeArrow3.setStart(start).setEnd(new Point2D(0, finalHeight / 2));
resizeArrow4.setStart(start).setEnd(new Point2D(finalWidth / 2, 0));
// Fire the resize event with apply flag not set (not final size yet).
ChartResizer.this.fireEvent(new ChartResizeEvent(finalWidth, finalHeight, false));
LayerRedrawManager.get().schedule(resizeRectangle.getLayer());
}
});
代码示例来源:origin: com.ahome-it/lienzo-charts
@Override
public void onNodeDragMove(NodeDragMoveEvent event)
{
int currentX = event.getX();
int currentY = event.getY();
int incrementX = currentX - initialXPosition;
int incrementY = currentY - initialYPosition;
double finalWidth = ChartResizer.this.width + incrementX;
double finalHeight = ChartResizer.this.height + incrementY;
resizeRectangle.setWidth(finalWidth).setHeight(finalHeight);
Point2D start = new Point2D(finalWidth / 2, finalHeight / 2);
resizeArrow1.setStart(start).setEnd(new Point2D(finalWidth, finalHeight / 2));
resizeArrow2.setStart(start).setEnd(new Point2D(finalWidth / 2, finalHeight));
resizeArrow3.setStart(start).setEnd(new Point2D(0, finalHeight / 2));
resizeArrow4.setStart(start).setEnd(new Point2D(finalWidth / 2, 0));
showSizeText(sizeText, finalWidth, finalHeight);
// Fire the resize event with apply flag not set (not final size yet).
ChartResizer.this.fireEvent(new ChartResizeEvent(finalWidth, finalHeight, false));
resizeRectangle.getLayer().batch();
}
});
内容来源于网络,如有侵权,请联系作者删除!