Class SJSplitPane
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.splitlayout.SplitLayout
com.vaadin.swingbridge.surrogates.SJSplitPane
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.splitlayout.SplitLayout>, com.vaadin.flow.component.DetachNotifier, 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.splitlayout.SplitLayoutVariant>, ComponentMixin, ContainerMixin, JComponentMixin, Serializable
public class SJSplitPane
extends com.vaadin.flow.component.splitlayout.SplitLayout
implements JComponentMixin
Surrogate for
JSplitPane (SD_sjsplitpane).
Two-slot resizable splitter on top of Vaadin SplitLayout —
primary/secondary slots map directly onto JDK's left/right
(HORIZONTAL_SPLIT) or top/bottom (VERTICAL_SPLIT) alias pairs.
API partition (per SD_sjsplitpane)
Methods whose UI behavior Vaadin can reproduce are real impls
(orientation, slot setters, setDividerLocation(double 0–1),
resetToPreferredSizes). The cluster Vaadin doesn't expose
Java-side — setResizeWeight, setOneTouchExpandable,
setContinuousLayout, setDividerSize,
setLastDividerLocation, and the int-pixel
setDividerLocation(int) form — is present-but-drops per R_vaadin_first:
setters log SHelper.onUnimplemented and discard the value;
getters return the JDK default (no Store shadow). Round-trip
+ PCE for these knobs lives on the emulator side per
vaadinx.swing.JSplitPane.
Orientation mapping
JDK constants:HORIZONTAL_SPLIT (= 1, side-by-side, left|right)
and VERTICAL_SPLIT (= 0, stacked, top/bottom). Vaadin
SplitLayout.Orientation.HORIZONTAL matches JDK
HORIZONTAL_SPLIT — naming-convention align (both mean "the layout's
axis is horizontal," so children sit side-by-side).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.splitlayout.SplitLayout
com.vaadin.flow.component.splitlayout.SplitLayout.Orientation, com.vaadin.flow.component.splitlayout.SplitLayout.SplitterDragEndEventNested classes/interfaces inherited from interface JComponentMixin
JComponentMixin.ActionStandin -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intJDK horizontal-split sentinel — children sit side-by-side.static final intJDK vertical-split sentinel — children stack top/bottom.Fields inherited from interface JComponentMixin
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentAlias forgetRightComponent().intReturns the JDK sentinel -1 ("not set / compute from children").intReturns 0 (no L&F-installed default).intReturns the JDK sentinel -1.com.vaadin.flow.component.ComponentThe current primary-slot occupant (left under HORIZONTAL_SPLIT, top under VERTICAL_SPLIT).intDrop-and-WARN — no server-side coordinates (R_layouts_close_enough).intDrop-and-WARN — no server-side coordinates (R_layouts_close_enough).intReturns JDKHORIZONTAL_SPLITorVERTICAL_SPLIT.doubleReturns the JDK default 0.0.com.vaadin.flow.component.ComponentThe current secondary-slot occupant.com.vaadin.flow.component.ComponentAlias forgetLeftComponent().Swing constant for L&F lookup; SplitPaneUI isn't pluggable here.booleanReturns the JDK default false.booleanReturns the JDK default false.voidSnap divider to a neutral 50/50 position — best-effort R_best_effort_behaviour for JDK's "compute from child preferred sizes," which we have neither the preferred-size machinery nor the pixel coordinates (R_layouts_close_enough) to honor.voidsetBottomComponent(com.vaadin.flow.component.Component c) Alias forsetRightComponent(Component)matching the JDK VERTICAL_SPLIT name.voidsetContinuousLayout(boolean b) No Vaadin counterpart (SplitLayout only relays children on drag-end).voidsetDividerLocation(double proportional) Proportional divider position, 0.0–1.0.voidsetDividerLocation(int pixels) Int-pixel form — drop-and-WARN per R_match_swing_errors sub-bucket (a) blocked-upstream.voidsetDividerSize(int size) No Vaadin Java-side counterpart (splitter thickness is theme-controlled).voidsetLastDividerLocation(int location) No-op; round-trip + PCE on the emulator.voidsetLeftComponent(com.vaadin.flow.component.Component c) Set the primary slot occupant.voidsetOneTouchExpandable(boolean b) No Vaadin counterpart (no one-touch chevrons on SplitLayout's splitter).voidsetOrientation(int orientation) JDK-shaped int setter.voidsetResizeWeight(double weight) No Vaadin counterpart.voidsetRightComponent(com.vaadin.flow.component.Component c) Set the secondary slot occupant.voidsetTopComponent(com.vaadin.flow.component.Component c) Alias forsetLeftComponent(Component)matching the JDK VERTICAL_SPLIT name.voidsetUI(SplitPaneUI 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.splitlayout.SplitLayout
addSplitterDragEndListener, addToPrimary, addToSecondary, getI18n, getOrientation, getPrimaryComponent, getSecondaryComponent, getSplitterPosition, remove, removeAll, setI18n, setOrientation, setPrimaryStyle, setSecondaryStyle, setSplitterPositionMethods 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.ClickNotifier
addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListenerMethods 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.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
-
Field Details
-
VERTICAL_SPLIT
public static final int VERTICAL_SPLITJDK vertical-split sentinel — children stack top/bottom.- See Also:
-
HORIZONTAL_SPLIT
public static final int HORIZONTAL_SPLITJDK horizontal-split sentinel — children sit side-by-side.- See Also:
-
-
Constructor Details
-
SJSplitPane
public SJSplitPane() -
SJSplitPane
public SJSplitPane(int orientation)
-
-
Method Details
-
getOrientationAsInt
public int getOrientationAsInt()Returns JDKHORIZONTAL_SPLITorVERTICAL_SPLIT. -
setOrientation
public void setOrientation(int orientation) JDK-shaped int setter. Validates per R_match_swing_errors, forwards to the inheritedSplitLayout.setOrientation(SplitLayout.Orientation), fires"orientation"PCE on actual change. -
setLeftComponent
public void setLeftComponent(com.vaadin.flow.component.Component c) Set the primary slot occupant. JDKHORIZONTAL_SPLITreads this as the left child;VERTICAL_SPLITreads it as the top child. Replaces any existing primary occupant per Vaadin'ssetComponent(c, slotName)semantics. -
setTopComponent
public void setTopComponent(com.vaadin.flow.component.Component c) Alias forsetLeftComponent(Component)matching the JDK VERTICAL_SPLIT name. -
getLeftComponent
public com.vaadin.flow.component.Component getLeftComponent()The current primary-slot occupant (left under HORIZONTAL_SPLIT, top under VERTICAL_SPLIT). -
getTopComponent
public com.vaadin.flow.component.Component getTopComponent()Alias forgetLeftComponent(). -
setRightComponent
public void setRightComponent(com.vaadin.flow.component.Component c) Set the secondary slot occupant. JDKHORIZONTAL_SPLITreads this as the right child;VERTICAL_SPLITreads it as the bottom child. Replaces any existing secondary occupant. -
setBottomComponent
public void setBottomComponent(com.vaadin.flow.component.Component c) Alias forsetRightComponent(Component)matching the JDK VERTICAL_SPLIT name. -
getRightComponent
public com.vaadin.flow.component.Component getRightComponent()The current secondary-slot occupant. -
getBottomComponent
public com.vaadin.flow.component.Component getBottomComponent()Alias forgetRightComponent(). -
setDividerLocation
public void setDividerLocation(double proportional) Proportional divider position, 0.0–1.0. Multiplies by 100 and forwards toSplitLayout.setSplitterPosition(double). No PCE — JDK fires"dividerLocation"with Integer pixels, which we can't translate from a proportion without container width (R_layouts_close_enough: no server-side coordinates). -
setDividerLocation
public void setDividerLocation(int pixels) Int-pixel form — drop-and-WARN per R_match_swing_errors sub-bucket (a) blocked-upstream. Vaadin's splitter is percent-only; we have no container-width to translate. Round-trip + PCE live on the emulator's field shadow. -
getDividerLocation
public int getDividerLocation()Returns the JDK sentinel -1 ("not set / compute from children"). Round-trip lives on the emulator. -
getMinimumDividerLocation
public int getMinimumDividerLocation()Drop-and-WARN — no server-side coordinates (R_layouts_close_enough). -
getMaximumDividerLocation
public int getMaximumDividerLocation()Drop-and-WARN — no server-side coordinates (R_layouts_close_enough). -
resetToPreferredSizes
public void resetToPreferredSizes()Snap divider to a neutral 50/50 position — best-effort R_best_effort_behaviour for JDK's "compute from child preferred sizes," which we have neither the preferred-size machinery nor the pixel coordinates (R_layouts_close_enough) to honor. -
setResizeWeight
public void setResizeWeight(double weight) No Vaadin counterpart. Drop-and-WARN; round-trip + PCE on the emulator's field shadow. JDK uses the value to weight extra space during container resize — Vaadin's primary/secondary stretch by their own flex rules. -
getResizeWeight
public double getResizeWeight()Returns the JDK default 0.0. Round-trip lives on the emulator. -
setOneTouchExpandable
public void setOneTouchExpandable(boolean b) No Vaadin counterpart (no one-touch chevrons on SplitLayout's splitter). Drop-and-WARN; round-trip + PCE on the emulator. -
isOneTouchExpandable
public boolean isOneTouchExpandable()Returns the JDK default false. Round-trip lives on the emulator. -
setContinuousLayout
public void setContinuousLayout(boolean b) No Vaadin counterpart (SplitLayout only relays children on drag-end). Drop-and-WARN; round-trip + PCE on the emulator. -
isContinuousLayout
public boolean isContinuousLayout()Returns the JDK default false. Round-trip lives on the emulator. -
setDividerSize
public void setDividerSize(int size) No Vaadin Java-side counterpart (splitter thickness is theme-controlled). Drop-and-WARN; round-trip + PCE on the emulator. -
getDividerSize
public int getDividerSize()Returns 0 (no L&F-installed default). Round-trip lives on the emulator. -
setLastDividerLocation
public void setLastDividerLocation(int location) No-op; round-trip + PCE on the emulator. JDK uses the value to snap the divider back on toggle. -
getLastDividerLocation
public int getLastDividerLocation()Returns the JDK sentinel -1. Round-trip lives on the emulator. -
getUIClassID
Swing constant for L&F lookup; SplitPaneUI 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
-