[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: displaying nodes in a position on the canvas

Hello Gary,

take a look at the method org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeEditPart.refreshBounds().
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