| How initially scroll when editor opens? [message #1005021] |
Thu, 24 January 2013 05:33  |
Fredrik Attebrant Messages: 17 Registered: June 2012 |
Junior Member |
|
|
I'm developing an GEF-based editor.
It displays a diagram with a timeline and I would like to have it "scrolled" to a position corresponding to today's date when the editor opens.
I've implemented an action that scrolls the diagram but can someone help me figure out where this can be done when the editor is opened?
The "go to today" action basically does:
int todayOffset = getOffsetFromStart();
FigureCanvas canvas = (FigureCanvas) ppEditor.getGraphicalViewer().getControl();
canvas.scrollToX(todayOffset);
Thanks,
--Fredrik
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02174 seconds