Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF set & get View Location
GMF set & get View Location [message #1118388] Fri, 27 September 2013 11:03 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 243
Registered: January 2013
Location: Izmir
Senior Member
Hi all,

I need get location (x,y) of node on diagram. Couse when i regenerate diagram i want to put this node to same location (i want to store location to model.)

Sample;

I must transform one of my element via java as;

TextInput newElement = FormFactory.eINSTANCE.createTextInput();
				
				UIFieldElementUtil.copyOfUIFieldElement(newElement, element);
				parent.getOwnedObject().add(ECollections.indexOf(parent.getOwnedObject(), element, 0), newElement);
				EcoreUtil.delete(element);


when i create newElement i want to set its location to element's location.

So i want to ask u how can i get view location and set view location ?

Regards

[Updated on: Fri, 27 September 2013 13:11]

Report message to a moderator

Re: GMF set & get View Location [message #1121204 is a reply to message #1118388] Mon, 30 September 2013 11:28 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

the notation view elements of edit parts store bounds. These give you the location. Also the figures of editparts store this information. It can happen that you need to translate the values to absolute positions.

Ralph
Previous Topic:GMF navigator window
Next Topic:Customize List Compartment
Goto Forum:
  


Current Time: Thu Apr 25 20:46:40 GMT 2024

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

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

Back to the top