if (!isScrolling) return false; final Point oldScroll = new Point(scroll); final int sf = 3;   if (mousePos.x < 100) { scroll.x -= (100 - mousePos.x) / sf; } else if (mousePos.x > (backSize.width - 100)) { scroll.x -= ((backSize.width - 100) - mousePos.x) / sf; }  if (mousePos.y < 100) { scroll.y -= (100 - mousePos.y) / sf; } else if (mousePos.y > (backSize.height - 100)) { scroll.y -= ((backSize.height - 100) - mousePos.y) / sf; } checkScrollBounds(); if (!oldScroll.equals(scroll)) {  scrolled = true; return true; } return false;
return s;
    public boolean doScroll() {    	if (Settings.explicitScrollOnly) {    	   Point oldScroll = new Point(scroll);           if (oldMousePosition == null || mousePos.equals(oldMousePosition)) {           	   return false;           }           scroll.x -= mousePos.x - oldMousePosition.x;           scroll.y -= mousePos.y - oldMousePosition.y;           checkScrollBounds();	       oldMousePosition.setLocation(mousePos);	       boolean s = !oldScroll.equals(scroll);	       scrolled = scrolled || s;	       return s;        }        if (!isScrolling)            return false;        final Point oldScroll = new Point(scroll);        final int sf = 3; // scroll factor        // adjust x scroll        // scroll when the mouse is at the edges        if (mousePos.x < 100) {            scroll.x -= (100 - mousePos.x) / sf;        } else if (mousePos.x > (backSize.width - 100)) {            scroll.x -= ((backSize.width - 100) - mousePos.x) / sf;        }        // scroll when the mouse is at the edges        if (mousePos.y < 100) {            scroll.y -= (100 - mousePos.y) / sf;        } else if (mousePos.y > (backSize.height - 100)) {            scroll.y -= ((backSize.height - 100) - mousePos.y) / sf;        }        checkScrollBounds();        if (!oldScroll.equals(scroll)) {            //            repaint();            scrolled = true;            return true;        }        return false;    }