public class WindowUtil extends Object
| Constructor and Description |
|---|
WindowUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
getQueryParams()
Returns the query parameters tacked onto our URL as a mapping from key to value.
|
static int |
getScrollIntoView(Widget target)
Returns the vertical scroll position needed to place the specified target widget in view,
while trying to minimize scrolling.
|
static int |
getScrollToMiddle(Widget target)
Returns the vertical scroll position needed to center the target widget vertically in the
browser viewport.
|
static boolean |
isFullyScrolledIntoView(Widget target)
Returns true if the target widget is fully vertically visible.
|
static boolean |
isScrolledIntoView(Widget target)
Returns true if the target widget is at least partially scrolled into view.
|
static boolean |
isScrolledIntoView(Widget target,
int minPixels)
Returns true if the target widget is vertically scrolled into view.
|
static void |
scrollIntoView(Widget target)
Scrolls the window to place the specified target widget in view, while trying to minimize
scrolling.
|
static void |
scrollTo(Widget target)
Scrolls the window to place the specified target widget at the top (or as close as possible
given the height of the browser).
|
static void |
scrollToMiddle(Widget target)
Centers the target widget vertically in the browser viewport.
|
public static Map<String,String> getQueryParams()
public static void scrollTo(Widget target)
public static int getScrollIntoView(Widget target)
public static void scrollIntoView(Widget target)
public static int getScrollToMiddle(Widget target)
public static void scrollToMiddle(Widget target)
public static boolean isScrolledIntoView(Widget target)
public static boolean isScrolledIntoView(Widget target, int minPixels)
minPixels - the minimum number of pixels that must be visible to count as "in view".public static boolean isFullyScrolledIntoView(Widget target)
Copyright © 2013. All Rights Reserved.