Class SJPanel
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Div
com.vaadin.swingbridge.surrogates.SJPanel
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Div>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasComponentsOfType<com.vaadin.flow.component.Component>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, ComponentMixin, ContainerMixin, JComponentMixin, Serializable
Surrogate for
JPanel (SD_sjpanel). Extends Vaadin
Div directly (is-a) so it reaches the migrator either through
:emulators.JPanel as peer, or as a richer-than-stock Vaadin
container in its own right.
Why Div as peer
Bare HasComponents container — no shadow DOM (so the inline-flex / border / opaque / background CSS the inheritedJComponentMixin writes lands on the host element where it
actually renders), no Vaadin-specific value/selection/event behaviour
to override. Same peer the existing emulator already uses.
Inherited mixin surface
Almost the entire JPanel surface comes fromJComponentMixin:
setLayout +
CSS dispatch (recognises FlowLayout /
BorderLayout, custom LayoutManagers store-but-don't-
dispatch), setOpaque + lossy CSS
readback, setBorder
+ CSS round-trip (SD_border_css_lossy), add / remove via inherited
HasComponents, focus / key / ancestor / mouse / property-change /
client-property surface from JComponentMixin. SJPanel itself adds
only the four ctors + L&F surface + paramString tail.
Default opaque divergence
JDK JPanel installsopaque=true via L&F at construction.
The mixin's setOpaque is Vaadin-first (no shadow store) and
its readback is lossy CSS-based: a fresh SJPanel with no background
set reports isOpaque() == false
even after setOpaque(true) (no background-color CSS to read
back). R_vaadin_first-accepted lossy direction; emulator-side :emulators.JPanel
preserves the JDK-faithful true via field shadow per R_swing_is_truth
(two-layer split, same shape SD_sjbutton takes for state-conditional icons
and SD_toggle_checkbox_first_cut takes for borderPaintedFlat).- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText
com.vaadin.flow.component.HasText.WhiteSpaceNested 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
ConstructorsConstructorDescriptionSJPanel()SJPanel(boolean isDoubleBuffered) SJPanel(LayoutManager layout) SJPanel(LayoutManager layout, boolean isDoubleBuffered) -
Method Summary
Modifier and TypeMethodDescriptionSwing constant for L&F lookup; PanelUI isn't pluggable here.protected StringJDK JPanel.paramString chains up and adds nothing — JPanel has no state of its own beyond what JComponent (opaque, doubleBuffered) and Container (layout=) already report.voidL&F surgery isn't modelled; WARN so integration gaps surface. setUI's parameter type doesn't clash with Vaadin's setUI signature (no such method on Div), so the JDK-typed setter survives as a plain method.voidupdateUI()L&F swap — no-op for us; Vaadin owns the DOM.Methods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods 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.HasComponents
addMethods inherited from interface com.vaadin.flow.component.HasComponentsOfType
add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replaceMethods 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.HasText
bindText, getText, getWhiteSpace, setText, setWhiteSpaceMethods 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
-
SJPanel
public SJPanel() -
SJPanel
public SJPanel(boolean isDoubleBuffered) -
SJPanel
-
SJPanel
-
-
Method Details
-
getUIClassID
Swing constant for L&F lookup; PanelUI 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. setUI's parameter type doesn't clash with Vaadin's setUI signature (no such method on Div), so the JDK-typed setter survives as a plain method. -
paramString
JDK JPanel.paramString chains up and adds nothing — JPanel has no state of its own beyond what JComponent (opaque, doubleBuffered) and Container (layout=) already report. We don't model AbstractButton/JComponent paramString chains, so the tail is empty here too. -
getAccessibleContext
-