Package com.vaadin.flow.component
Interface ScrollIntoViewOption
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ScrollIntoViewOption.Behavior,ScrollIntoViewOption.Block,ScrollIntoViewOption.Inline
Marker interface for scrollIntoView options.
Implementations of this interface can be passed to
Element.scrollIntoView(ScrollIntoViewOption...)
and Component.scrollIntoView(ScrollIntoViewOption...).
See Element.scrollIntoView() for more information.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumScroll behavior option for scrollIntoView operations.static classVertical alignment option for scrollIntoView operations.static classHorizontal alignment option for scrollIntoView operations. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic tools.jackson.databind.node.ObjectNodebuildOptions(ScrollIntoViewOption... options) Builds an ObjectNode containing the scrollIntoView options for use with the browser's scrollIntoView() method.
-
Method Details
-
buildOptions
Builds an ObjectNode containing the scrollIntoView options for use with the browser's scrollIntoView() method.This method extracts Behavior, Block, and Inline options from the varargs and builds a JSON object compatible with the browser's Element.scrollIntoView() API. Returns null if no options are provided.
- Parameters:
options- zero or more scrollIntoView options- Returns:
- an ObjectNode with the scrollIntoView options, or null if no options are provided
-