Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Moving a Figure, Resizing Its Parent
Moving a Figure, Resizing Its Parent [message #189126] Mon, 25 July 2005 18:59 Go to next message
Josh Reed is currently offline Josh ReedFriend
Messages: 38
Registered: July 2009
Member
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 19:01 Go to previous message
Josh Reed is currently offline Josh ReedFriend
Messages: 38
Registered: July 2009
Member
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: Fri Apr 26 00:27:53 GMT 2024

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

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

Back to the top