Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Dotted rectangle when selecting a shape.
Dotted rectangle when selecting a shape. [message #885762] Wed, 13 June 2012 10:45 Go to next message
Sandra Pastoriza is currently offline Sandra Pastoriza
Messages: 1
Registered: June 2012
Junior Member
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 88 times)
Re: Dotted rectangle when selecting a shape. [message #887308 is a reply to message #885762] Sat, 16 June 2012 07:22 Go to previous message
Jan Krakora is currently offline Jan Krakora
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
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).
Previous Topic:Relation between figure bounds and display pixels
Next Topic:Zest 1 to Zest 2 migration: GraphModelEntityFactory filtering behaviour
Goto Forum:
  


Current Time: Thu Jul 31 01:25:32 EDT 2014

Powered by FUDForum. Page generated in 0.27566 seconds