Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Moving children with parent
Moving children with parent [message #197813] Wed, 05 October 2005 18:14 Go to next message
Eclipse UserFriend
Originally posted by: natarajat.gmail.com

I am a newbie to GEF development. I am developing a GEF editor. I have a
edit part very similar to LogicFlowContainerEditPart (from logic example)
except that I am using a LogicXYLayoutEditPolicy instead of
LogicFlowEditPolicy as used in the logic example. Now the problem is, when
I move the flow container in the editor, the children do not move. I am
not sure what I am supposed to do to make the children move with the
parent.

Thanks

Raj
Re: Moving children with parent [message #197988 is a reply to message #197813] Thu, 06 October 2005 19:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: natarajat.gmail.com

I could not figure out how the children of LogicFlowContainerEditPart move
along when the LogicFlowContainerEditPart is moved in the Logic example. I
added a label as a child (in the editor) and its "location" attribute in
the model never seems to change but the figure always moves around with
the parent. In fact the label location is always (0,0).

In my case, I modified the SetConstraintCommand to apply the move delta to
all the children as well. Now it works fine. I am not sure if this is the
right way. Any comments?

Thanks


Raj wrote:

> I am a newbie to GEF development. I am developing a GEF editor. I have a
> edit part very similar to LogicFlowContainerEditPart (from logic example)
> except that I am using a LogicXYLayoutEditPolicy instead of
> LogicFlowEditPolicy as used in the logic example. Now the problem is, when
> I move the flow container in the editor, the children do not move. I am
> not sure what I am supposed to do to make the children move with the
> parent.

> Thanks

> Raj
Re: Moving children with parent [message #198193 is a reply to message #197988] Fri, 07 October 2005 21:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

Add something to a circuit (CircuitEditPart) and study that, not the
FlowContainer.

"Raj" <natarajat@gmail.com> wrote in message
news:3eca8458906b60808bdfa0b2e37961df$1@www.eclipse.org...
> I could not figure out how the children of LogicFlowContainerEditPart move
> along when the LogicFlowContainerEditPart is moved in the Logic example. I
> added a label as a child (in the editor) and its "location" attribute in
> the model never seems to change but the figure always moves around with
> the parent. In fact the label location is always (0,0).
>
> In my case, I modified the SetConstraintCommand to apply the move delta to
> all the children as well. Now it works fine. I am not sure if this is the
> right way. Any comments?
>
> Thanks
>
>
> Raj wrote:
>
> > I am a newbie to GEF development. I am developing a GEF editor. I have a
> > edit part very similar to LogicFlowContainerEditPart (from logic
example)
> > except that I am using a LogicXYLayoutEditPolicy instead of
> > LogicFlowEditPolicy as used in the logic example. Now the problem is,
when
> > I move the flow container in the editor, the children do not move. I am
> > not sure what I am supposed to do to make the children move with the
> > parent.
>
> > Thanks
>
> > Raj
>
>
>
Re: Moving children with parent [message #200385 is a reply to message #198193] Sat, 22 October 2005 11:39 Go to previous message
venkataramana m is currently offline venkataramana mFriend
Messages: 86
Registered: July 2009
Member
1. Parent figure should override useLocalCoordinates and return true so
that the children are placed relative to parent figure's top-left.

2. Install XYLayout as the layoutmgr for parent

3. Install a subclass of XYLayoutEditPolicy on parent edit-part.

This has worked for me in scenarios like Usecase-Diagram, Package-Diagram
etc.,
Thanks
~Venkat
Previous Topic:Show mouse position in status bar
Next Topic:java.lang.LinkageError: loader constraints violated
Goto Forum:
  


Current Time: Thu Apr 25 22:20:53 GMT 2024

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

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

Back to the top