+ /*
+ * On some platforms the mouse scroll event is sent to the
+ * control that has focus even if it is not under the cursor.
+ * Handle the event only if not over the time graph control.
+ */
+ Point ctrlParentCoords = fTimeAlignedComposite.toControl(fTimeGraphCtrl.toDisplay(e.x, e.y));
+ Point scrollBarParentCoords = fDataViewer.toControl(fTimeGraphCtrl.toDisplay(e.x, e.y));
+ if (fTimeGraphCtrl.getBounds().contains(ctrlParentCoords)) {
+ /* the time graph control handles the event */
+ adjustVerticalScrollBar();
+ } else if (fTimeScaleCtrl.getBounds().contains(ctrlParentCoords)
+ || fMarkerAxisCtrl.getBounds().contains(ctrlParentCoords)
+ || fHorizontalScrollBar.getBounds().contains(scrollBarParentCoords)) {
+ if ((e.stateMask & SWT.CTRL) != 0) {
+ fTimeGraphCtrl.zoom(e.count > 0);
+ } else {
+ fTimeGraphCtrl.horizontalScroll(e.count > 0);
+ }
+ } else {
+ /* over the vertical scroll bar or outside of the viewer */
+ setTopIndex(getTopIndex() - e.count);
+ }