Home » Eclipse Projects » GEF » scrollbar disappears when zooming
scrollbar disappears when zooming [message #245732] |
Wed, 08 October 2008 17:20  |
Eclipse User |
|
|
|
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 #245787 is a reply to message #245765] |
Tue, 14 October 2008 11:01   |
Eclipse User |
|
|
|
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 17:21   |
Eclipse User |
|
|
|
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 12:04   |
Eclipse User |
|
|
|
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 17:04   |
Eclipse User |
|
|
|
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 11:14   |
Eclipse User |
|
|
|
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 09:52  |
Eclipse User |
|
|
|
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.
|
|
|
Goto Forum:
Current Time: Sat May 03 22:29:26 EDT 2025
Powered by FUDForum. Page generated in 0.04873 seconds
|