Package com.vaadin.flow.component
Enum Class FocusOption.PreventScroll
- All Implemented Interfaces:
FocusOption,Serializable,Comparable<FocusOption.PreventScroll>,Constable
- Enclosing interface:
FocusOption
public static enum FocusOption.PreventScroll
extends Enum<FocusOption.PreventScroll>
implements FocusOption
Scroll prevention option for focus operations.
Controls whether the browser should scroll the document to bring the newly-focused element into view.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusOption
FocusOption.FocusVisible, FocusOption.PreventScroll -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic FocusOption.PreventScrollReturns the enum constant of this class with the specified name.static FocusOption.PreventScroll[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Browser decides (default behavior is to scroll the element into view).When this option is used, the preventScroll property is not included in the options passed to the browser, allowing the browser to use its default behavior (which is to scroll).
-
ENABLED
Prevent scrolling when focusing the element.Use this when you want to focus an element without changing the current scroll position.
-
DISABLED
Allow scrolling when focusing the element (browser default).This explicitly enables the default browser behavior of scrolling the element into view when focused.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-