Package com.vaadin.featurepack.desktop
Class ScrollContainer
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.featurepack.desktop.AbstractContainer
com.vaadin.featurepack.desktop.ScrollContainer
- All Implemented Interfaces:
HasLayout,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable,com.vaadin.flow.component.FocusNotifier,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasComponentsOfType<com.vaadin.flow.component.Component>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,Serializable
@Tag("div")
@StyleSheet("context://vfp-scroll-container.css")
public class ScrollContainer
extends AbstractContainer
ScrollContainer is a container component that provides a scrollable
view.- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.Focusable
com.vaadin.flow.component.Focusable.FocusJsNested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUsed to set the horizontal scrollbar mode so that horizontal scrollbars are displayed only when needed.static final intUsed to set the horizontal scrollbar mode so that horizontal scrollbars are never displayed.static final intUsed to set the horizontal scrollbar mode so that horizontal scrollbars are always displayed.protected intThe display mode for the horizontal scrollbar.static final intUsed to set the vertical scrollbar mode so that vertical scrollbars are displayed only when needed.static final intUsed to set the vertical scrollbar mode so that vertical scrollbars are never displayed.static final intUsed to set the vertical scrollbar mode so that vertical scrollbars are always displayed.protected intThe display mode for the vertical scrollbar. -
Constructor Summary
ConstructorsConstructorDescriptionScrollContainer(int verticalScrollbarMode, int horizontalScrollbarMode) Creates a new scroll container with the given vertical and horizontal scrollbar modes.ScrollContainer(com.vaadin.flow.component.Component view) Creates a new scroll container with the given view component.ScrollContainer(com.vaadin.flow.component.Component view, int verticalScrollbarMode, int horizontalScrollbarMode) Creates a new scroll container with the given view component and scroll bar modes. -
Method Summary
Modifier and TypeMethodDescriptionintGets the mode for the horizontal scrollbar.intGets the mode for the vertical scrollbar.com.vaadin.flow.component.ComponentGets the view component for this scroll container.voidsetHorizontalScrollbarMode(int mode) Sets the mode for the horizontal scrollbar.voidsetVerticalScrollbarMode(int mode) Sets the mode for the vertical scrollbar.voidsetViewportView(com.vaadin.flow.component.Component view) Sets the view component for this scroll container.Methods inherited from class com.vaadin.featurepack.desktop.AbstractContainer
add, getComponent, getComponentCount, getInsets, getLayout, remove, removeAll, setLayoutMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, getUIOrThrow, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasComponents
addMethods inherited from interface com.vaadin.flow.component.HasComponentsOfType
add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, indexOf, remove, replaceMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabled, isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
VERTICAL_SCROLLBAR_AUTO
public static final int VERTICAL_SCROLLBAR_AUTOUsed to set the vertical scrollbar mode so that vertical scrollbars are displayed only when needed.- See Also:
-
VERTICAL_SCROLLBAR_HIDDEN
public static final int VERTICAL_SCROLLBAR_HIDDENUsed to set the vertical scrollbar mode so that vertical scrollbars are never displayed.- See Also:
-
VERTICAL_SCROLLBAR_VISIBLE
public static final int VERTICAL_SCROLLBAR_VISIBLEUsed to set the vertical scrollbar mode so that vertical scrollbars are always displayed.- See Also:
-
HORIZONTAL_SCROLLBAR_AUTO
public static final int HORIZONTAL_SCROLLBAR_AUTOUsed to set the horizontal scrollbar mode so that horizontal scrollbars are displayed only when needed.- See Also:
-
HORIZONTAL_SCROLLBAR_HIDDEN
public static final int HORIZONTAL_SCROLLBAR_HIDDENUsed to set the horizontal scrollbar mode so that horizontal scrollbars are never displayed.- See Also:
-
HORIZONTAL_SCROLLBAR_VISIBLE
public static final int HORIZONTAL_SCROLLBAR_VISIBLEUsed to set the horizontal scrollbar mode so that horizontal scrollbars are always displayed.- See Also:
-
verticalScrollbarMode
protected int verticalScrollbarModeThe display mode for the vertical scrollbar. -
horizontalScrollbarMode
protected int horizontalScrollbarModeThe display mode for the horizontal scrollbar.
-
-
Constructor Details
-
ScrollContainer
public ScrollContainer() -
ScrollContainer
public ScrollContainer(int verticalScrollbarMode, int horizontalScrollbarMode) Creates a new scroll container with the given vertical and horizontal scrollbar modes.- Parameters:
verticalScrollbarMode- the vertical scrollbar modehorizontalScrollbarMode- the horizontal scrollbar mode
-
ScrollContainer
public ScrollContainer(com.vaadin.flow.component.Component view) Creates a new scroll container with the given view component.- Parameters:
view- the view component to display
-
ScrollContainer
public ScrollContainer(com.vaadin.flow.component.Component view, int verticalScrollbarMode, int horizontalScrollbarMode) Creates a new scroll container with the given view component and scroll bar modes.- Parameters:
view- the view component to displayverticalScrollbarMode- the vertical scrollbar modehorizontalScrollbarMode- the horizontal scrollbar mode
-
-
Method Details
-
setViewportView
public void setViewportView(com.vaadin.flow.component.Component view) Sets the view component for this scroll container.- Parameters:
view- the view component to display
-
getViewportView
public com.vaadin.flow.component.Component getViewportView()Gets the view component for this scroll container.- Returns:
- the view component, or
nullif no view component is set
-
setVerticalScrollbarMode
public void setVerticalScrollbarMode(int mode) Sets the mode for the vertical scrollbar.- Parameters:
mode- the vertical scrollbar mode
-
getVerticalScrollbarMode
public int getVerticalScrollbarMode()Gets the mode for the vertical scrollbar.- Returns:
- the vertical scrollbar mode
-
setHorizontalScrollbarMode
public void setHorizontalScrollbarMode(int mode) Sets the mode for the horizontal scrollbar.- Parameters:
mode- the horizontal scrollbar mode
-
getHorizontalScrollbarMode
public int getHorizontalScrollbarMode()Gets the mode for the horizontal scrollbar.- Returns:
- the horizontal scrollbar mode
-