Class JSplitPane
java.lang.Object
vaadinx.awt.Component
vaadinx.awt.Container
vaadinx.swing.JComponent
vaadinx.swing.JSplitPane
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, FieldReconciler.Reconcilable
Emulator for
JSplitPane. See D_jsplitpane.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected booleanstatic final Stringstatic final Stringstatic final Stringprotected intstatic final intJDK horizontal-split sentinel — children sit side-by-side.static final Stringprotected intstatic final Stringprotected Componentstatic final Stringprotected booleanprotected intstatic final Stringstatic final Stringstatic final Stringprotected Componentstatic final Stringstatic final intJDK vertical-split sentinel — children stack top/bottom.Fields inherited from class JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, FILL_CHROME, FILL_DEFAULT, LEFT_ALIGNMENT, listenerList, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionJSplitPane(int orientation) JSplitPane(int orientation, boolean continuousLayout) JSplitPane(int orientation, boolean continuousLayout, Component left, Component right) JSplitPane(int orientation, Component left, Component right) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidJDK JSplitPane.addImpl routes constraint strings (LEFT/RIGHT/TOP/ BOTTOM/DIVIDER) into the slot setters.intintintintintJDK reads from the UI delegate's pixel coords; we have no such thing (R_layouts_close_enough).intdoublegetUI()booleanbooleanprotected Stringfinal voidD_field_write_reconcile repair hook — seeJSlider.reconcileFields().voidBest-effort snap-back per R_best_effort_behaviour — forwards to the surrogate which writes splitter position 50/50, AND resets the int field shadow to -1 + fires"dividerLocation"PCE if the prior value was non-sentinel.voidvoidsetContinuousLayout(boolean b) voidsetDividerLocation(double proportional) Proportional 0–1 form — forwards to the surrogate (which multiplies by 100 and writes splitter position).voidsetDividerLocation(int location) Field-shadows the int value, fires"dividerLocation"PCE on change, does NOT touch the peer.voidsetDividerSize(int size) voidsetLastDividerLocation(int location) voidSet the primary slot occupant.voidsetOneTouchExpandable(boolean b) voidsetOrientation(int orientation) The surrogate validates the argument and applies the split; the"orientation"fire has to happen here too.voidsetResizeWeight(double weight) Round-trip the weight on the emulator only — Vaadin SplitLayout has no Java-side flex-weight knob.voidvoidvoidsetUI(SplitPaneUI ui) voidupdateUI()protected voidMethods inherited from class JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, addSlotChild, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, fireHierarchyEvent, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, peerContentElement, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeSlotChild, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validateMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyBackgroundToPeer, applyVisibleToPeer, awtListeners, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, defaultFillCssClass, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, fireComponentEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isThemeDefault, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, suppressMouseBridge, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, withPeer, withPeerOnLiveUI
-
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:
-
LEFT
- See Also:
-
RIGHT
- See Also:
-
TOP
- See Also:
-
BOTTOM
- See Also:
-
DIVIDER
- See Also:
-
ORIENTATION_PROPERTY
- See Also:
-
CONTINUOUS_LAYOUT_PROPERTY
- See Also:
-
DIVIDER_SIZE_PROPERTY
- See Also:
-
ONE_TOUCH_EXPANDABLE_PROPERTY
- See Also:
-
LAST_DIVIDER_LOCATION_PROPERTY
- See Also:
-
DIVIDER_LOCATION_PROPERTY
- See Also:
-
RESIZE_WEIGHT_PROPERTY
- See Also:
-
lastDividerLocation
protected int lastDividerLocation -
oneTouchExpandable
protected boolean oneTouchExpandable -
continuousLayout
protected boolean continuousLayout -
dividerSize
protected int dividerSize -
leftComponent
-
rightComponent
-
orientation
protected int orientation
-
-
Constructor Details
-
JSplitPane
public JSplitPane() -
JSplitPane
public JSplitPane(int orientation) -
JSplitPane
public JSplitPane(int orientation, boolean continuousLayout) -
JSplitPane
-
JSplitPane
-
-
Method Details
-
reconcileFields
public final void reconcileFields()D_field_write_reconcile repair hook — seeJSlider.reconcileFields().- Specified by:
reconcileFieldsin interfaceFieldReconciler.Reconcilable
-
getOrientation
public int getOrientation() -
setOrientation
public void setOrientation(int orientation) The surrogate validates the argument and applies the split; the"orientation"fire has to happen here too. The surrogate's own fire lands on the surrogate's listener list, which a migrator holding a JSplitPane never subscribes to — the two layers fan out independently (D_owed_events). -
setLeftComponent
Set the primary slot occupant. JDKHORIZONTAL_SPLITreads this as the left child;VERTICAL_SPLITreads it as the top child. Field-shadows the emulator-side reference, delegates to the surrogate's slot setter, and maintainsContainer.componentsvia the slot-child seam (D_jsplitpane_slot_tree_shape — JDK tree-shape fidelity, sibling fix to [D_shadow_children_tree_shape](#sub-decision-d35d--shadow-children-populate-containercomponents-for-r7-tree-shape-fidelity)).nullclears the slot — the old occupant is detached. -
setTopComponent
-
getLeftComponent
-
getTopComponent
-
setRightComponent
-
setBottomComponent
-
getRightComponent
-
getBottomComponent
-
addImpl
JDK JSplitPane.addImpl routes constraint strings (LEFT/RIGHT/TOP/ BOTTOM/DIVIDER) into the slot setters. We mirror that — null constraint with no left yet → left; null constraint with left but no right → right; otherwise drop-and-WARN.Per D_jsplitpane_slot_tree_shape the slot setters maintain
Container.componentsvia the slot-child seam, sogetComponentCount()matches JDK (2 with both slots filled). Vaadin SplitLayout owns the peer DOM placement viasetPrimaryComponent/setSecondaryComponent; the AWT-sidecomponentslist and the Vaadin-side slots are separate edges, both maintained per R_swing_is_truth. -
validateTree
protected void validateTree()- Overrides:
validateTreein classContainer
-
setDividerLocation
public void setDividerLocation(int location) Field-shadows the int value, fires"dividerLocation"PCE on change, does NOT touch the peer. Vaadin's splitter is percent-only and we have no container width to translate (R_layouts_close_enough). The surrogate-side setter logs WARN per SD_sjsplitpane; we don't reach for it here — the field round-trip suffices on the emulator path. -
setDividerLocation
public void setDividerLocation(double proportional) Proportional 0–1 form — forwards to the surrogate (which multiplies by 100 and writes splitter position). Does NOT update the int field shadow (different semantic — JDK's proportional form doesn't pre-compute a pixel value), does NOT fire PCE (no Integer pixels to put in the event, same gap as drag-end PCE). -
getDividerLocation
public int getDividerLocation() -
getLastDividerLocation
public int getLastDividerLocation() -
setLastDividerLocation
public void setLastDividerLocation(int location) -
getMinimumDividerLocation
public int getMinimumDividerLocation()JDK reads from the UI delegate's pixel coords; we have no such thing (R_layouts_close_enough). Drop-and-WARN, return -1. -
getMaximumDividerLocation
public int getMaximumDividerLocation() -
resetToPreferredSizes
public void resetToPreferredSizes()Best-effort snap-back per R_best_effort_behaviour — forwards to the surrogate which writes splitter position 50/50, AND resets the int field shadow to -1 + fires"dividerLocation"PCE if the prior value was non-sentinel. -
getResizeWeight
public double getResizeWeight() -
setResizeWeight
public void setResizeWeight(double weight) Round-trip the weight on the emulator only — Vaadin SplitLayout has no Java-side flex-weight knob. JLawyer callssetResizeWeight(0.0)on the outer split and0.45on the inner one; the values round-trip but don't affect Vaadin's flex distribution. -
isOneTouchExpandable
public boolean isOneTouchExpandable() -
setOneTouchExpandable
public void setOneTouchExpandable(boolean b) -
isContinuousLayout
public boolean isContinuousLayout() -
setContinuousLayout
public void setContinuousLayout(boolean b) -
getDividerSize
public int getDividerSize() -
setDividerSize
public void setDividerSize(int size) -
getUIClassID
- Overrides:
getUIClassIDin classJComponent
-
updateUI
public void updateUI()- Overrides:
updateUIin classJComponent
-
getUI
- Overrides:
getUIin classJComponent
-
setUI
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible- Overrides:
getAccessibleContextin classComponent
-
paramString
- Overrides:
paramStringin classJComponent
-