Home » Eclipse Projects » GEF » scrollbar disappears when zooming
| | | |
Re: scrollbar disappears when zooming [message #245787 is a reply to message #245765] |
Tue, 14 October 2008 15:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Mark Proe![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=markproe%40yahoo.com) Messages: 34 Registered: July 2009 |
Member |
|
|
I am on Vista. I tried the GEF Logic Example, and the scrolling works
fine when zoomed.
The only significant coding difference I noticed is the example uses
ScalableFreeformRootEditPart, and my application uses
ScalableRootEditPart. I am also using a multipage FormEditor instead of a
single EditorPart, but I wouldn't think that would affect anything.
There must be something simple I am missing here???
Thanks,
Mark
Anthony Hunter wrote:
> Which OS platform ? Can you duplicate with the GEF Logic Example on your
> Eclipse and OS platform ?
> Cheers...
> Anthony
> "Mark" <mproe@cerner.com> wrote in message
> news:2ed28c9db63971bd9f85d0a925096643$1@www.eclipse.org...
>>
>> Yes, the vertical scrollbar is disappearing when it is still needed. It
>> will always become visible again when I zoom back to 100%. But as soon as
>> I zoom in, it is gone. The mousewheel also becomes disabled, so I can't
>> scroll down period.
>>
>> I should probably have mentioned I am using ScalableRootEditPart.
>>
>> Thanks,
>> Mark
>>
>>
>> Anthony Hunter wrote:
>>
>>> Hi Mark,
>>
>>> You mean the scrollbar disappears when it is still needed?
>>
>>> The scrollbars currently disappear when the canvas shrinks smaller than
>>> the viewport (there is nothing to scroll anymore).
>>
>>> Cheers...
>>> Anthony
>>
>>> "Mark" <mproe@cerner.com> wrote in message
>>> news:35abde542d706e329efdcd54ae9cd76d$1@www.eclipse.org...
>>>> Hello,
>>>>
>>>> Whenever I use ZoomManager to zoom in or out, my scrollbar vanishes.
>>>> What am I missing that would cause this to happen? I am using
>>>> ScrollingGraphicalViewer.
>>>>
>>>> Thanks
>>>>
>>
>>
|
|
|
Re: scrollbar disappears when zooming [message #245796 is a reply to message #245787] |
Tue, 14 October 2008 21:21 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Anthony Hunter![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ahunter.eclipse%40gmail.com) Messages: 446 Registered: July 2009 |
Senior Member |
|
|
Hi Mark,
I am on Windows XP and when I swap out ScalableFreeformRootEditPart with
ScalableRootEditPart in the GEF Logic Example, I do not see any issues. Zoom
and scrollbars are fine.
It could be that the outer composite on the multipage FormEditor also is
trying to scroll and is breaking your GEF editor. You would have to try in a
regular editor to see.
Cheers...
Anthony
"Mark" <mproe@cerner.com> wrote in message
news:ba29649ba2ffab96a39a8706d98898dc$1@www.eclipse.org...
>I am on Vista. I tried the GEF Logic Example, and the scrolling works fine
>when zoomed.
> The only significant coding difference I noticed is the example uses
> ScalableFreeformRootEditPart, and my application uses
> ScalableRootEditPart. I am also using a multipage FormEditor instead of a
> single EditorPart, but I wouldn't think that would affect anything.
>
> There must be something simple I am missing here???
>
> Thanks,
> Mark
>
> Anthony Hunter wrote:
>
>> Which OS platform ? Can you duplicate with the GEF Logic Example on your
>> Eclipse and OS platform ?
>
>> Cheers...
>> Anthony
>
>> "Mark" <mproe@cerner.com> wrote in message
>> news:2ed28c9db63971bd9f85d0a925096643$1@www.eclipse.org...
>>>
>>> Yes, the vertical scrollbar is disappearing when it is still needed. It
>>> will always become visible again when I zoom back to 100%. But as soon
>>> as I zoom in, it is gone. The mousewheel also becomes disabled, so I
>>> can't scroll down period.
>>>
>>> I should probably have mentioned I am using ScalableRootEditPart.
>>>
>>> Thanks,
>>> Mark
>>>
>>>
>>> Anthony Hunter wrote:
>>>
>>>> Hi Mark,
>>>
>>>> You mean the scrollbar disappears when it is still needed?
>>>
>>>> The scrollbars currently disappear when the canvas shrinks smaller than
>>>> the viewport (there is nothing to scroll anymore).
>>>
>>>> Cheers...
>>>> Anthony
>>>
>>>> "Mark" <mproe@cerner.com> wrote in message
>>>> news:35abde542d706e329efdcd54ae9cd76d$1@www.eclipse.org...
>>>>> Hello,
>>>>>
>>>>> Whenever I use ZoomManager to zoom in or out, my scrollbar vanishes.
>>>>> What am I missing that would cause this to happen? I am using
>>>>> ScrollingGraphicalViewer.
>>>>>
>>>>> Thanks
>>>>>
>>>
>>>
>
>
|
|
|
Re: scrollbar disappears when zooming [message #245827 is a reply to message #245796] |
Wed, 15 October 2008 16:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Mark Proe![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=markproe%40yahoo.com) Messages: 34 Registered: July 2009 |
Member |
|
|
Okay, I narrowed down where the problem is occuring. But I don't know how
to get around it.
In my root edit part, I am creating a GridLayout to stack all my child
figures into a single column. For some strange reason, having a
GridLayout like this seems to screw up the scrolling calculations when
zoomed.
@Override
protected IFigure createFigure() {
Layer figure = new Layer();
GridLayout layout = new GridLayout(1, true);
layout.marginWidth = 15;
layout.marginHeight = 7;
layout.verticalSpacing = 5;
figure.setLayoutManager(layout);
return figure;
}
If I get rid of GridLayout and just display a single figure by itself, the
scrolling works fine.
@Override
protected IFigure createFigure() {
return new TestFigure();
}
Any ideas?
Thanks,
Mark
Anthony Hunter wrote:
> Hi Mark,
> I am on Windows XP and when I swap out ScalableFreeformRootEditPart with
> ScalableRootEditPart in the GEF Logic Example, I do not see any issues. Zoom
> and scrollbars are fine.
> It could be that the outer composite on the multipage FormEditor also is
> trying to scroll and is breaking your GEF editor. You would have to try in a
> regular editor to see.
> Cheers...
> Anthony
> "Mark" <mproe@cerner.com> wrote in message
> news:ba29649ba2ffab96a39a8706d98898dc$1@www.eclipse.org...
>>I am on Vista. I tried the GEF Logic Example, and the scrolling works fine
>>when zoomed.
>> The only significant coding difference I noticed is the example uses
>> ScalableFreeformRootEditPart, and my application uses
>> ScalableRootEditPart. I am also using a multipage FormEditor instead of a
>> single EditorPart, but I wouldn't think that would affect anything.
>>
>> There must be something simple I am missing here???
>>
>> Thanks,
>> Mark
>>
>> Anthony Hunter wrote:
>>
>>> Which OS platform ? Can you duplicate with the GEF Logic Example on your
>>> Eclipse and OS platform ?
>>
>>> Cheers...
>>> Anthony
>>
>>> "Mark" <mproe@cerner.com> wrote in message
>>> news:2ed28c9db63971bd9f85d0a925096643$1@www.eclipse.org...
>>>>
>>>> Yes, the vertical scrollbar is disappearing when it is still needed. It
>>>> will always become visible again when I zoom back to 100%. But as soon
>>>> as I zoom in, it is gone. The mousewheel also becomes disabled, so I
>>>> can't scroll down period.
>>>>
>>>> I should probably have mentioned I am using ScalableRootEditPart.
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>>
>>>> Anthony Hunter wrote:
>>>>
>>>>> Hi Mark,
>>>>
>>>>> You mean the scrollbar disappears when it is still needed?
>>>>
>>>>> The scrollbars currently disappear when the canvas shrinks smaller than
>>>>> the viewport (there is nothing to scroll anymore).
>>>>
>>>>> Cheers...
>>>>> Anthony
>>>>
>>>>> "Mark" <mproe@cerner.com> wrote in message
>>>>> news:35abde542d706e329efdcd54ae9cd76d$1@www.eclipse.org...
>>>>>> Hello,
>>>>>>
>>>>>> Whenever I use ZoomManager to zoom in or out, my scrollbar vanishes.
>>>>>> What am I missing that would cause this to happen? I am using
>>>>>> ScrollingGraphicalViewer.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>
>>>>
>>
>>
|
|
|
Re: scrollbar disappears when zooming [message #245833 is a reply to message #245827] |
Wed, 15 October 2008 21:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Anthony Hunter![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ahunter.eclipse%40gmail.com) Messages: 446 Registered: July 2009 |
Senior Member |
|
|
Hi Mark,
No ideas, but you can raise a bug report for this in Bugzilla now that you
have a test case.
Cheers...
Anthony
"Mark" <mproe@cerner.com> wrote in message
news:8090006ba23cf1d765a42495936ca112$1@www.eclipse.org...
> Okay, I narrowed down where the problem is occuring. But I don't know how
> to get around it.
>
>
> In my root edit part, I am creating a GridLayout to stack all my child
> figures into a single column. For some strange reason, having a
> GridLayout like this seems to screw up the scrolling calculations when
> zoomed.
>
>
> @Override
> protected IFigure createFigure() { Layer figure = new Layer();
> GridLayout layout = new GridLayout(1, true);
> layout.marginWidth = 15;
> layout.marginHeight = 7;
> layout.verticalSpacing = 5;
> figure.setLayoutManager(layout);
> return figure;
> }
>
>
> If I get rid of GridLayout and just display a single figure by itself, the
> scrolling works fine.
>
>
> @Override
> protected IFigure createFigure() { return new TestFigure();
> }
>
>
> Any ideas?
>
>
> Thanks,
> Mark
>
>
> Anthony Hunter wrote:
>
>> Hi Mark,
>
>> I am on Windows XP and when I swap out ScalableFreeformRootEditPart with
>> ScalableRootEditPart in the GEF Logic Example, I do not see any issues.
>> Zoom and scrollbars are fine.
>
>> It could be that the outer composite on the multipage FormEditor also is
>> trying to scroll and is breaking your GEF editor. You would have to try
>> in a regular editor to see.
>
>> Cheers...
>> Anthony
>
>> "Mark" <mproe@cerner.com> wrote in message
>> news:ba29649ba2ffab96a39a8706d98898dc$1@www.eclipse.org...
>>>I am on Vista. I tried the GEF Logic Example, and the scrolling works
>>>fine when zoomed.
>>> The only significant coding difference I noticed is the example uses
>>> ScalableFreeformRootEditPart, and my application uses
>>> ScalableRootEditPart. I am also using a multipage FormEditor instead of
>>> a single EditorPart, but I wouldn't think that would affect anything.
>>>
>>> There must be something simple I am missing here???
>>>
>>> Thanks,
>>> Mark
>>>
>>> Anthony Hunter wrote:
>>>
>>>> Which OS platform ? Can you duplicate with the GEF Logic Example on
>>>> your Eclipse and OS platform ?
>>>
>>>> Cheers...
>>>> Anthony
>>>
>>>> "Mark" <mproe@cerner.com> wrote in message
>>>> news:2ed28c9db63971bd9f85d0a925096643$1@www.eclipse.org...
>>>>>
>>>>> Yes, the vertical scrollbar is disappearing when it is still needed.
>>>>> It will always become visible again when I zoom back to 100%. But as
>>>>> soon as I zoom in, it is gone. The mousewheel also becomes disabled,
>>>>> so I can't scroll down period.
>>>>>
>>>>> I should probably have mentioned I am using ScalableRootEditPart.
>>>>>
>>>>> Thanks,
>>>>> Mark
>>>>>
>>>>>
>>>>> Anthony Hunter wrote:
>>>>>
>>>>>> Hi Mark,
>>>>>
>>>>>> You mean the scrollbar disappears when it is still needed?
>>>>>
>>>>>> The scrollbars currently disappear when the canvas shrinks smaller
>>>>>> than the viewport (there is nothing to scroll anymore).
>>>>>
>>>>>> Cheers...
>>>>>> Anthony
>>>>>
>>>>>> "Mark" <mproe@cerner.com> wrote in message
>>>>>> news:35abde542d706e329efdcd54ae9cd76d$1@www.eclipse.org...
>>>>>>> Hello,
>>>>>>>
>>>>>>> Whenever I use ZoomManager to zoom in or out, my scrollbar vanishes.
>>>>>>> What am I missing that would cause this to happen? I am using
>>>>>>> ScrollingGraphicalViewer.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
|
|
|
Re: scrollbar disappears when zooming [message #245847 is a reply to message #245833] |
Thu, 16 October 2008 15:14 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Mark Proe![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=markproe%40yahoo.com) Messages: 34 Registered: July 2009 |
Member |
|
|
I appreciate all your help, Anthony!
I have logged Bug #251093.
Thanks,
Mark
Anthony Hunter wrote:
> Hi Mark,
> No ideas, but you can raise a bug report for this in Bugzilla now that you
> have a test case.
> Cheers...
> Anthony
> "Mark" <mproe@cerner.com> wrote in message
> news:8090006ba23cf1d765a42495936ca112$1@www.eclipse.org...
>> Okay, I narrowed down where the problem is occuring. But I don't know how
>> to get around it.
>>
>>
>> In my root edit part, I am creating a GridLayout to stack all my child
>> figures into a single column. For some strange reason, having a
>> GridLayout like this seems to screw up the scrolling calculations when
>> zoomed.
>>
>>
>> @Override
>> protected IFigure createFigure() { Layer figure = new Layer();
>> GridLayout layout = new GridLayout(1, true);
>> layout.marginWidth = 15;
>> layout.marginHeight = 7;
>> layout.verticalSpacing = 5;
>> figure.setLayoutManager(layout);
>> return figure;
>> }
>>
>>
>> If I get rid of GridLayout and just display a single figure by itself, the
>> scrolling works fine.
>>
>>
>> @Override
>> protected IFigure createFigure() { return new TestFigure();
>> }
>>
>>
>> Any ideas?
>>
>>
>> Thanks,
>> Mark
>>
>>
>> Anthony Hunter wrote:
>>
>>> Hi Mark,
>>
>>> I am on Windows XP and when I swap out ScalableFreeformRootEditPart with
>>> ScalableRootEditPart in the GEF Logic Example, I do not see any issues.
>>> Zoom and scrollbars are fine.
>>
>>> It could be that the outer composite on the multipage FormEditor also is
>>> trying to scroll and is breaking your GEF editor. You would have to try
>>> in a regular editor to see.
>>
>>> Cheers...
>>> Anthony
>>
>>> "Mark" <mproe@cerner.com> wrote in message
>>> news:ba29649ba2ffab96a39a8706d98898dc$1@www.eclipse.org...
>>>>I am on Vista. I tried the GEF Logic Example, and the scrolling works
>>>>fine when zoomed.
>>>> The only significant coding difference I noticed is the example uses
>>>> ScalableFreeformRootEditPart, and my application uses
>>>> ScalableRootEditPart. I am also using a multipage FormEditor instead of
>>>> a single EditorPart, but I wouldn't think that would affect anything.
>>>>
>>>> There must be something simple I am missing here???
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>> Anthony Hunter wrote:
>>>>
>>>>> Which OS platform ? Can you duplicate with the GEF Logic Example on
>>>>> your Eclipse and OS platform ?
>>>>
>>>>> Cheers...
>>>>> Anthony
>>>>
>>>>> "Mark" <mproe@cerner.com> wrote in message
>>>>> news:2ed28c9db63971bd9f85d0a925096643$1@www.eclipse.org...
>>>>>>
>>>>>> Yes, the vertical scrollbar is disappearing when it is still needed.
>>>>>> It will always become visible again when I zoom back to 100%. But as
>>>>>> soon as I zoom in, it is gone. The mousewheel also becomes disabled,
>>>>>> so I can't scroll down period.
>>>>>>
>>>>>> I should probably have mentioned I am using ScalableRootEditPart.
>>>>>>
>>>>>> Thanks,
>>>>>> Mark
>>>>>>
>>>>>>
>>>>>> Anthony Hunter wrote:
>>>>>>
>>>>>>> Hi Mark,
>>>>>>
>>>>>>> You mean the scrollbar disappears when it is still needed?
>>>>>>
>>>>>>> The scrollbars currently disappear when the canvas shrinks smaller
>>>>>>> than the viewport (there is nothing to scroll anymore).
>>>>>>
>>>>>>> Cheers...
>>>>>>> Anthony
>>>>>>
>>>>>>> "Mark" <mproe@cerner.com> wrote in message
>>>>>>> news:35abde542d706e329efdcd54ae9cd76d$1@www.eclipse.org...
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> Whenever I use ZoomManager to zoom in or out, my scrollbar vanishes.
>>>>>>>> What am I missing that would cause this to happen? I am using
>>>>>>>> ScrollingGraphicalViewer.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>
|
|
| | |
Re: scrollbar disappears when zooming [message #523441 is a reply to message #515909] |
Fri, 26 March 2010 13:52 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Vijay Raj![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=vijay.rajonline%40gmail.com) Messages: 608 Registered: July 2009 |
Senior Member |
|
|
sorry for revoking such an old issue...
This is a an old issue but still pending issue(another example of GEF is dead )
upon analyses on certain zoom levels with a GridLayout on root figure...
The ScalableLayeredPane class asks for a prefered size in
/**
* @see Figure#getPreferredSize(int, int)
*/
public Dimension getMinimumSize(int wHint, int hHint) {
Dimension d = super.getMinimumSize((int) (wHint / getScale()), (int)(hHint / getScale()));
int w = getInsets().getWidth();
int h = getInsets().getHeight();
return d.getExpanded(-w, -h)
.scale(scale)
.expand(w, h);
}
here width/hight hint is -1 in normal cases..
hence ((int) (wHint / getScale()) returns a zero(for higher then 1 scale) or some other negative value in lower scales
This leads to passing of width hint 0 in many cases.
ultimately in GridLayout.calculatePreferredSize method
/*
* (non-Javadoc)
*
* @see org.eclipse.draw2d.AbstractLayout#calculatePreferredSize(org.eclipse.draw2d.IFigure,
* int, int)
*/
@Override
protected Dimension calculatePreferredSize(IFigure container, int wHint, int hHint)
{
Dimension size = layout(container, false, 0, 0, wHint, hHint, /* flushCache */
true);
if (wHint != SWT.DEFAULT) size.width = wHint;
if (hHint != SWT.DEFAULT) size.height = hHint;
/*
* Adjust for the size of the border
*/
size.expand(container.getInsets().getWidth(), container.getInsets().getHeight());
size.union(getBorderPreferredSize(container));
return size;
}
the zero width/height hint leads to 0 as prefered size.
The fix would be to check for SWT.DEFAULT width/height hint in ScalableLayeredPane class and accordingly pass on the SWT.DEFAULT value without applying scale changes.
Am i correct here,can any body varyfy the same so that this can be patched in the specified Bug #251093.
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
Goto Forum:
Current Time: Sat Aug 24 04:00:05 GMT 2024
Powered by FUDForum. Page generated in 0.03590 seconds
|