Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » displaying nodes in a position on the canvas
displaying nodes in a position on the canvas [message #218855] Fri, 13 February 2009 19:25 Go to next message
Gary Leask is currently offline Gary LeaskFriend
Messages: 28
Registered: July 2009
Junior Member
We are upgrading from eclipse 3.3.2 to 3.5.0
GMF 1.0.1 to GMF 1.2.0
EMF 1.1.0 to EMF 2.5.0

We use to be able to place the Nodes on a diagram in a specific
coordinates using:

Node node = ViewService.createNode(view, form, IcxmlVisualIDRegistry
.getType(id), getPreferencesHint());

BoundsImpl currentLayout = (BoundsImpl) node.getLayoutConstraint();
currentLayout.setX(xOffset);
currentLayout.setY(yOffest);

Now it places all nodes in the upper left hand corner
What do we need to do to place them at a specific coordinate again.

Gary
Re: displaying nodes in a position on the canvas [message #218900 is a reply to message #218855] Mon, 16 February 2009 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cayla_sha.gmx.net

Hello Gary,

take a look at the method
org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart.r efreshBounds().
This method sets a node at a specific position.

Best wishes
Julia


Gary Leask schrieb:
> We are upgrading from eclipse 3.3.2 to 3.5.0
> GMF 1.0.1 to GMF 1.2.0
> EMF 1.1.0 to EMF 2.5.0
>
> We use to be able to place the Nodes on a diagram in a specific
> coordinates using:
>
> Node node = ViewService.createNode(view, form, IcxmlVisualIDRegistry
> .getType(id), getPreferencesHint());
>
> BoundsImpl currentLayout = (BoundsImpl) node.getLayoutConstraint();
> currentLayout.setX(xOffset);
> currentLayout.setY(yOffest);
>
> Now it places all nodes in the upper left hand corner
> What do we need to do to place them at a specific coordinate again.
>
> Gary
Re: displaying nodes in a position on the canvas [message #219212 is a reply to message #218855] Wed, 18 February 2009 17:56 Go to previous message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
Gary and I have resolved this problem, going to m5a has changed the
diagram measurement (from himetric to pixil...) back to how it was, and
we appear to be good now.

Thanks

Gary Leask wrote:
> We are upgrading from eclipse 3.3.2 to 3.5.0
> GMF 1.0.1 to GMF 1.2.0
> EMF 1.1.0 to EMF 2.5.0
>
> We use to be able to place the Nodes on a diagram in a specific
> coordinates using:
>
> Node node = ViewService.createNode(view, form, IcxmlVisualIDRegistry
> .getType(id), getPreferencesHint());
>
> BoundsImpl currentLayout = (BoundsImpl) node.getLayoutConstraint();
> currentLayout.setX(xOffset);
> currentLayout.setY(yOffest);
>
> Now it places all nodes in the upper left hand corner
> What do we need to do to place them at a specific coordinate again.
>
> Gary
Previous Topic:2.0.2 to 2.2.0 migration figure differences
Next Topic:[Announce] GMF 2.1.2 2.1.3 is available
Goto Forum:
  


Current Time: Thu Apr 25 13:23:50 GMT 2024

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

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

Back to the top