Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » How to avoid overlapping of shapes
How to avoid overlapping of shapes [message #935633] Sun, 07 October 2012 06:34 Go to next message
Raghava Rao is currently offline Raghava Rao
Messages: 62
Registered: July 2009
Member
Hello ,

I want to avoid overlapping of Container shapes (top containers)in the diagram.

if container shape is same size or greater size, then the behind shape is completely invisible.

How can I do this?

Advance thanks for your response.

Thanks,
Vijaya Raghava Rao

Re: How to avoid overlapping of shapes [message #936983 is a reply to message #935633] Mon, 08 October 2012 14:41 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi,

you would need to write your own move feature for that shape and return
false in canMove in case the move operation shall not be allowed because
another shape would be hidden.

Michael
Re: How to avoid overlapping of shapes [message #1014599 is a reply to message #936983] Tue, 26 February 2013 06:04 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava Rao
Messages: 62
Registered: July 2009
Member
Hi,

I tried to write my own move shape feature.but how can i find that while moving to new location already another shape is existing. Ican try some overlapping algorithams but it will become performance issue for each move.
Is there any other way to find the existing shapes on diagram for specified location.

Advance thanks for your reply.

Thanks,
Raghav
Re: How to avoid overlapping of shapes [message #1014649 is a reply to message #1014599] Tue, 26 February 2013 08:06 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Raghav,

there is GEF functionality for that. The getGraphicalViewer on DiagramEditor
offers a findObjectAt method that should help with that. It returns an GEF
EditPart, but maybe that's ok in your case?

Michael
Re: How to avoid overlapping of shapes [message #1014757 is a reply to message #1014649] Tue, 26 February 2013 12:01 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava Rao
Messages: 62
Registered: July 2009
Member
Hello Michael,

is there any plan to restrict the over lapping of shapes in graphiti in future versions.

Thanks,
Raghav
Re: How to avoid overlapping of shapes [message #1015591 is a reply to message #1014757] Fri, 01 March 2013 10:10 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1618
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Raghav,

no, there are no plans in this respect. As I wrote in Buzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401996 , this should not be
handled generically in the framework but should be done by clients in case
they need to.

Michael
Re: How to avoid overlapping of shapes [message #1058157 is a reply to message #1015591] Sun, 12 May 2013 17:58 Go to previous message
Dragan Milcevski is currently offline Dragan Milcevski
Messages: 3
Registered: April 2013
Junior Member
Please see my blog post regarding this issue. (I still have fewer than 5 messages, that is why I can't post links yet, but you can find the blog here:
eclipsegraphiti.blogspot.de/2013/05/how-to-avoid-overlapping-of-shapes.html

Dragan
Previous Topic:Milestones 0.10.0.v20130319-1346 remarks
Next Topic:Decorators on Connections
Goto Forum:
  


Current Time: Sat Oct 25 16:53:24 GMT 2014

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

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