I am working on Polygon Dragging , also Resizing of Polygon. I can draw rectangle using org.eclipse.draw2d.RectangleFigure and I am able to Drag it, I added MouseMotionListener and MouseListener to org.eclipse.draw2d.RectangleFigure.
我正在进行多边形拖动,也正在调整多边形的大小。我可以使用org.eclipse.draw2d.RectangleFigure绘制矩形,我可以拖动它,我将MouseMotionListener和MouseListener添加到org.eclipse.draw2d.RectangleFigure。
but
while trying same thing for Polygon. it does not work. mouseDragged event gets called when i try to drag the polygon, but it does not move.
同时为Polygon尝试相同的东西。这是行不通的。我尝试拖动多边形时会调用mouseDragged事件,但它不会移动。
1 个解决方案
#1
0
If you use a org.eclipse.draw2d.PolygonShape
instead of a org.eclipse.draw2d.Polygon
it should work as you expect it to.
如果使用org.eclipse.draw2d.PolygonShape而不是org.eclipse.draw2d.Polygon,它应该按照您的预期工作。
#1
0
If you use a org.eclipse.draw2d.PolygonShape
instead of a org.eclipse.draw2d.Polygon
it should work as you expect it to.
如果使用org.eclipse.draw2d.PolygonShape而不是org.eclipse.draw2d.Polygon,它应该按照您的预期工作。