public static boolean isScrolledIntoView ( Widget target , int minPixels ) { int wtop = Window . getScrollTop ( ) , wheight = Window . getClientHeight ( ) ; int ttop = target . getAbsoluteTop ( ) ; if ( ttop > wtop ) { return ( wtop + wheight - ttop > minPixels ) ; } else { return ( ttop + target . getOffsetHeight ( ) - wtop > minPixels ) ; } }
Returns true if the target widget is vertically scrolled into view .