protected int calculateTimeForScrolling(int dx,boolean found){
  float msppx;
  if (found) {
    msppx=msppxFoundTarget;
  }
 else {
    msppx=msppxSearchingTarget;
  }
  return (int)Math.ceil(Math.abs(dx) * msppx);
}

protected int calculateTimeForScrolling ( int dx , boolean found ) { float msppx ; if ( found ) { msppx = msppxFoundTarget ; } else { msppx = msppxSearchingTarget ; } return ( int ) Math . ceil ( Math . abs ( dx ) * msppx ) ; }
calculates the time it should take to scroll the given distance ( in pixels )
