Package com.oorian.messaging.commands
Class ScrollToTop
java.lang.Object
com.oorian.messaging.commands.Command
com.oorian.messaging.commands.JavaScriptCommand
com.oorian.messaging.commands.ScrollToTop
Command that scrolls a parent container so that the specified child element is at the top.
This command invokes the client-side scrollToTop() function to position
the target element at the top of its scrollable parent container.
-
Constructor Summary
ConstructorsConstructorDescriptionScrollToTop(Element parent, Element element) Creates a ScrollToTop command for the specified parent and child elements.ScrollToTop(String parentId, String elementId) Creates a ScrollToTop command using element IDs. -
Method Summary
Methods inherited from class com.oorian.messaging.commands.JavaScriptCommand
toJsonMethods inherited from class com.oorian.messaging.commands.Command
getElementId, getId, setElementId, toString
-
Constructor Details
-
ScrollToTop
Creates a ScrollToTop command for the specified parent and child elements.- Parameters:
parent- the scrollable parent container elementelement- the child element to scroll to the top of the parent
-
ScrollToTop
Creates a ScrollToTop command using element IDs.- Parameters:
parentId- the ID of the scrollable parent containerelementId- the ID of the child element to scroll to the top
-