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.

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.

有帮助吗?

解决方案

If you use a org.eclipse.draw2d.PolygonShape instead of a org.eclipse.draw2d.Polygon it should work as you expect it to.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top