| Child EditPart Problems - XYLayoutPolicy?? [message #219095] |
Fri, 07 July 2006 07:17  |
Eclipse User |
|
|
|
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 08:04  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03496 seconds