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:
  • Field Details

    • VERTICAL_SPLIT

      public static final int VERTICAL_SPLIT
      JDK vertical-split sentinel — children stack top/bottom.
      See Also:
    • HORIZONTAL_SPLIT

      public static final int HORIZONTAL_SPLIT
      JDK 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()
    • setOrientation

      public void setOrientation(int orientation)
      JDK-shaped int setter. Validates per R_match_swing_errors, forwards to the inherited SplitLayout.setOrientation(SplitLayout.Orientation), fires "orientation" PCE on actual change.
    • setLeftComponent

      public void setLeftComponent(com.vaadin.flow.component.Component c)
      Set the primary slot occupant. JDK HORIZONTAL_SPLIT reads this as the left child; VERTICAL_SPLIT reads it as the top child. Replaces any existing primary occupant per Vaadin's setComponent(c, slotName) semantics.
    • setTopComponent

      public void setTopComponent(com.vaadin.flow.component.Component c)
      Alias for setLeftComponent(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()
    • setRightComponent

      public void setRightComponent(com.vaadin.flow.component.Component c)
      Set the secondary slot occupant. JDK HORIZONTAL_SPLIT reads this as the right child; VERTICAL_SPLIT reads it as the bottom child. Replaces any existing secondary occupant.
    • setBottomComponent

      public void setBottomComponent(com.vaadin.flow.component.Component c)
      Alias for setRightComponent(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()
    • setDividerLocation

      public void setDividerLocation(double proportional)
      Proportional divider position, 0.0–1.0. Multiplies by 100 and forwards to SplitLayout.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

      public String getUIClassID()
      Swing constant for L&F lookup; SplitPaneUI isn't pluggable here.
      Specified by:
      getUIClassID in interface JComponentMixin
    • updateUI

      public void updateUI()
      L&F swap — no-op for us; Vaadin owns the DOM.
      Specified by:
      updateUI in interface JComponentMixin
    • setUI

      public void setUI(SplitPaneUI ui)
      L&F surgery isn't modelled; WARN so integration gaps surface.
    • getAccessibleContext

      public AccessibleContext getAccessibleContext()