asyncQueue, children, renderNode
effects, styleId, visibility, zIndex
Constructor and Description |
---|
ScrollBox()
Constructor.
|
ScrollBox(java.lang.String id)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addScrollListener(ScrollListener listener)
Adds a
ScrollListener to this ScrollBox |
void |
attach(ParentRenderNode<?,?> parentRenderNode)
Attaches a
RenderNode for this element to a parent
RenderNode |
float |
getMaxHeight()
Returns the maximum height for this
ScrollBox |
float |
getScrollFactor()
Returns how much this
ScrollBox scrolls when the up/down buttons
are clicked (expressed as a % between 0.0 and 1.0) |
void |
notifyScrollListeners(float scrollThumbPosition)
Notifies all
ScrollListener instances that a scroll occurred on
this ScrollBox |
void |
removeScrollListener(ScrollListener listener)
Removes a
ScrollListener from this ScrollBox |
void |
scrollTo(UiElement element,
boolean immediate)
Moves the scroll thumb until the
UiElement is visible |
void |
scrollToBottom(boolean immediate)
Scrolls to the last element in the
ScrollBox |
void |
scrollToTop(boolean immediate)
Scrolls to the first element in the
ScrollBox |
void |
setMaxHeight(float maxHeight)
Sets the maximum height for this
ScrollBox |
void |
setScrollFactor(float scrollFactor)
Sets how much this
ScrollBox scrolls when the up/down buttons are
clicked |
void |
syncWithRenderNode()
Syncs data between the
UiElement and RenderNode |
add, add, addAsync, detach, getElementById, getLayout, remove, remove, removeAll, setLayout, setStyleId, setVisibility, setZIndex, withElements, withElements
addEffectListener, addHoverListener, applyEffect, equals, getId, getStyleId, getVisibility, getZIndex, hashCode, isDebugEnabled, notifyEffectListenersOnFinished, notifyHoverListenersOnBeginHover, notifyHoverListenersOnEndHover, removeEffectListener, removeHoverListener, setDebugEnabled
public ScrollBox()
ScrollBox
public ScrollBox(java.lang.String id)
id
- The unique ID for this ScrollBox
public void attach(ParentRenderNode<?,?> parentRenderNode)
UiElement
RenderNode
for this element to a parent
RenderNode
attach
in class Column
parentRenderNode
- The parent RenderNode
to attach topublic void syncWithRenderNode()
UiElement
UiElement
and RenderNode
syncWithRenderNode
in class Column
public void scrollTo(UiElement element, boolean immediate)
UiElement
is visiblepublic void scrollToTop(boolean immediate)
ScrollBox
immediate
- True if the ScrollBox
should "jump" to the element.
False if the scrolling should be smooth.public void scrollToBottom(boolean immediate)
ScrollBox
immediate
- True if the ScrollBox
should "jump" to the element.
False if the scrolling should be smooth.public float getMaxHeight()
ScrollBox
Float.MAX_VALUE
by defaultpublic void setMaxHeight(float maxHeight)
ScrollBox
maxHeight
- The maximum height to setpublic float getScrollFactor()
ScrollBox
scrolls when the up/down buttons
are clicked (expressed as a % between 0.0 and 1.0)DEFAULT_SCROLL_FACTOR
by defaultpublic void setScrollFactor(float scrollFactor)
ScrollBox
scrolls when the up/down buttons are
clickedscrollFactor
- A % between 0.0 and 1.0public void addScrollListener(ScrollListener listener)
ScrollListener
to this ScrollBox
listener
- The ScrollListener
to addpublic void removeScrollListener(ScrollListener listener)
ScrollListener
from this ScrollBox
listener
- The ScrollListener
to removepublic void notifyScrollListeners(float scrollThumbPosition)
ScrollListener
instances that a scroll occurred on
this ScrollBox
scrollThumbPosition
- The position of the scroll thumb (between 0.0 and 1.0)