Class VScroller
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.orderedlayout.Scroller
-
- org.vaadin.firitin.components.orderedlayout.VScroller
-
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,Serializable,FluentAttachNotifier<VScroller>,FluentComponent<VScroller>,FluentDetachNotifier<VScroller>,FluentHasSize<VScroller>,FluentHasStyle<VScroller>
public class VScroller extends com.vaadin.flow.component.orderedlayout.Scroller implements FluentComponent<VScroller>, FluentHasStyle<VScroller>, FluentHasSize<VScroller>
Extended version of the official Scroller component, with some actual scrolling related methods.- Author:
- mstahv
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVScroller.ScrollEventstatic classVScroller.ScrollToEndEvent
-
Constructor Summary
Constructors Constructor Description VScroller()VScroller(com.vaadin.flow.component.Component content)VScroller(com.vaadin.flow.component.Component content, com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirection scrollDirection)VScroller(com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirection scrollDirection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.vaadin.flow.shared.RegistrationaddScrollListener(com.vaadin.flow.component.ComponentEventListener<VScroller.ScrollEvent> listener)com.vaadin.flow.shared.RegistrationaddScrollToEndListener(com.vaadin.flow.component.ComponentEventListener<VScroller.ScrollToEndEvent> listener)Adds a listener that is called when a users scrolls the component to the end of its scrollable area.protected voidonAttach(com.vaadin.flow.component.AttachEvent attachEvent)protected voidonDetach(com.vaadin.flow.component.DetachEvent detachEvent)voidscrollIntoView(com.vaadin.flow.component.Component c)voidscrollToBottom()voidscrollToTop()voidsetScrollLeft(int pixelsFromLeft)voidsetScrollTop(int pixelsFromTop)-
Methods inherited from class com.vaadin.flow.component.orderedlayout.Scroller
getContent, getScrollDirection, setContent, setScrollDirection
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentAttachNotifier
withAttachListener
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentComponent
setId, setVisible, withId, withVisible
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentDetachNotifier
withDetachListener
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentHasSize
withFullHeight, withFullWidth, withHeight, withMaxHeight, withMaxSize, withMaxWidth, withMinHeight, withMinSize, withMinWidth, withSize, withSizeFull, withSizeUndefined, withWidth
-
Methods inherited from interface org.vaadin.firitin.fluency.ui.FluentHasStyle
withAddedClassName, withClassName, withStyle
-
Methods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull
-
-
-
-
Constructor Detail
-
VScroller
public VScroller()
-
VScroller
public VScroller(com.vaadin.flow.component.Component content)
-
VScroller
public VScroller(com.vaadin.flow.component.Component content, com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirection scrollDirection)
-
VScroller
public VScroller(com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirection scrollDirection)
-
-
Method Detail
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
- Overrides:
onAttachin classcom.vaadin.flow.component.Component
-
onDetach
protected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
- Overrides:
onDetachin classcom.vaadin.flow.component.Component
-
addScrollToEndListener
public com.vaadin.flow.shared.Registration addScrollToEndListener(com.vaadin.flow.component.ComponentEventListener<VScroller.ScrollToEndEvent> listener)
Adds a listener that is called when a users scrolls the component to the end of its scrollable area.- Parameters:
listener- the listener- Returns:
- the
Registrationyou can use to remove this listener.
-
addScrollListener
public com.vaadin.flow.shared.Registration addScrollListener(com.vaadin.flow.component.ComponentEventListener<VScroller.ScrollEvent> listener)
-
scrollToTop
public void scrollToTop()
-
scrollToBottom
public void scrollToBottom()
-
setScrollTop
public void setScrollTop(int pixelsFromTop)
-
setScrollLeft
public void setScrollLeft(int pixelsFromLeft)
-
scrollIntoView
public void scrollIntoView(com.vaadin.flow.component.Component c)
-
-