private void handleMouseMove(final Event e){
  final int x=e.x, y=e.y;
  final Image img=orientation == SWT.HORIZONTAL ? slider : vSlider;
  upperHover=x >= coordUpper.x && x <= coordUpper.x + img.getBounds().width && y >= coordUpper.y && y <= coordUpper.y + img.getBounds().height;
  lowerHover=x >= coordLower.x && x <= coordLower.x + img.getBounds().width && y >= coordLower.y && y <= coordLower.y + img.getBounds().height;
  if (dragInProgress) {
    if (orientation == SWT.HORIZONTAL) {
      final int mouseValue=(int)((x - 9f) / computePixelSizeForHorizonalSlider()) + minimum;
      if (lastSelected == SELECTED_KNOB.UPPER) {
        upperValue=(int)(Math.ceil(mouseValue / increment) * increment) - increment;
        checkUpperValue();
      }
 else {
        lowerValue=(int)(Math.ceil(mouseValue / increment) * increment) - increment;
        checkLowerValue();
      }
    }
 else {
      final int mouseValue=(int)((y - 9f) / computePixelSizeForVerticalSlider()) + minimum;
      if (lastSelected == SELECTED_KNOB.UPPER) {
        upperValue=(int)(Math.ceil(mouseValue / increment) * increment) - increment;
        checkUpperValue();
      }
 else {
        lowerValue=(int)(Math.ceil(mouseValue / increment) * increment) - increment;
        checkLowerValue();
      }
    }
  }
  redraw();
}

private void handleMouseMove ( final Event e ) { final int x = e . x , y = e . y ; final Image img = orientation == SWT . HORIZONTAL ? slider : vSlider ; upperHover = x >= coordUpper . x && x <= coordUpper . x + img . getBounds ( ) . width && y >= coordUpper . y && y <= coordUpper . y + img . getBounds ( ) . height ; lowerHover = x >= coordLower . x && x <= coordLower . x + img . getBounds ( ) . width && y >= coordLower . y && y <= coordLower . y + img . getBounds ( ) . height ; if ( dragInProgress ) { if ( orientation == SWT . HORIZONTAL ) { final int mouseValue = ( int ) ( ( x - 9f ) / computePixelSizeForHorizonalSlider ( ) ) + minimum ; if ( lastSelected == SELECTED_KNOB . UPPER ) { upperValue = ( int ) ( Math . ceil ( mouseValue / increment ) * increment ) - increment ; checkUpperValue ( ) ; } else { lowerValue = ( int ) ( Math . ceil ( mouseValue / increment ) * increment ) - increment ; checkLowerValue ( ) ; } } else { final int mouseValue = ( int ) ( ( y - 9f ) / computePixelSizeForVerticalSlider ( ) ) + minimum ; if ( lastSelected == SELECTED_KNOB . UPPER ) { upperValue = ( int ) ( Math . ceil ( mouseValue / increment ) * increment ) - increment ; checkUpperValue ( ) ; } else { lowerValue = ( int ) ( Math . ceil ( mouseValue / increment ) * increment ) - increment ; checkLowerValue ( ) ; } } } redraw ( ) ; }
code executed when the mouse pointer is moving
