Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » problems with reveal
problems with reveal [message #195857] Tue, 13 September 2005 21:48 Go to next message
Eclipse UserFriend
Hi,

I have the following problem:

I have an GEF-editor where it is possible to add elements. These elements
can be selected. The elements in the editor can be hidden ( they are
dynamicly added or removed ). I also have an outlineview linked to this
editor. If I select an element in the outline the editor will check if the
element is hidden, if it is, the element is added and selected. Now comes
the problem, if I try to reveal the element and the element is located at a
location which is outside of my RootEditPart, the reveal wont work. This is
because the bound of the RootEditPart have not been recalculated yet. And in
the the FigureCanvas#scrollSmoothTo(int,int) the condition if (dx == 0 && dy
== 0) will fail.
So is there a way to force the RootEditPart to recalculate its bounds before
I make my call to the reveal?

Thx in advance
Re: problems with reveal [message #195878 is a reply to message #195857] Tue, 13 September 2005 23:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

viewer.flush();
viewer.select(newEditPart);

"Philipp Marx" <irritated@gmx.de> wrote in message
news:dg7hf4$dgo$1@news.eclipse.org...
> Hi,
>
> I have the following problem:
>
> I have an GEF-editor where it is possible to add elements. These elements
> can be selected. The elements in the editor can be hidden ( they are
> dynamicly added or removed ). I also have an outlineview linked to this
> editor. If I select an element in the outline the editor will check if the
> element is hidden, if it is, the element is added and selected. Now comes
> the problem, if I try to reveal the element and the element is located at
a
> location which is outside of my RootEditPart, the reveal wont work. This
is
> because the bound of the RootEditPart have not been recalculated yet. And
in
> the the FigureCanvas#scrollSmoothTo(int,int) the condition if (dx == 0 &&
dy
> == 0) will fail.
> So is there a way to force the RootEditPart to recalculate its bounds
before
> I make my call to the reveal?
>
> Thx in advance
>
>
Re: problems with reveal [message #195891 is a reply to message #195878] Wed, 14 September 2005 06:43 Go to previous messageGo to next message
Eclipse UserFriend
yeah, thx it works =)

Is there a way to get the revealed element into the middle of the screen
instead of the bounds?



"Pratik Shah" <none@unknown.com> schrieb im Newsbeitrag
news:dg7muu$jm0$1@news.eclipse.org...
> viewer.flush();
> viewer.select(newEditPart);
>
> "Philipp Marx" <irritated@gmx.de> wrote in message
> news:dg7hf4$dgo$1@news.eclipse.org...
> > Hi,
> >
> > I have the following problem:
> >
> > I have an GEF-editor where it is possible to add elements. These
elements
> > can be selected. The elements in the editor can be hidden ( they are
> > dynamicly added or removed ). I also have an outlineview linked to this
> > editor. If I select an element in the outline the editor will check if
the
> > element is hidden, if it is, the element is added and selected. Now
comes
> > the problem, if I try to reveal the element and the element is located
at
> a
> > location which is outside of my RootEditPart, the reveal wont work. This
> is
> > because the bound of the RootEditPart have not been recalculated yet.
And
> in
> > the the FigureCanvas#scrollSmoothTo(int,int) the condition if (dx == 0
&&
> dy
> > == 0) will fail.
> > So is there a way to force the RootEditPart to recalculate its bounds
> before
> > I make my call to the reveal?
> >
> > Thx in advance
> >
> >
>
>
Re: problems with reveal [message #195951 is a reply to message #195891] Wed, 14 September 2005 14:42 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

you'd have to override reveal. We move the minimum amount possible to
display the revealed part.

"Philipp Marx" <irritated@gmx.de> wrote in message
news:dg8grb$ece$1@news.eclipse.org...
> yeah, thx it works =)
>
> Is there a way to get the revealed element into the middle of the screen
> instead of the bounds?
>
>
>
> "Pratik Shah" <none@unknown.com> schrieb im Newsbeitrag
> news:dg7muu$jm0$1@news.eclipse.org...
>> viewer.flush();
>> viewer.select(newEditPart);
>>
>> "Philipp Marx" <irritated@gmx.de> wrote in message
>> news:dg7hf4$dgo$1@news.eclipse.org...
>> > Hi,
>> >
>> > I have the following problem:
>> >
>> > I have an GEF-editor where it is possible to add elements. These
> elements
>> > can be selected. The elements in the editor can be hidden ( they are
>> > dynamicly added or removed ). I also have an outlineview linked to this
>> > editor. If I select an element in the outline the editor will check if
> the
>> > element is hidden, if it is, the element is added and selected. Now
> comes
>> > the problem, if I try to reveal the element and the element is located
> at
>> a
>> > location which is outside of my RootEditPart, the reveal wont work.
>> > This
>> is
>> > because the bound of the RootEditPart have not been recalculated yet.
> And
>> in
>> > the the FigureCanvas#scrollSmoothTo(int,int) the condition if (dx == 0
> &&
>> dy
>> > == 0) will fail.
>> > So is there a way to force the RootEditPart to recalculate its bounds
>> before
>> > I make my call to the reveal?
>> >
>> > Thx in advance
>> >
>> >
>>
>>
>
>
Previous Topic:Child EditPart with Sliders
Next Topic:Getting abolute path
Goto Forum:
  


Current Time: Thu Jan 23 11:58:33 GMT 2025

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

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

Back to the top