[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Realtime scrolling
|
Hi,
I'm developing an editor where I need realtime (horizontal) scrolling.
My approach so far ist a Thread that updates the Viewport position of
the GraphicalViewer every 20ms.
FigureCanvas canvas =
((FigureCanvas)(getGraphicalViewer().getControl()));
Viewport viewPort = canvas.getViewport();
viewPort.setHorizontalLocation((int) position);
The drawing is not very smooth. However when manually scrolling it
seems much faster and my CPU usage isn't very high either.
Is there a better way to do this?
Thanks.
Best Regards,
Fabian