Skip to main content



      Home
Home » Eclipse Projects » GEF » Moving a Figure, Resizing Its Parent
Moving a Figure, Resizing Its Parent [message #189126] Mon, 25 July 2005 14:59 Go to next message
Eclipse UserFriend
Hello,

I'm working on programmatically changing the location of a figure from
the figure's EditPart. Actually changing the location of the figure is
no problem, but when I move the figure to a location outside of its
parents bounds, it disappears. This makes sense and leads me to believe
that I need to notify the parent's layout manager to recalculate the
preferred size thereby resizing the parent to contain the child (and so
on and so on). Here's what I've tried so far:

1. invalidating the figure that moved
2. #1 and invalidating the parent
3. #2 and invalidating the layout managers of both
4. Walking up the figure tree and invalidating figures and layout managers
5. Refreshing the current EditPart
6. Refreshing the root EditPart

So obviously I'm going about it the wrong way. Is this a situation that
I should be using Requests and Commands? I've been working towards
using the GEF editing model, I just haven't grokked it quite yet.

Thanks,
Josh
Re: Moving a Figure, Resizing Its Parent [message #189136 is a reply to message #189126] Mon, 25 July 2005 15:01 Go to previous message
Eclipse UserFriend
Shoot, just revalidate() it, you idiot.

Josh

Josh Reed wrote:
> Hello,
>
> I'm working on programmatically changing the location of a figure from
> the figure's EditPart. Actually changing the location of the figure is
> no problem, but when I move the figure to a location outside of its
> parents bounds, it disappears. This makes sense and leads me to believe
> that I need to notify the parent's layout manager to recalculate the
> preferred size thereby resizing the parent to contain the child (and so
> on and so on). Here's what I've tried so far:
>
> 1. invalidating the figure that moved
> 2. #1 and invalidating the parent
> 3. #2 and invalidating the layout managers of both
> 4. Walking up the figure tree and invalidating figures and layout managers
> 5. Refreshing the current EditPart
> 6. Refreshing the root EditPart
>
> So obviously I'm going about it the wrong way. Is this a situation that
> I should be using Requests and Commands? I've been working towards
> using the GEF editing model, I just haven't grokked it quite yet.
>
> Thanks,
> Josh
Previous Topic:Changing figures at runtime
Next Topic:A (hopefully) simple question. Removing connections and decorations.
Goto Forum:
  


Current Time: Sat Jul 12 18:09:34 EDT 2025

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

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

Back to the top