@Tag(value="vaadin-scroller") @NpmPackage(value="@vaadin/vaadin-ordered-layout", version="1.4.0") @JsModule(value="@vaadin/vaadin-ordered-layout/vaadin-scroller.js") public class Scroller extends Component implements HasSize, HasStyle
setScrollDirection(ScrollDirection)
Modifier and Type | Class and Description |
---|---|
static class |
Scroller.ScrollDirection
Enum for the values of the ScrollDirection property.
|
Constructor and Description |
---|
Scroller()
Constructs an empty scroller.
|
Scroller(Component content)
Convenience constructor to create a scroller with the given content.
|
Scroller(Component content,
Scroller.ScrollDirection scrollDirection)
Convenience constructor to create a scroller with the given content and
scroll direction.
|
Scroller(Scroller.ScrollDirection scrollDirection)
Convenience constructor to create an empty scroller with the given scroll
direction.
|
Modifier and Type | Method and Description |
---|---|
Component |
getContent()
Gets the content of this scroller.
|
Scroller.ScrollDirection |
getScrollDirection()
Returns the scroll direction for this scroller.
|
void |
setContent(Component content)
Sets the content of this scroller.
|
void |
setScrollDirection(Scroller.ScrollDirection scrollDirection)
Sets the scroll direction for this scroller.
|
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
getElement
addAttachListener
addDetachListener
public Scroller()
setContent(Component)
and scroll direction defaults to
Scroller.ScrollDirection.BOTH
and can be set with
setScrollDirection(ScrollDirection)
.public Scroller(Component content)
Scroller.ScrollDirection.BOTH
and can be set
with setScrollDirection(ScrollDirection)
.content
- the content of this scrollersetContent(Component)
public Scroller(Component content, Scroller.ScrollDirection scrollDirection)
content
- the content of this scrollerscrollDirection
- scroll direction that the scroller will havepublic Scroller(Scroller.ScrollDirection scrollDirection)
setContent(Component)
scrollDirection
- scroll direction that the scroller will havepublic void setContent(Component content)
content
- a component to use as contentpublic Component getContent()
public void setScrollDirection(Scroller.ScrollDirection scrollDirection)
Scroller.ScrollDirection.BOTH
.scrollDirection
- Scroller.ScrollDirection.BOTH
to enable both vertical and
horizontal scrollbars. Scroller.ScrollDirection.HORIZONTAL
to
enable only horizontal scrollbars.
Scroller.ScrollDirection.VERTICAL
to enable only vertical
scrollbars. Scroller.ScrollDirection.NONE
to disable both
vertical and horizontal scrollbars.public Scroller.ScrollDirection getScrollDirection()
setScrollDirection(ScrollDirection)
Copyright © 2025. All rights reserved.