Skip to main content



      Home
Home » Eclipse Projects » Sirius » how to resize a container programatically based on the count of border nodes on the container
how to resize a container programatically based on the count of border nodes on the container [message #1796307] Wed, 10 October 2018 03:19 Go to next message
Eclipse UserFriend
Hii

Please help me to solve this problem
Iam having container with border node.if I create so many border nodes on the container the nodes are overlapping. Based on the count of border nodes the container needs to be resized .How to do that programatically.
Re: how to resize a container programatically based on the count of border nodes on the container [message #1796312 is a reply to message #1796307] Wed, 10 October 2018 06:00 Go to previous messageGo to next message
Eclipse UserFriend
Hi Sharmila,

Does the arrange-all or the auto-size actions (or buttons in the tabbar) manually improve the situation ?
Do you want to do this automatically ? or manually ?

This will change the way you contribute your mecanism : a precommit listener or a ModelChangeTrigger or a menu/action.

Then you will have to look for the DNodeContainer matching your mapping and their GMF nodes to update their location constraints (Size/Bound : width and height). You might have to update the main node but also the compartment child.
You also might have to update the layout constraint of the border nodes : look in the children of the DNodeContainer.getOwnedBorderedNodes() for DNode matching your mapping(s), then retrieve the corresponding GMF Node and update their layoutConstraint (Location/Bounds: x, y). Note that you might also look for the BorderItemLocator and update it.

Regards
Re: how to resize a container programatically based on the count of border nodes on the container [message #1796313 is a reply to message #1796307] Wed, 10 October 2018 06:01 Go to previous message
Eclipse UserFriend
Hi Sharmila,

Does the arrange-all or the auto-size actions (or buttons in the tabbar) manually improve the situation ?
Do you want to do this automatically ? or manually ?

This will change the way you contribute your mecanism : a precommit listener or a ModelChangeTrigger or a menu/action.

Then you will have to look for the DNodeContainer matching your mapping and their GMF nodes to update their location constraints (Size/Bound : width and height). You might have to update the main node but also the compartment child.
You also might have to update the layout constraint of the border nodes : look in the children of the DNodeContainer.getOwnedBorderedNodes() for DNode matching your mapping(s), then retrieve the corresponding GMF Node and update their layoutConstraint (Location/Bounds: x, y). Note that you might also look for the BorderItemLocator and update it.

Regards
Previous Topic:changes to the metamodel
Next Topic:Question about Operation Action / Menu order
Goto Forum:
  


Current Time: Fri Jul 04 09:11:24 EDT 2025

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

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

Back to the top