How to synchronize the two scrollbar movements of two graphical viewers [message #219007] |
Thu, 06 July 2006 10:55 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: shruthi.cn.in.bosch.com
Hello all,
I have two graphical viewers of type
org.eclipse.gef.ui.parts.ScrollingGraphicalViewer. These two viewers are
placed in a sash form.
I want the movement of horizontal scrollbars of both viewers to be
synchronized i.e when i move one scrollbar of one viewer, the other
scrollbar of the second viewer should also move.
I tried the following to get the scrollbars instances but i dont know how
to synchronize :
Here firstViewer, secondViewer is of type BDEGraphicalViewer and
BDEGraphicalViewer extends ScrollingGraphicalViewer.
CODE:-
BDEGraphicalViewer baseViewer;
BDEGraphicalViewer targetViewer;
FigureCanvas baseCanvas = firstViewer.getFigureCanvasForViewer();
ScrollBar baseHorizontalScrollBar = baseCanvas.getHorizontalBar();
FigureCanvas targetCanvas = secondViewer.getFigureCanvasForViewer();
ScrollBar targetHorizontalScrollBar = targetCanvas.getHorizontalBar();
Please help me in solving this problem.
Thank you
Best Regards
Shruthi
|
|
|
Re: How to synchronize the two scrollbar movements of two graphical viewers [message #219055 is a reply to message #219007] |
Thu, 06 July 2006 20:48 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: none.us.ibm.com
Use the RangeModel from the scrollbars.
"shruthi" <shruthi.cn@in.bosch.com> wrote in message
news:b7ab0239256e97442986a2e6560fe7ba$1@www.eclipse.org...
> Hello all,
> I have two graphical viewers of type
> org.eclipse.gef.ui.parts.ScrollingGraphicalViewer. These two viewers are
> placed in a sash form.
>
> I want the movement of horizontal scrollbars of both viewers to be
> synchronized i.e when i move one scrollbar of one viewer, the other
> scrollbar of the second viewer should also move.
>
> I tried the following to get the scrollbars instances but i dont know how
> to synchronize :
>
> Here firstViewer, secondViewer is of type BDEGraphicalViewer and
> BDEGraphicalViewer extends ScrollingGraphicalViewer.
> CODE:-
> BDEGraphicalViewer baseViewer;
> BDEGraphicalViewer targetViewer;
>
> FigureCanvas baseCanvas = firstViewer.getFigureCanvasForViewer();
> ScrollBar baseHorizontalScrollBar = baseCanvas.getHorizontalBar();
>
> FigureCanvas targetCanvas = secondViewer.getFigureCanvasForViewer();
> ScrollBar targetHorizontalScrollBar = targetCanvas.getHorizontalBar();
>
> Please help me in solving this problem.
> Thank you Best Regards
> Shruthi
>
|
|
|
Powered by
FUDForum. Page generated in 0.02224 seconds