Class SJScrollPane
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.orderedlayout.Scroller
com.vaadin.swingbridge.surrogates.SJScrollPane
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.orderedlayout.Scroller>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.orderedlayout.Scroller>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.orderedlayout.Scroller>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.orderedlayout.ScrollerVariant>, ComponentMixin, ContainerMixin, JComponentMixin, Serializable
public class SJScrollPane
extends com.vaadin.flow.component.orderedlayout.Scroller
implements JComponentMixin
Surrogate for
JScrollPane (SD_sjscrollpane). Extends Vaadin
Scroller directly (is-a) so it reaches the migrator either
through :emulators.JScrollPane as peer, or as a richer-than-
stock Vaadin scroll container in its own right.
Why Scroller as peer
Vaadin 25's native scroll container — a single-content-slot container with a built-inScroller.ScrollDirection enum
(Scroller.ScrollDirection.VERTICAL / Scroller.ScrollDirection.HORIZONTAL /
Scroller.ScrollDirection.BOTH / Scroller.ScrollDirection.NONE). The
single-child invariant is what JScrollPane already enforces (one
viewport view at a time); Scroller.setContent(Component)
IS the setViewportView mapping.
Auto-scroll guard
setContent(Component) forces Scroller.ScrollDirection.NONE for
content that owns its own overflow layer (Grid / TextArea / Scroller) — see
that method for the pathology it prevents. The guard fires only on content
swap, so an explicit setScrollDirection(VERTICAL)
after setContent(grid) sticks: opt-out is one line.
Inherited mixin surface
Almost the entire JComponent surface comes fromJComponentMixin:
border CSS round-trip (SD_border_css_lossy), client properties, ancestor listeners,
tooltip pass-through, etc. SJScrollPane itself adds only the three
ctors + the auto-scroll guard + L&F surface tail.
R_vaadin_first lossy: getScrollDirection() after auto-scroll setContent
AftersetContent(grid), Scroller.getScrollDirection() returns
Scroller.ScrollDirection.NONE regardless of any prior
setScrollDirection call — the auto-scroll
guard overwrote it. R_vaadin_first-accepted lossy direction; the JDK-shaped
scrollbar policy ints live on the emulator side via field shadow
per R_swing_is_truth. Migration convention: read scrollbar policy through the
emulator (JScrollPane.getVerticalScrollBarPolicy()), not
by inspecting the surrogate's Scroller direction.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.orderedlayout.Scroller
com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirectionNested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C>Nested classes/interfaces inherited from interface JComponentMixin
JComponentMixin.ActionStandin -
Field Summary
Fields inherited from interface JComponentMixin
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW -
Constructor Summary
ConstructorsConstructorDescriptionSJScrollPane(com.vaadin.flow.component.Component view) SJScrollPane(com.vaadin.flow.component.Component view, com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirection direction) -
Method Summary
Modifier and TypeMethodDescriptionSwing constant for L&F lookup; ScrollPaneUI isn't pluggable here.voidsetContent(com.vaadin.flow.component.Component content) Set the viewport content, applying the auto-scroll guard.voidsetUI(ScrollPaneUI ui) L&F surgery isn't modelled; WARN so integration gaps surface.voidupdateUI()L&F swap — no-op for us; Vaadin owns the DOM.Methods inherited from class com.vaadin.flow.component.orderedlayout.Scroller
getContent, getScrollDirection, scrollToBottom, scrollToTop, setScrollDirectionMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class 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 ComponentMixin
_installSwingClass, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, dispatchEvent, doLayout, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getComponentListeners, getCursor, getFocusListeners, getFont, getForeground, getGraphics, getHierarchyBoundsListeners, getHierarchyListeners, getKeyListeners, getLocation, getMaximumSize, getMinimumSize, getMouseListeners, getName, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolTipText, getX, getY, grabFocus, hasFocus, invalidate, isDisplayable, isFocusable, isFocusOwner, isShowing, paint, paintAll, print, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, revalidate, setBackground, setBounds, setBounds, setCursor, setFocusable, setFont, setForeground, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validateMethods inherited from interface ContainerMixin
addContainerListener, getContainerListeners, getLayout, paintComponents, printComponents, removeContainerListener, setLayoutMethods 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.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabled, isEnabledMethods 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, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, bindThemeVariants, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariantsMethods inherited from interface JComponentMixin
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getLocation, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, isDoubleBuffered, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, requestDefaultFocus, resetKeyboardActions, reshape, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction
-
Constructor Details
-
SJScrollPane
public SJScrollPane() -
SJScrollPane
public SJScrollPane(com.vaadin.flow.component.Component view) -
SJScrollPane
public SJScrollPane(com.vaadin.flow.component.Component view, com.vaadin.flow.component.orderedlayout.Scroller.ScrollDirection direction)
-
-
Method Details
-
setContent
public void setContent(com.vaadin.flow.component.Component content) Set the viewport content, applying the auto-scroll guard.Delegates to
Scroller.setContent(Component), then if the content is an instance of any known auto-scrolling Vaadin component type, forces this Scroller's direction toScroller.ScrollDirection.NONE. Prevents double-scrollbars when a Grid / TextArea / Scroller is wrapped by SJScrollPane.nullcontent clears the slot without applying the guard (no content to inspect; whatever direction was set last sticks).- Overrides:
setContentin classcom.vaadin.flow.component.orderedlayout.Scroller
-
getUIClassID
Swing constant for L&F lookup; ScrollPaneUI isn't pluggable here.- Specified by:
getUIClassIDin interfaceJComponentMixin
-
updateUI
public void updateUI()L&F swap — no-op for us; Vaadin owns the DOM.- Specified by:
updateUIin interfaceJComponentMixin
-
setUI
L&F surgery isn't modelled; WARN so integration gaps surface. -
getAccessibleContext
-