Package com.google.gwt.user.client.ui
Class ScrollImpl
- java.lang.Object
-
- com.google.gwt.user.client.ui.ScrollImpl
-
- Direct Known Subclasses:
ScrollImpl.ScrollImplTrident
class ScrollImpl extends java.lang.Object
Implementation of scrolling behavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
ScrollImpl.ScrollImplTrident
IE does not fire a scroll event when the scrollable element or the container is resized, so we synthesize one as needed.
-
Constructor Summary
Constructors Constructor Description ScrollImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ScrollImpl
get()
Get the singleton instance ofScrollImpl
.int
getMaximumHorizontalScrollPosition(Element scrollable)
Get the maximum horizontal scroll position.int
getMinimumHorizontalScrollPosition(Element scrollable)
Get the minimum horizontal scroll position.void
initialize(Element scrollable, Element container)
Initialize a scrollable element.boolean
isRtl(Element scrollable)
Check if the specified element has an RTL direction.
-
-
-
Method Detail
-
get
static ScrollImpl get()
Get the singleton instance ofScrollImpl
.
-
getMaximumHorizontalScrollPosition
public int getMaximumHorizontalScrollPosition(Element scrollable)
Get the maximum horizontal scroll position.- Parameters:
scrollable
- the scrollable element- Returns:
- the maximum scroll position
-
getMinimumHorizontalScrollPosition
public int getMinimumHorizontalScrollPosition(Element scrollable)
Get the minimum horizontal scroll position.- Parameters:
scrollable
- the scrollable element- Returns:
- the minimum scroll position
-
initialize
public void initialize(Element scrollable, Element container)
Initialize a scrollable element.- Parameters:
scrollable
- the scrollable elementcontainer
- the container
-
isRtl
public boolean isRtl(Element scrollable)
Check if the specified element has an RTL direction. We can't base this on the current locale because the user can modify the direction at the DOM level.- Parameters:
scrollable
- the scrollable element- Returns:
- true if the direction is RTL, false if LTR
-
-