Package com.google.gwt.user.client.ui
Class NativeHorizontalScrollbar
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.NativeHorizontalScrollbar
- All Implemented Interfaces:
HasScrollHandlers,HasAttachHandlers,HasHandlers,EventListener,HasHorizontalScrolling,HasVisibility,HorizontalScrollbar,IsWidget
public class NativeHorizontalScrollbar
extends AbstractNativeScrollbar
implements HorizontalScrollbar
A horizontal 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 ofNativeHorizontalScrollbar.Resourcesthat renders the scrollbar semi-transparent until it is hovered.static interfaceStyles used by this widget.static interfaceA variation ofNativeHorizontalScrollbar.Stylethat renders the scrollbar semi-transparent until it is hovered.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 newNativeHorizontalScrollbar.Construct a newNativeHorizontalScrollbar. -
Method Summary
Modifier and TypeMethodDescriptionintGets the horizontal scroll position.intGet the maximum position of horizontal scrolling.intGet the minimum position of horizontal scrolling.protected intGet the height of the scrollbar.protected ElementGet the scrollable element.intGet the width in pixels of the scrollable content that the scrollbar controls.voidsetHorizontalScrollPosition(int position) Sets the horizontal scroll position.voidsetScrollWidth(int width) Set the width in pixels of the scrollable content that the scrollbar controls.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
-
NativeHorizontalScrollbar
public NativeHorizontalScrollbar()Construct a newNativeHorizontalScrollbar. -
NativeHorizontalScrollbar
Construct a newNativeHorizontalScrollbar.- Parameters:
resources- the resources used by this widget
-
-
Method Details
-
getHorizontalScrollPosition
public int getHorizontalScrollPosition()Description copied from interface:HasHorizontalScrollingGets the horizontal scroll position.- Specified by:
getHorizontalScrollPositionin interfaceHasHorizontalScrolling- Returns:
- the horizontal scroll position, in pixels
-
getMaximumHorizontalScrollPosition
public int getMaximumHorizontalScrollPosition()Description copied from interface:HasHorizontalScrollingGet the maximum position of horizontal scrolling. This is usually thescrollWidth - clientWidth.- Specified by:
getMaximumHorizontalScrollPositionin interfaceHasHorizontalScrolling- Returns:
- the maximum horizontal scroll position
-
getMinimumHorizontalScrollPosition
public int getMinimumHorizontalScrollPosition()Description copied from interface:HasHorizontalScrollingGet the minimum position of horizontal scrolling.- Specified by:
getMinimumHorizontalScrollPositionin interfaceHasHorizontalScrolling- Returns:
- the minimum horizontal scroll position
-
getScrollWidth
public int getScrollWidth()Get the width in pixels of the scrollable content that the scrollbar controls.This is not the same as the maximum scroll left position. The maximum scroll position equals the
scrollWidth - offsetWidth;- Specified by:
getScrollWidthin interfaceHorizontalScrollbar- Returns:
- the scroll width
- See Also:
-
setHorizontalScrollPosition
public void setHorizontalScrollPosition(int position) Description copied from interface:HasHorizontalScrollingSets the horizontal scroll position.- Specified by:
setHorizontalScrollPositionin interfaceHasHorizontalScrolling- Parameters:
position- the new horizontal scroll position, in pixels
-
setScrollWidth
public void setScrollWidth(int width) Set the width in pixels of the scrollable content that the scrollbar controls.This is not the same as the maximum scroll left position. The maximum scroll position equals the
scrollWidth - offsetWidth;- Specified by:
setScrollWidthin interfaceHorizontalScrollbar- Parameters:
width- the size width pixels
-
getNativeHeight
protected int getNativeHeight()Get the height of the scrollbar.- Returns:
- the height of the scrollbar in pixels
-
getScrollableElement
Description copied from class:AbstractNativeScrollbarGet the scrollable element.- Specified by:
getScrollableElementin classAbstractNativeScrollbar- Returns:
- the scrollable element
-