Dotted rectangle when selecting a shape. [message #885762] |
Wed, 13 June 2012 10:45  |
Eclipse User |
|
|
|
Hello,
we are working on a flow editor that contains states (rectangles) and transitions (arrows). We want to change it in order to allow to support other kind of shapes in states apart from rectangles. We have been able to create other shapes such as ellipse, rhombus and so on, but the problem is that when we select the state, some dots in rectangle shape appear (an we would like these dots in the shape outline -ellipse, rhombus,...-). Besides, arrows don't arrive to the shape outline, just to the dotted rectangle. I attach a bmp file that shown on the left the current behavior and the one that we want to get.
Thanks a lot,
Attachment: rombito.bmp
(Size: 1.31MB, Downloaded 217 times)
|
|
|
Re: Dotted rectangle when selecting a shape. [message #887308 is a reply to message #885762] |
Sat, 16 June 2012 07:22  |
Eclipse User |
|
|
|
The parent of editParts is responsible of installing a selection edit policy on its children.
I presume you have installed the XYLayoutEditPolicy on the content editpart of your editor.
Then you have to override its createChildEditPolicy(EditPart child) method. It returns the ResizableEditPOlicy by default.
You have to create your own SelectionHandlesEditPolicy that foolows your shape (which is the child of the method mentioned above).
|
|
|
Powered by
FUDForum. Page generated in 0.49234 seconds