Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF set & get View Location
GMF set & get View Location [message #1118388] Fri, 27 September 2013 07:03 Go to next message
Eclipse UserFriend
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 09:11] by Moderator

Re: GMF set & get View Location [message #1121204 is a reply to message #1118388] Mon, 30 September 2013 07:28 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 15:03:00 EDT 2025

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

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

Back to the top