Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Child EditPart Problems - XYLayoutPolicy??
Child EditPart Problems - XYLayoutPolicy?? [message #219095] Fri, 07 July 2006 11:17 Go to next message
Mark Robinson is currently offline Mark RobinsonFriend
Messages: 37
Registered: July 2009
Member
Hi,

I have the main diagram EditPart.
This contains EditParts (A) which can contain other EditParts (B).

(A) has a XYLayoutPolicy that implements
createChangeConstraintCommand ()
getCreateCommand ()

The problem I have is this:
I can add instances of (B) to (A); however, (B) will always locate itself
at the top left position of (A) when added. I can move (B) to other
locations in (A), which will cause a resize of (A) if necessary. When I
add another instance of (B), all of the other (B) child EditParts and the
new child EditPart move back to the top left position of (A), and (A) will
resize itself?

Regards,
Mark.
Re: Child EditPart Problems - XYLayoutPolicy?? [message #219102 is a reply to message #219095] Fri, 07 July 2006 12:04 Go to previous message
Mark Robinson is currently offline Mark RobinsonFriend
Messages: 37
Registered: July 2009
Member
Mark Robinson wrote:

> Hi,

> I have the main diagram EditPart.
> This contains EditParts (A) which can contain other EditParts (B).

> (A) has a XYLayoutPolicy that implements
> createChangeConstraintCommand ()
> getCreateCommand ()

> The problem I have is this:
> I can add instances of (B) to (A); however, (B) will always locate itself
> at the top left position of (A) when added. I can move (B) to other
> locations in (A), which will cause a resize of (A) if necessary. When I
> add another instance of (B), all of the other (B) child EditParts and the
> new child EditPart move back to the top left position of (A), and (A) will
> resize itself?

> Regards,
> Mark.

Sorry, fixed this. I was not setting the location in the model before
creating the child editparts.

Mark.
Previous Topic:Shapes Example
Next Topic:Draw2d figure repaint() causes a "mouse exited"
Goto Forum:
  


Current Time: Tue Apr 23 09:23:48 GMT 2024

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

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

Back to the top