Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Elliptical Border
Elliptical Border [message #244324] Tue, 15 July 2008 15:11 Go to next message
Eclipse UserFriend
Originally posted by: benni5000.yahoo.de

Hi,

I have a diagram that contains elliptical shapes. When I select them, the
border that is painted around them is rectangular and the connections in
my diagram are routed around the figure as if it was rectangular. Is there
a way to make the border elliptical?

Thanks in advance,

Squadras
Re: Elliptical Border [message #244333 is a reply to message #244324] Wed, 16 July 2008 09:34 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,

To have your connection linked on the ellipse, you must define specific
anchors :
- add interface NodeEditpart on the editpart which control your ellipse
- implement getTargetConnectionAnchor,getSourceConnectionAnchor on the
editPart to return your own anchors.
- see EllipseAnchor.

To have the custom feedback of selection (not a rectangle similar to the
bounds of your figure), try to extend the pocily which manage the
selection (NonResizableEditPolicy, or ResizableEditpolicy)of your figure
and override the createDragSourceFeedbackFigure() and
createSelectionHandles()

Simon Bernard


Squadras a écrit :
> Hi,
>
> I have a diagram that contains elliptical shapes. When I select them,
> the border that is painted around them is rectangular and the
> connections in my diagram are routed around the figure as if it was
> rectangular. Is there a way to make the border elliptical?
>
> Thanks in advance,
>
> Squadras
>
Re: Elliptical Border [message #244361 is a reply to message #244333] Wed, 16 July 2008 16:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: benni5000.yahoo.de

Hi,

thanks for your reply! I successfully managed to make the connections go
to the ellipse borders using the EllipseAnchor now. I haven't had time to
test the thing with the custom feedback of selections. But I also have the
problem that connections that don't go to the ellipse elements are routed
around those elements as if the element was rectangular. Do you or someone
else have a solution or idea for that as well?

Squadras
Re: Elliptical Border [message #244414 is a reply to message #244361] Thu, 17 July 2008 12:53 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
I suppose that you use the ShortestPathConnectionRouter and the
algorithm which calculate the path uses the bounds of the figures, so if
you don't like this behavior, you must implement your own router or
customize this one.

Squadras a écrit :
> Hi,
>
> thanks for your reply! I successfully managed to make the connections go
> to the ellipse borders using the EllipseAnchor now. I haven't had time
> to test the thing with the custom feedback of selections. But I also
> have the problem that connections that don't go to the ellipse elements
> are routed around those elements as if the element was rectangular. Do
> you or someone else have a solution or idea for that as well?
>
> Squadras
>
Re: Elliptical Border [message #244423 is a reply to message #244414] Thu, 17 July 2008 13:44 Go to previous message
Eclipse UserFriend
Originally posted by: benni5000.yahoo.de

Thanks,

that's what I was afraid of.

Squadras
Previous Topic:Resizing Images
Next Topic:ActiveX Support In Draw2d?
Goto Forum:
  


Current Time: Tue Mar 19 02:48:59 GMT 2024

Powered by FUDForum. Page generated in 0.03448 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top