Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Symbol Positions inside Compartment(Symbol Positions inside Compartment)
Symbol Positions inside Compartment [message #824482] Mon, 19 March 2012 14:20 Go to next message
Eclipse UserFriend
Hi,

I am creating one compartment in programmatic way using CreateViewRequest.

My compartment has BorderLayout.I want to create children programtically.

I am facing issues in placement of generate children.

Can someone help me in creating the compartments and children using viewRequests.
Also i want to know how to generate children at particular position inside compartment.

Regards,
Abbas.
Re: Symbol Positions inside Compartment [message #825795 is a reply to message #824482] Wed, 21 March 2012 05:13 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

try something like this on your view:

Bounds b;
if (view.getLayoutConstraint() instanceof Bounds) {
 b = (Bounds) middleNode.getLayoutConstraint();
} 
else {
 b = NotationFactory.eINSTANCE.createBounds();
 view.setLayoutConstraint(b);
}
 b.setX(x);
 b.setY(y);


Ralph
Re: Symbol Positions inside Compartment [message #826024 is a reply to message #825795] Wed, 21 March 2012 11:01 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply,I tried your suggestion but it didnt work.
Actually even while adding from pallette also it is adding elements one below the other.
Even i am not able to move these inner symbols,they are fixed.

Can you please tell me why i am unable to add them in my mouse drag position. Please see the attached screen shot.

Re: Symbol Positions inside Compartment [message #826740 is a reply to message #826024] Thu, 22 March 2012 08:51 Go to previous message
Eclipse UserFriend
after setting "listLayout" property to false for corresponding GenCompartment node
in .gmfgen model i am able to move inner nodes and i am able to place them at whichever position i want.

Now,when i open diagram intially i want to make my compartment as collapsible,how is it possible?

Regards,
Abbas.
Previous Topic:Delete link programatically
Next Topic:GMP Activity
Goto Forum:
  


Current Time: Wed Jul 16 21:43:44 EDT 2025

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

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

Back to the top