Interface ScrollIntoViewOption

All Superinterfaces:
Serializable
All Known Implementing Classes:
ScrollIntoViewOption.Behavior, ScrollIntoViewOption.Block, ScrollIntoViewOption.Inline

public interface ScrollIntoViewOption extends Serializable
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 Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Scroll behavior option for scrollIntoView operations.
    static class 
    Vertical alignment option for scrollIntoView operations.
    static class 
    Horizontal alignment option for scrollIntoView operations.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static tools.jackson.databind.node.ObjectNode
    Builds an ObjectNode containing the scrollIntoView options for use with the browser's scrollIntoView() method.
  • Method Details

    • buildOptions

      static tools.jackson.databind.node.ObjectNode buildOptions(ScrollIntoViewOption... options)
      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