Interface JComponentMixin
- All Superinterfaces:
ComponentMixin, ContainerMixin, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, Serializable
- All Known Subinterfaces:
AbstractButtonMixin, JTextComponentMixin
- All Known Implementing Classes:
SFrame, SJButton, SJCheckBox, SJColorChooser, SJComboBox, SJDialog, SJEditorPane, SJFormattedDatePicker, SJFormattedIntegerField, SJFormattedLongField, SJFormattedNumberField, SJFormattedTextField, SJFrame, SJInternalFrame, SJLabel, SJList, SJMenuBar, SJPanel, SJPasswordField, SJPopupMenu, SJProgressBar, SJRadioButton, SJRootPane, SJScrollPane, SJSeparator, SJSlider, SJSpinner, SJSplitPane, SJTabbedPane, SJTable, SJTextArea, SJTextField, SJToggleButton, SJToolBar, SJTree, SJWindow, SWindow
JComponent API surface on top
of ContainerMixin. Under the Vaadin-first stance (SD_vaadin_first_binding), the
concrete behavioural additions are:
- Client properties via
ClientPropertyStore. - Opaque flag via lossy CSS
background-colorreadback (no shadow store). - Border round-trip through CSS via
BorderCss.applyBorderCss(Element, Border)/BorderCss.borderFromCss(Element)(SD_border_css_lossy — lossy). - InputMap/ActionMap storage via
InputMapStore(lazy-alloc, no browser-side shortcut wiring — see SD_vaadin_first_binding deferral). setToolTipText(String)override that adds the"ToolTipText"PCE fire on top ofContainerMixin's HasTooltip delegation.- Static default-locale accessors backed by
VaadinSession. getTopLevelAncestor()walks the Vaadin parent chain for the firstDialogancestor — Vaadin's closest analog to a Swing "top-level window" (SD_top_level_ancestor).
The bulk of the JComponent surface that doesn't map to a Vaadin
feature (paint pipeline, L&F, ancestor/vetoable listeners, transfer
handler, focus traversal, keyboard-action dispatch, etc.) is split
between SHelper.onNoop(Object, String) (redundant by design) and
SHelper.onUnimplemented(Object, String, Object...) (behaviour we'd need to build). See the
"Bucket B" and "Bucket C" comment headers below for the split.
Static methods on this interface are callable only via
JComponentMixin.getDefaultLocale() etc. — Java interface
statics aren't inherited by implementors, which matches JDK
JComponent.getDefaultLocale() in practice.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classAdapter wrapping a plainActionListeneras a JDKAction. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringJComponent's tooltip-text property name — this exact spelling (capital T) is what migrated PCE listeners filter on.static final intReturned bygetConditionForKeyStroke(KeyStroke)when the stroke isn't bound.static final intCondition: binding fires when this component is an ancestor of the focused component.static final intCondition: binding fires when this component holds keyboard focus.static final intCondition: binding fires when this component is in the focused top-level window. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddAncestorListener(SAncestorListener listener) Wired via Vaadin attach / detach listeners.default voidR_vaadin_first drop-and-WARN — see section comment.default voidcomputeVisibleRect(Rectangle visibleRect) FillsvisibleRectwith(0, 0, width, height); origin is always (0, 0) under CSS flow.default booleancontains(int x, int y) Rectangle hit-test againstComponentMixin.getSize().default JToolTipSwing'sJToolTipfactory — we don't model JToolTip.default voidfirePropertyChange(String propertyName, char oldValue, char newValue) Char overload — JDK boxes for listener delivery.default voidfireVetoableChange(String propertyName, Object oldValue, Object newValue) R_vaadin_first drop-and-WARN — does not throw.default ActionListenergetActionForKeyStroke(KeyStroke stroke) Resolve InputMap → action key → ActionMap → ActionListener.default ActionMapLazy-allocatedActionMap.default floatSwing default is0.5f(CENTER_ALIGNMENT).default floatSeegetAlignmentX().default SAncestorListener[]Returns the currently registered listeners in registration order.default booleanSwing default:false.default intgetBaseline(int width, int height) -1means "no baseline info" per Swing's contract.default Component.BaselineResizeBehaviorNo baseline =OTHER.default BorderReconstructs the closestBorderfrom current CSS;nullwhen unset.default RectangleFill-the-arggetBounds— reads fromComponentMixin.getBounds().default ObjectgetClientProperty(Object key) Null key returns null (not NPE — diverges fromputClientProperty(Object, Object)on purpose, matching JDK's asymmetry).default GraphicsDeliberate no-op; no offscreen Graphics.default SJPopupMenuThe installed component popup, ornull.default intgetConditionForKeyStroke(KeyStroke stroke) Walk in JDK's documented order (focused / ancestor / window) and return the first condition whose InputMap bindsstroke;UNDEFINED_CONDITIONwhen not bound anywhere.default intSwing'sDebugGraphics.NONE_OPTION.static LocaleReadsVaadinSession.getCurrent()+VaadinSession.getLocale().default booleanSwing default:false.default InputMapEquivalent togetInputMap(WHEN_FOCUSED).default InputMapgetInputMap(int condition) Lazy-allocated InputMap forcondition.default InputVerifierReads back the installed verifier.default InsetsUses the installed border's insets when present, else zero.default InsetsFill-the-arg variant.default PointgetLocation(Point rv) Fill-the-arggetLocation— reads fromComponentMixin.getLocation().default com.vaadin.flow.component.ComponentNo deprecated next-focusable-component installed.default PointgetPopupLocation(MouseEvent event) default KeyStroke[]Union of strokes registered across all three conditions.default SJRootPaneWalks the Vaadin parent chain and returns the firstSJRootPaneancestor, ornullif none.default DimensionFill-the-arggetSize— reads fromComponentMixin.getSize().default PointgetToolTipLocation(MouseEvent event) Popup location per hover; not modelled.default StringgetToolTipText(MouseEvent event) JDK's location-aware tooltip variant lets a component return different tooltip text per hover point.default com.vaadin.flow.component.ComponentWalks the Vaadin parent chain and returns the firstDialogancestor, ornullif none — which includes the detached case and the route-level case (no enclosing Dialog).default TransferHandlerNo transfer handler.default StringDeliberate no-op — L&F key.default booleanSwing default:true.default VetoableChangeListener[]R_vaadin_first drop-and-WARN — returns empty array.default RectangleReturns a freshRectangleat origin with current size.default booleanWe don't paint (R_layouts_close_enough), so honest default isfalse.static booleanisLightweightComponent(com.vaadin.flow.component.Component c) Returnstrueunconditionally — there's no heavyweight/native-peer concept in the browser, every Vaadin component is lightweight from the AWT perspective.default booleanisOpaque()Reads CSSbackground-color: unset or"transparent"→ false (matches JDK JComponent default +falsesemantics); any other value → true.default booleanSwing default:true.default booleanPaint-internal flag; never set under R_layouts_close_enough.default booleanPaint-internal flag; never set under R_layouts_close_enough.default booleanSwing default:true.default booleanSwing default:false.default voidpaintImmediately(int x, int y, int w, int h) Deliberate no-op; browser repaints on DOM mutation.default voidDeliberate no-op.default voidBucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent).default booleanprocessKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) Bucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent).default voidBucket BSHelper.onNoop(Object, String)— ghost method.default voidBucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent).default voidBucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent).default voidputClientProperty(Object key, Object value) Swing contract: nullvalueremoves the mapping; firing aPropertyChangeEventnamed afterkey.toString()when the value changes.default voidregisterKeyboardAction(ActionListener action, String command, KeyStroke stroke, int condition) Wrapsactionin anJComponentMixin.ActionStandin, stores it in the (condition) InputMap and the ActionMap, and installs a VaadinShortcutslistener that drives the action throughSHelper.callSwing(Runnable).default voidregisterKeyboardAction(ActionListener action, KeyStroke stroke, int condition) default voidremoveAncestorListener(SAncestorListener listener) Symmetric — removes both peer subscriptions wired byaddAncestorListener(SAncestorListener).default voidR_vaadin_first drop-and-WARN — seeaddVetoableChangeListener(VetoableChangeListener).default booleanWARN — deprecated focus-traversal API.default voidClear every condition's InputMap, the ActionMap, and tear down every Vaadin shortcut installed via this surrogate.default voidreshape(int x, int y, int w, int h) Deprecated AWT 1.0 alias for setBounds; routes through it.default voidscrollRectToVisible(Rectangle aRect) Scrolls this component into the visible browser viewport.default voidsetActionMap(ActionMap map) Replaces the storedActionMap.default voidsetAlignmentX(float alignmentX) Bucket BSHelper.onNoop(Object, String)— getters always return 0.5f (CENTER).default voidsetAlignmentY(float alignmentY) SeesetAlignmentX(float).default voidsetAutoscrolls(boolean autoscrolls) Bucket BSHelper.onNoop(Object, String)— drag-autoscroll has no Vaadin counterpart.default voidComputes the effective CSS fromnewBorderand applies to the element, then fires"border"PCE.default voidsetComponentPopupMenu(SJPopupMenu popup) Install (or clear) this component's context popup (SD_sjpopupmenu).default voidsetDebugGraphicsOptions(int debugOptions) Bucket BSHelper.onNoop(Object, String)— debug-paint pipeline has no Vaadin counterpart.static voidsetDefaultLocale(Locale locale) Writes through toVaadinSession.setLocale(java.util.Locale).default voidsetDoubleBuffered(boolean value) Bucket BSHelper.onNoop(Object, String)— we don't paint; double-buffering has nothing to apply to.default voidsetEnabled(boolean enabled) Fires the"enabled"property change thatJComponent.setEnabledfires andjava.awt.Component.setEnableddoes not — the whole reason this override exists at the JComponent level rather than onComponentMixin(SD_property_fanout_audit).default voidsetFocusTraversalKeys(int id, Set<? extends AWTKeyStroke> keystrokes) WARN — AWT focus traversal keys not modelled (browser Tab handles equivalent).default voidsetInheritsPopupMenu(boolean value) Bucket BSHelper.onNoop(Object, String)— popup-menu inheritance not modelled.default voidsetInputMap(int condition, InputMap map) Replaces the stored InputMap forcondition: tears down every Vaadin shortcut we'd installed for this condition first, since the replacement map may not carry the previous bindings forward and stale shortcuts would fire on keys the InputMap no longer binds.default voidInstallvas the blur-time verifier.default voidsetNextFocusableComponent(com.vaadin.flow.component.Component comp) WARN — deprecated focus-traversal API.default voidsetOpaque(boolean opaque) setOpaque(true)re-asserts the current background-color CSS viaComponentMixin.getBackground()(null → clear);setOpaque(false)overrides withtransparentso the parent's background renders through.default voidsetRequestFocusEnabled(boolean enabled) Bucket BSHelper.onNoop(Object, String)— focus-disable has no Vaadin counterpart.default voidsetToolTipText(String text) OverridesContainerMixin's inherited tooltip delegation to add the"ToolTipText"PCE fire that JComponent's contract promises.default voidsetTransferHandler(TransferHandler handler) WARN — drag-and-drop not modelled.default voidsetUI(ComponentUI ui) Deliberate no-op — we have noComponentUIto install.default voidsetVerifyInputWhenFocusTarget(boolean value) Bucket BSHelper.onNoop(Object, String).default voidunregisterKeyboardAction(KeyStroke stroke) Remove the binding forstrokefrom every condition's InputMap, drop its ActionMap entry, and uninstall the matching Vaadin shortcut.default voidupdateUI()Deliberate no-op — L&F dispatch isn't modelled.Methods 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.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, setWidthFull
-
Field Details
-
WHEN_FOCUSED
static final int WHEN_FOCUSEDCondition: binding fires when this component holds keyboard focus.- See Also:
-
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
static final int WHEN_ANCESTOR_OF_FOCUSED_COMPONENTCondition: binding fires when this component is an ancestor of the focused component.- See Also:
-
WHEN_IN_FOCUSED_WINDOW
static final int WHEN_IN_FOCUSED_WINDOWCondition: binding fires when this component is in the focused top-level window.- See Also:
-
UNDEFINED_CONDITION
static final int UNDEFINED_CONDITIONReturned bygetConditionForKeyStroke(KeyStroke)when the stroke isn't bound.- See Also:
-
TOOL_TIP_TEXT_KEY
JComponent's tooltip-text property name — this exact spelling (capital T) is what migrated PCE listeners filter on.- See Also:
-
-
Method Details
-
setEnabled
default void setEnabled(boolean enabled) Fires the"enabled"property change thatJComponent.setEnabledfires andjava.awt.Component.setEnableddoes not — the whole reason this override exists at the JComponent level rather than onComponentMixin(SD_property_fanout_audit).Old value is read through
HasEnabled.isEnabled()(Vaadin's effective enabled), so a disabled ancestor masks the local flag — matching what user code can observe through the same getter.- Specified by:
setEnabledin interfaceComponentMixin- Specified by:
setEnabledin interfacecom.vaadin.flow.component.HasEnabled
-
getDefaultLocale
ReadsVaadinSession.getCurrent()+VaadinSession.getLocale(). ThrowsNullPointerExceptionwhen no session is current — matches Swing's expectation that the default locale is always addressable, but honest about where it actually lives in the web model (per-session, not per-classloader AppContext). -
setDefaultLocale
Writes through toVaadinSession.setLocale(java.util.Locale). ThrowsNullPointerExceptionwhen no session is current — same rationale asgetDefaultLocale(). -
isLightweightComponent
static boolean isLightweightComponent(com.vaadin.flow.component.Component c) Returnstrueunconditionally — there's no heavyweight/native-peer concept in the browser, every Vaadin component is lightweight from the AWT perspective. Signature takes Vaadin'sComponentrather thanjava.awt.Component(migrated surrogates are Vaadin components, not AWT components — SD_naming signature clash rule). -
putClientProperty
Swing contract: nullvalueremoves the mapping; firing aPropertyChangeEventnamed afterkey.toString()when the value changes. Null key throwsNullPointerException— matches JDK. -
getClientProperty
Null key returns null (not NPE — diverges fromputClientProperty(Object, Object)on purpose, matching JDK's asymmetry). Missing keys also return null. -
setOpaque
default void setOpaque(boolean opaque) setOpaque(true)re-asserts the current background-color CSS viaComponentMixin.getBackground()(null → clear);setOpaque(false)overrides withtransparentso the parent's background renders through."opaque"PCE fires on transition so migrated MVC sees the change.No shadow store per R_vaadin_first — opacity state lives entirely in the rendered CSS.
isOpaque()reads it back lossily: CSSbackground-colorunset or"transparent"→ false; any explicit color → true. Two accepted lossy directions:setBackground(red)on a default-opaque component flipsisOpaque()from false to true, even though JDK's contract says the two are independent — under our model, "is the rendered background visible?" is whatisOpaque()answers, and CSS background drives rendering regardless of the JDK flag.setOpaque(true)without a priorsetBackgroundleaves CSS unset (we don't model UIManager's L&F default fill colour), soisOpaque()reads back as false. Callers that want true round-trip set the background first.
setOpaque(false)→setOpaque(true)also loses the previous color (CSS at intermediate state was"transparent", whichCssConvert.colorFromCss(String)reads as null). Migrators needing strict JDK round-trip register on the emulator layer (R_swing_is_truth shadow-plus-drive-peer) or re-assertsetBackgroundafter flipping back to true. -
isOpaque
default boolean isOpaque()Reads CSSbackground-color: unset or"transparent"→ false (matches JDK JComponent default +falsesemantics); any other value → true. Lossy round-trip per R_vaadin_first — seesetOpaque(boolean). -
setToolTipText
OverridesContainerMixin's inherited tooltip delegation to add the"ToolTipText"PCE fire that JComponent's contract promises. Old value reads throughHasTooltip.getTooltip()before the write, so listeners registered for"ToolTipText"see the before/after pair.No field storage (SD_vaadin_first_binding) — non-HasTooltip peers log onUnimplemented and skip the PCE since there's no value to round-trip.
The
"ToolTipText"event is the JDK's, reached by a different route:JComponent.setToolTipTexthas no fire of its own and gets one because it stores the text viaputClientProperty, which fireskey.toString(). A surrogate has no client-property table (that would be a shadowStore, R_vaadin_first), so the fire is direct here — same name, same values, and not an invented event (D_property_fanout_audit).- Specified by:
setToolTipTextin interfaceComponentMixin
-
setBorder
Computes the effective CSS fromnewBorderand applies to the element, then fires"border"PCE.BorderCss.applyBorderCss(Element, Border)clears the previous border's keys first.nullis a clear.SD_border_css_lossy: the border↔CSS round-trip is lossy — custom
Borderimplementations,TitledBorder, andCompoundBorderwith a non-EmptyBorder inner log viaonUnimplementedand render nothing. -
getBorder
-
getInsets
Uses the installed border's insets when present, else zero. -
getInsets
-
getBounds
Fill-the-arggetBounds— reads fromComponentMixin.getBounds(). -
getLocation
Fill-the-arggetLocation— reads fromComponentMixin.getLocation(). -
getSize
Fill-the-arggetSize— reads fromComponentMixin.getSize(). -
contains
default boolean contains(int x, int y) Rectangle hit-test againstComponentMixin.getSize(). Swing's JComponent extends this to ask the UI delegate; we have no UI delegate (R_layouts_close_enough — browser owns hit-testing), so the rectangle answer is the closest honest match. -
scrollRectToVisible
Scrolls this component into the visible browser viewport. Ignores the requested rectangle (R_best_effort_behaviour close-enough). -
computeVisibleRect
FillsvisibleRectwith(0, 0, width, height); origin is always (0, 0) under CSS flow. -
getVisibleRect
-
getInputMap
Equivalent togetInputMap(WHEN_FOCUSED). -
getInputMap
Lazy-allocated InputMap forcondition. Migrated code's idiomaticgetInputMap().put(ks, key)round-trips through the stored map; browser-side shortcut wiring is deferred (SD_vaadin_first_binding) —registerKeyboardAction(ActionListener, KeyStroke, int)is the Bucket C WARN-stub for that.- Throws:
IllegalArgumentException- whenconditionisn't one of the threeWHEN_*constants (matches JDK).
-
getActionMap
-
setInputMap
Replaces the stored InputMap forcondition: tears down every Vaadin shortcut we'd installed for this condition first, since the replacement map may not carry the previous bindings forward and stale shortcuts would fire on keys the InputMap no longer binds.- Throws:
IllegalArgumentException- on an unknown condition.
-
setActionMap
-
setInputVerifier
Installvas the blur-time verifier. When the surrogate's peer is aBlurNotifier(most input components are), a blur subscription is installed that callsv.shouldYieldFocus; afalsereturn restores focus via the peer'sFocusable.focus()when the peer also implements that. The call routes throughSHelper.callSwing(Runnable)(R_callswing_envelope) so the blocking-dialog hook lands in one place.Replacing or clearing the verifier tears down the previous Vaadin registration through
InputVerifierStoreso the user-listener fan-out stays at one verify call per blur regardless of swap count. Non-BlurNotifierpeers store the verifier value (sogetInputVerifier()round-trips) but no blur subscription installs — there's no browser-side event to react to. PCE fires on the"inputVerifier"property per Swing's contract.R_vaadin_first lossy direct binding (SD_vaadin_first_binding): JDK's
InputVerifier.shouldYieldFocus(JComponent)expects ajavax.swing.JComponent, which the surrogate is not. The call passesnullas the source — user verifiers that read field state viainput.getText()need to tolerate null on the surrogate layer (or fetch the field through a captured reference). The emulator layer (vaadinx.swing.JComponent.setInputVerifier) passes the emulator JComponent and avoids this lossiness. Migration code that ports straight to the surrogate stage and relies on the source argument needs adjustment; the typical "is this field's text valid?" pattern works fine when the verifier closes over the field. -
getInputVerifier
Reads back the installed verifier.nullwhen none is installed. -
firePropertyChange
Char overload — JDK boxes for listener delivery. Complements the boolean/int overloads onContainerMixin. -
getAlignmentX
default float getAlignmentX()Swing default is0.5f(CENTER_ALIGNMENT). -
getAlignmentY
default float getAlignmentY()SeegetAlignmentX(). -
getBaseline
default int getBaseline(int width, int height) -1means "no baseline info" per Swing's contract. -
getBaselineResizeBehavior
No baseline =OTHER. -
isValidateRoot
default boolean isValidateRoot()Swing default:false. -
isOptimizedDrawingEnabled
default boolean isOptimizedDrawingEnabled()Swing default:true. -
isRequestFocusEnabled
default boolean isRequestFocusEnabled()Swing default:true. -
getVerifyInputWhenFocusTarget
default boolean getVerifyInputWhenFocusTarget()Swing default:true. -
isDoubleBuffered
default boolean isDoubleBuffered()We don't paint (R_layouts_close_enough), so honest default isfalse. -
getAutoscrolls
default boolean getAutoscrolls()Swing default:false. -
getInheritsPopupMenu
default boolean getInheritsPopupMenu()Swing default:false. -
getDebugGraphicsOptions
default int getDebugGraphicsOptions()Swing'sDebugGraphics.NONE_OPTION. -
isPaintingTile
default boolean isPaintingTile()Paint-internal flag; never set under R_layouts_close_enough. -
isPaintingForPrint
default boolean isPaintingForPrint()Paint-internal flag; never set under R_layouts_close_enough. -
getComponentPopupMenu
The installed component popup, ornull. Pairs withsetComponentPopupMenu(SJPopupMenu). -
getTransferHandler
No transfer handler. Pairs withsetTransferHandler(TransferHandler). -
getNextFocusableComponent
default com.vaadin.flow.component.Component getNextFocusableComponent()No deprecated next-focusable-component installed. -
getToolTipText
JDK's location-aware tooltip variant lets a component return different tooltip text per hover point. We don't wire mouse positions server-side (R_best_effort_behaviour), so return the static tooltip — code that doesn't override stays consistent. -
getToolTipLocation
Popup location per hover; not modelled. -
getPopupLocation
-
createToolTip
Swing'sJToolTipfactory — we don't model JToolTip. -
paintImmediately
default void paintImmediately(int x, int y, int w, int h) Deliberate no-op; browser repaints on DOM mutation. -
paintImmediately
Deliberate no-op. -
getComponentGraphics
-
updateUI
default void updateUI()Deliberate no-op — L&F dispatch isn't modelled. -
setUI
Deliberate no-op — we have noComponentUIto install. -
getUIClassID
Deliberate no-op — L&F key. -
reshape
default void reshape(int x, int y, int w, int h) Deprecated AWT 1.0 alias for setBounds; routes through it. -
setAutoscrolls
default void setAutoscrolls(boolean autoscrolls) Bucket BSHelper.onNoop(Object, String)— drag-autoscroll has no Vaadin counterpart. -
setInheritsPopupMenu
default void setInheritsPopupMenu(boolean value) Bucket BSHelper.onNoop(Object, String)— popup-menu inheritance not modelled. -
setComponentPopupMenu
Install (or clear) this component's context popup (SD_sjpopupmenu). Swing-flavoured helper over Vaadin's nativeContextMenuBase.setTarget(Component): the popup is targeted at this component, so a right-click (or long-press) opens it. Passingnullclears any previously installed popup. The stored reference (round-tripped bygetComponentPopupMenu()) is backed by the livesetTargetbinding, not a shadow cache. -
setRequestFocusEnabled
default void setRequestFocusEnabled(boolean enabled) Bucket BSHelper.onNoop(Object, String)— focus-disable has no Vaadin counterpart. -
setVerifyInputWhenFocusTarget
default void setVerifyInputWhenFocusTarget(boolean value) Bucket BSHelper.onNoop(Object, String). -
setDoubleBuffered
default void setDoubleBuffered(boolean value) Bucket BSHelper.onNoop(Object, String)— we don't paint; double-buffering has nothing to apply to. -
setDebugGraphicsOptions
default void setDebugGraphicsOptions(int debugOptions) Bucket BSHelper.onNoop(Object, String)— debug-paint pipeline has no Vaadin counterpart. -
setAlignmentX
default void setAlignmentX(float alignmentX) Bucket BSHelper.onNoop(Object, String)— getters always return 0.5f (CENTER). -
setAlignmentY
default void setAlignmentY(float alignmentY) SeesetAlignmentX(float). -
registerKeyboardAction
-
registerKeyboardAction
default void registerKeyboardAction(ActionListener action, String command, KeyStroke stroke, int condition) Wrapsactionin anJComponentMixin.ActionStandin, stores it in the (condition) InputMap and the ActionMap, and installs a VaadinShortcutslistener that drives the action throughSHelper.callSwing(Runnable). Unmappable strokes (keyCodes outsideKeyConvert.vkToVaadinKey(int)'s table) skip the browser-side install but keep the InputMap / ActionMap entries — server-sidegetActionForKeyStrokestill finds them. -
unregisterKeyboardAction
Remove the binding forstrokefrom every condition's InputMap, drop its ActionMap entry, and uninstall the matching Vaadin shortcut. Mirrors JDK's "remove across all conditions" shape. -
resetKeyboardActions
default void resetKeyboardActions()Clear every condition's InputMap, the ActionMap, and tear down every Vaadin shortcut installed via this surrogate. -
getRegisteredKeyStrokes
Union of strokes registered across all three conditions. -
getConditionForKeyStroke
Walk in JDK's documented order (focused / ancestor / window) and return the first condition whose InputMap bindsstroke;UNDEFINED_CONDITIONwhen not bound anywhere. -
getActionForKeyStroke
Resolve InputMap → action key → ActionMap → ActionListener. Returnsnullwhen the stroke isn't bound anywhere or the ActionMap has no entry for the key — matches JDK's "either reason → null". -
setTransferHandler
WARN — drag-and-drop not modelled. -
setNextFocusableComponent
default void setNextFocusableComponent(com.vaadin.flow.component.Component comp) WARN — deprecated focus-traversal API. -
requestDefaultFocus
default boolean requestDefaultFocus()WARN — deprecated focus-traversal API. -
setFocusTraversalKeys
WARN — AWT focus traversal keys not modelled (browser Tab handles equivalent). -
addAncestorListener
Wired via Vaadin attach / detach listeners.ANCESTOR_ADDEDfires on attach,ANCESTOR_REMOVEDon detach.ANCESTOR_MOVED(JDK fires on layout-position changes of any ancestor) is not modelled — Vaadin doesn't surface server-side layout-position events; documented as accepted incompleteness.Listener type retyped to
SAncestorListenerbecause JDK'sjavax.swing.event.AncestorEvent's ancestor / ancestorParent are typed asContainer, which we can't construct against a Vaadin component (SD_event_port_stance / D_event_port_policy). -
removeAncestorListener
Symmetric — removes both peer subscriptions wired byaddAncestorListener(SAncestorListener). -
getAncestorListeners
Returns the currently registered listeners in registration order. -
addVetoableChangeListener
R_vaadin_first drop-and-WARN — see section comment. -
removeVetoableChangeListener
R_vaadin_first drop-and-WARN — seeaddVetoableChangeListener(VetoableChangeListener). -
getVetoableChangeListeners
R_vaadin_first drop-and-WARN — returns empty array. -
fireVetoableChange
default void fireVetoableChange(String propertyName, Object oldValue, Object newValue) throws PropertyVetoException R_vaadin_first drop-and-WARN — does not throw.- Throws:
PropertyVetoException
-
getTopLevelAncestor
default com.vaadin.flow.component.Component getTopLevelAncestor()Walks the Vaadin parent chain and returns the firstDialogancestor, ornullif none — which includes the detached case and the route-level case (no enclosing Dialog). Dialog is Vaadin's closest analog to Swing's "top-level window": it owns a modal/popup frame the rest of the UI can sit inside.UIis deliberately not treated as top-level — every attached Vaadin component has a UI ancestor, so using UI would diverge from Swing's "null when no enclosing JFrame" contract.Handles the
:emulatorshandoff transparently: an emulatorJFramehas aDialogpeer, so a surrogate living inside that frame walks up to the Dialog and returns it. In a pure-surrogate tree (surrogate used as a plain Vaadin component under a route view, no Dialog wrapping), returnsnull— same as Swing would for a detached JPanel. -
getRootPane
Walks the Vaadin parent chain and returns the firstSJRootPaneancestor, ornullif none. Mirrors the JDKJComponent.getRootPane()contract (climb-until-root-pane) over the surrogate-layer types.Surrogate-layer divergence from JDK signature: returns
SJRootPane(Vaadin-rooted) rather thanjavax.swing.JRootPane. The same R_vaadin_first + SD_sjframe stance that drovegetTopLevelAncestor()to return VaadinComponentapplies here — SJRootPane is deliberately not a JDK JRootPane subclass (it extendscom.vaadin.flow.component.html.Div), so a JDK-typed accessor would have to either fabricate a wrapper or stay permanently null. The Vaadin-typed accessor letsSJFrameprovide a covariant override that returns its lazy-constructed pane, and lets standalone surrogates report a real ancestor when one exists. Migrators porting Swing code that read the JDK type adjust the variable type at the surrogate stage; the:emulators.JComponent.getRootPane()path keeps the JDK-typed signature for stage-2 import-swap compatibility. -
processKeyEvent
Bucket BSHelper.onNoop(Object, String)— ghost method. The JDK process* hooks are user-overridable dispatch entry points called by AWT's own event delivery; our event routing uses Vaadin-sourced events through theaddKeyListener/addMouseListenersurface and never reaches these overloads. These areonNooprather thanonUnimplemented: there's no upstream-blocked counterpart we're waiting on — these will not graduate. -
processComponentKeyEvent
Bucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent). -
processKeyBinding
Bucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent). -
processMouseEvent
Bucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent). -
processMouseMotionEvent
Bucket BSHelper.onNoop(Object, String)— seeprocessKeyEvent(KeyEvent).
-