Package com.google.gwt.user.client.ui
Class NativeVerticalScrollbar
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.AbstractNativeScrollbar
com.google.gwt.user.client.ui.NativeVerticalScrollbar
- All Implemented Interfaces:
HasScrollHandlers,HasAttachHandlers,HasHandlers,EventListener,HasVerticalScrolling,HasVisibility,IsWidget,VerticalScrollbar
A vertical scrollbar implemented using the browsers native scrollbar.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfacestatic interfaceA ClientBundle of resources used by this widget.static interfaceA variation ofNativeVerticalScrollbar.Resourcesthat renders the scrollbar semi-transparent until it is hovered.static interfaceStyles used by this widget.static interfaceA variation ofNativeVerticalScrollbar.Stylethat renders the scrollbar semi-transparent until it is hovered.(package private) static interfaceClient bundle used in the uibinder template.(package private) static interfaceStyle used in uibinder template.Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled -
Field Summary
FieldsModifier and TypeFieldDescription(package private) ElementThe div inside the scrollable div that forces scrollbars to appear.(package private) ElementThe scrollable div used to create a scrollbar.Fields inherited from class com.google.gwt.user.client.ui.Widget
eventsToSinkFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX, MISSING_ELEMENT_ERROR, SETELEMENT_TWICE_ERROR -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a newNativeVerticalScrollbar.Construct a newNativeVerticalScrollbar. -
Method Summary
Modifier and TypeMethodDescriptionintGet the maximum position of vertical scrolling.intGet the minimum position of vertical scrolling.protected intGet the width of the scrollbar.protected ElementGet the scrollable element.intGet the height in pixels of the scrollable content that the scrollbar controls.intGets the vertical scroll position.voidsetScrollHeight(int height) Set the height in pixels of the scrollable content that the scrollbar controls.voidsetVerticalScrollPosition(int position) Sets the vertical scroll position.Methods inherited from class com.google.gwt.user.client.ui.AbstractNativeScrollbar
addScrollHandler, getNativeScrollbarHeight, getNativeScrollbarWidth, isScrollbarLeftAlignedInRtl, onAttach, onDetachMethods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, ensureHandlers, fireEvent, getHandlerCount, getHandlerManager, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, replaceElement, setLayoutData, setParent, sinkEvents, unsinkEventsMethods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEventMethods inherited from interface com.google.gwt.event.dom.client.HasScrollHandlers
addScrollHandler
-
Field Details
-
contentDiv
The div inside the scrollable div that forces scrollbars to appear. -
scrollable
The scrollable div used to create a scrollbar.
-
-
Constructor Details
-
NativeVerticalScrollbar
public NativeVerticalScrollbar()Construct a newNativeVerticalScrollbar. -
NativeVerticalScrollbar
Construct a newNativeVerticalScrollbar.- Parameters:
resources- the resources used by this widget
-
-
Method Details
-
getMaximumVerticalScrollPosition
public int getMaximumVerticalScrollPosition()Description copied from interface:HasVerticalScrollingGet the maximum position of vertical scrolling. This is usually thescrollHeight - clientHeight.- Specified by:
getMaximumVerticalScrollPositionin interfaceHasVerticalScrolling- Returns:
- the maximum vertical scroll position
-
getMinimumVerticalScrollPosition
public int getMinimumVerticalScrollPosition()Description copied from interface:HasVerticalScrollingGet the minimum position of vertical scrolling.- Specified by:
getMinimumVerticalScrollPositionin interfaceHasVerticalScrolling- Returns:
- the minimum vertical scroll position
-
getScrollHeight
public int getScrollHeight()Get the height in pixels of the scrollable content that the scrollbar controls.This is not the same as the maximum scroll top position. The maximum scroll position equals the
scrollHeight- offsetHeight;- Specified by:
getScrollHeightin interfaceVerticalScrollbar- Returns:
- the scroll height
- See Also:
-
getVerticalScrollPosition
public int getVerticalScrollPosition()Description copied from interface:HasVerticalScrollingGets the vertical scroll position.- Specified by:
getVerticalScrollPositionin interfaceHasVerticalScrolling- Returns:
- the vertical scroll position, in pixels
-
setScrollHeight
public void setScrollHeight(int height) Set the height in pixels of the scrollable content that the scrollbar controls.This is not the same as the maximum scroll top position. The maximum scroll position equals the
scrollHeight- offsetHeight;- Specified by:
setScrollHeightin interfaceVerticalScrollbar- Parameters:
height- the size height pixels
-
setVerticalScrollPosition
public void setVerticalScrollPosition(int position) Description copied from interface:HasVerticalScrollingSets the vertical scroll position.- Specified by:
setVerticalScrollPositionin interfaceHasVerticalScrolling- Parameters:
position- the new vertical scroll position, in pixels
-
getNativeWidth
protected int getNativeWidth()Get the width of the scrollbar.- Returns:
- the width of the scrollbar in pixels
-
getScrollableElement
Description copied from class:AbstractNativeScrollbarGet the scrollable element.- Specified by:
getScrollableElementin classAbstractNativeScrollbar- Returns:
- the scrollable element
-