Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Resize child shapes when parent resized
Resize child shapes when parent resized [message #671825] Thu, 19 May 2011 06:14 Go to next message
Murthy Bhat is currently offline Murthy BhatFriend
Messages: 159
Registered: July 2009
Senior Member
Hello,

I have a resize feature in my editor that works well with resizing a parent shape. However the shapes within the main parent is not resized.

Would it be possible to relatively resize the children of a container shape as well when the container is resized ? Or Do i have to create resize context for all children and then call 'resizeShape(IResizeShapeContext context)' method on each ?

Thanks,
Murthy

[Updated on: Thu, 19 May 2011 06:15]

Report message to a moderator

Re: Resize child shapes when parent resized [message #671910 is a reply to message #671825] Thu, 19 May 2011 10:29 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1921
Registered: July 2009
Location: Walldorf, Germany
Senior Member
This needs to be done inside your resize feature because the framework
cannot decide if the children should be resized relatively with the parent,
stay teh same size, need to be moved...

There's several solutions to that. You can also resize the children in the
resize featture of the parent, delegate to special resize features for the
children, or leave the work for the update feature of your parent. So the
answer is: it depends...

HTH,
Michael

"Murthybhat" wrote in message news:ir2bvo$eoo$1@news.eclipse.org...

Hello,

I have a resize feature in my editor that works well with resizing a parent
shape. However the shapes within the main parent is not resized.

Would it be possible to relatively resize the children of a container shape
as well when the container is resized ? Or Do i have to create resize
context for all children and then call resize method on each ?

Thanks,
Murthy
Re: Resize child shapes when parent resized [message #672184 is a reply to message #671910] Fri, 20 May 2011 08:51 Go to previous messageGo to next message
Murthy Bhat is currently offline Murthy BhatFriend
Messages: 159
Registered: July 2009
Senior Member
Thanks Michael.

But I am still in a fix in resizing the container, which contains nested shapes and texts. An not all the shapes are linked to domain model objects. Is there any sample code or snippet anywhere which could help me a little more ?

Is recursively resizing the graphicalAlgorithmChildren the only way out ?

Thanks,
Murthy
Re: Resize child shapes when parent resized [message #673631 is a reply to message #672184] Tue, 24 May 2011 09:47 Go to previous message
Murthy Bhat is currently offline Murthy BhatFriend
Messages: 159
Registered: July 2009
Senior Member
Hi,

By recursively handling the height and widths of all the child shapes, I was able to resize my parent which contains many sub shapes and containers.

Thanks,
Murthy
Previous Topic:Latest Milestone does not work with GEF 3.6
Next Topic:How to Track Undo Command
Goto Forum:
  


Current Time: Thu Aug 13 17:35:17 GMT 2020

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

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

Back to the top