Moving Elements [message #212055] |
Fri, 17 March 2006 12:25  |
Eclipse User |
|
|
|
Originally posted by: news.goodbyte.de
Hi,
I'm new to GEF and try to move some elements around in my diagram. I do
have an EditPart for the diagram and an EditPart for the element type
I'd like to move around. I can add the element to the diagram, but I
cannot move it around. What can be wrong?
Tia,
Benjamin
|
|
|
Re: Moving Elements [message #212073 is a reply to message #212055] |
Fri, 17 March 2006 13:56  |
Eclipse User |
|
|
|
Benjamin Lippelt schrieb:
> Hi,
>
> I'm new to GEF and try to move some elements around in my diagram. I do
> have an EditPart for the diagram and an EditPart for the element type
> I'd like to move around. I can add the element to the diagram, but I
> cannot move it around. What can be wrong?
>
> Tia,
> Benjamin
Hi Benjamin,
have a look at the shapes example. Look at DiagramEditPart. This
installs a layout edit policy:
installEditPolicy(EditPolicy.LAYOUT_ROLE,
new ShapesXYLayoutEditPolicy());
This edit policy implements
protected Command createChangeConstraintCommand(...)
and returns a ShapeSetConstraintCommand that finally modifies the
shape's bounds.
HTH, Thomas.
|
|
|
Powered by
FUDForum. Page generated in 0.04048 seconds