public void adjustZoomFromMouseWheel(int rot){
  Projection projection=getProjection();
  if (projection == null) {
    return;
  }
  setUserHasChangedScale(true);
  Point2D minutesPnt0=projection.inverse(0,0);
  Point2D minutesPnt1=projection.inverse(1,0);
  double minutesPerPixel=minutesPnt1.getX() - minutesPnt0.getX();
  double minSelectionWidthMinutes=minutesPerPixel * sliderPointHalfWidth * 2;
  double selectionWidthPixels=selectionWidthMinutes / minutesPerPixel;
  double multiplier=selectionWidthPixels / 40;
  selectionWidthMinutes+=rot * minutesPerPixel * multiplier;
  if (selectionWidthMinutes < minSelectionWidthMinutes) {
    selectionWidthMinutes=minSelectionWidthMinutes;
  }
  if (selectionWidthMinutes > maxSelectionWidthMinutes) {
    selectionWidthMinutes=maxSelectionWidthMinutes;
  }
  updateTimeline();
  doPrepare();
}

public void adjustZoomFromMouseWheel ( int rot ) { Projection projection = getProjection ( ) ; if ( projection == null ) { return ; } setUserHasChangedScale ( true ) ; Point2D minutesPnt0 = projection . inverse ( 0 , 0 ) ; Point2D minutesPnt1 = projection . inverse ( 1 , 0 ) ; double minutesPerPixel = minutesPnt1 . getX ( ) - minutesPnt0 . getX ( ) ; double minSelectionWidthMinutes = minutesPerPixel * sliderPointHalfWidth * 2 ; double selectionWidthPixels = selectionWidthMinutes / minutesPerPixel ; double multiplier = selectionWidthPixels / 40 ; selectionWidthMinutes += rot * minutesPerPixel * multiplier ; if ( selectionWidthMinutes < minSelectionWidthMinutes ) { selectionWidthMinutes = minSelectionWidthMinutes ; } if ( selectionWidthMinutes > maxSelectionWidthMinutes ) { selectionWidthMinutes = maxSelectionWidthMinutes ; } updateTimeline ( ) ; doPrepare ( ) ; }
treat mouse wheel rotations like slider - handle drags .
