ZoomManager and Scrollbars [message #210067] |
Wed, 22 February 2006 11:23 |
Jason Grant Messages: 77 Registered: July 2009 |
Member |
|
|
[GEF 3.2 under Eclipse 3.2M3]
I have a GraphicalEditorWithPalette subclass and an underlying
ScalableRootEditPart, and am trying to troubleshoot why the scrollbars
don't become smaller when I zoom in.
I suspect that I have introduced this fault somehow, but after reading
the code, I'm having trouble understanding how Viewport.readjustScrollBars
works:
getVerticalRangeModel().setAll(0,
getClientArea().height,
getContents().getBounds().height);
getHorizontalRangeModel().setAll(0,
getClientArea().width,
getContents().getBounds().width);
Now when ZoomManager.primSetZoom() sets the zoom, this is done by setting
the scale on the ScalableLayeredPane of the root part. However the calls
to setAll() above only seem to cater for the bounds of a *LayeredPane*
that is returned by ViewPort.getContents(). It looks to me like these
bounds don't take the scale of the [child] *ScalableLayeredPane* into
account, and hence the rangemodel never varies when a zoom is performed.
I'm sure I'm missing something. Pointers appreciated.
Thanks,
Jason.
|
|
|
Powered by
FUDForum. Page generated in 0.02732 seconds