Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 18:20 Go to next message
Abbas Mohd is currently offline Abbas MohdFriend
Messages: 31
Registered: February 2012
Member
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 09:13 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
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 15:01 Go to previous messageGo to next message
Abbas Mohd is currently offline Abbas MohdFriend
Messages: 31
Registered: February 2012
Member
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 12:51 Go to previous message
Abbas Mohd is currently offline Abbas MohdFriend
Messages: 31
Registered: February 2012
Member
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: Sun Oct 25 06:18:18 GMT 2020

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

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

Back to the top