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 07:03 Go to next message
serhat gezgin is currently offline serhat gezgin
Messages: 236
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 09:11]

Report message to a 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
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
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:Conflicting handlers with combined EMF/GMF Editor
Next Topic:Customize List Compartment
Goto Forum:
  


Current Time: Wed Jul 30 21:22:47 EDT 2014

Powered by FUDForum. Page generated in 0.03575 seconds