problems with reveal [message #195857] |
Tue, 13 September 2005 21:48 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>> >
>> >
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03115 seconds