Package com.oorian.css
Enum Class ScrollBehavior
- All Implemented Interfaces:
Serializable,Comparable<ScrollBehavior>,Constable
CSS scroll-behavior property values for controlling scroll animation.
The scroll-behavior property specifies whether scrolling should animate smoothly or jump instantly when triggered by navigation, APIs, or anchor links.
Behavior Values:
- auto: Instant jump to scroll position (default)
- smooth: Animate smoothly to scroll position
Usage:
html.setScrollBehavior(ScrollBehavior.SMOOTH);
container.setScrollBehavior(ScrollBehavior.AUTO);
- Since:
- 2024
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionScrolling jumps instantly to scroll position (default).Inherits from parent element.Sets to default value.Rolls back to the value defined by a previous cascade origin.Rolls back to the value defined in the previous cascade layer.Scrolling animates smoothly to scroll position.Resets the property to its inherited value or initial value. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the CSS value string.toString()Returns the CSS value string.static ScrollBehaviorReturns the enum constant of this class with the specified name.static ScrollBehavior[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
Scrolling jumps instantly to scroll position (default). -
SMOOTH
Scrolling animates smoothly to scroll position. -
INITIAL
Sets to default value. -
INHERIT
Inherits from parent element. -
UNSET
Resets the property to its inherited value or initial value. -
REVERT
Rolls back to the value defined by a previous cascade origin. -
REVERT_LAYER
Rolls back to the value defined in the previous cascade layer.
-
-
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
-
getValue
Returns the CSS value string.- Returns:
- the CSS value
-
toString
Returns the CSS value string.- Overrides:
toStringin classEnum<ScrollBehavior>- Returns:
- the CSS value
-