Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Moving Elements
Moving Elements [message #212055] Fri, 17 March 2006 12:25 Go to next message
Eclipse UserFriend
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 Go to previous message
Thomas Maier is currently offline Thomas MaierFriend
Messages: 117
Registered: July 2009
Senior Member
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.
Previous Topic:Advice on property editing for Newbie
Next Topic:Invalid Menu Extension?
Goto Forum:
  


Current Time: Thu Apr 18 01:51:08 GMT 2024

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

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

Back to the top