Interface ContainerMixin
- All Superinterfaces:
ComponentMixin, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, Serializable
- All Known Subinterfaces:
AbstractButtonMixin, JComponentMixin, 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, SScrollPane, SWindow
Container API surface on top of
ComponentMixin.
Excluded entirely: add(Component), remove(Component),
getComponent(int), getComponents(),
getComponentCount(), isAncestorOf(Component) —
Vaadin's own child-management API on HasComponents wins.
setLayout stores the LayoutManager via
LayoutStore and applies layout CSS to the surrogate's element
for the two built-in LayoutManager types
(FlowLayout / BorderLayout).
Per-child grid-area writes for
BorderLayout's region constraints aren't covered here — pure-surrogate
users that need region-anchored layout currently rebuild the DOM in
concrete-surrogate code; the :emulators.BorderLayout.addLayoutComponent
path keeps owning that for emulator-stage migrators.
addContainerListener / removeContainerListener /
getContainerListeners are Bucket B SHelper.onNoop(Object, String) (see
SD_listeners_without_analog): Vaadin 25 has no server-side child-list mutation event. Vaadin
8's ComponentContainer.addComponentAttachListener() was
removed in the Flow rewrite and never reinstated — we cannot observe
our own children being added or removed from a generic mixin. A
concrete container surrogate (e.g. an SPanel) could override
HasComponents.add / remove and fire the event itself;
that's scope-bound per-surrogate work. getContainerListeners()
returns an empty array — honestly reflecting the fact that a
registered listener on this mixin would never fire.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddContainerListener(SContainerListener listener) Bucket BSHelper.onNoop(Object, String)— see class-level javadoc for the SD_listeners_without_analog rationale.default SContainerListener[]Always an empty array — nothing registered; see class-level javadoc.default LayoutManagerReturns whateversetLayout(LayoutManager)last stored.default voidDeliberate no-op like theComponentMixin.paint(Graphics)family.default voidPrint-pipeline counterpart topaintComponents(java.awt.Graphics).default voidremoveContainerListener(SContainerListener listener) Bucket BSHelper.onNoop(Object, String).default voidsetLayout(LayoutManager mgr) Stores theLayoutManagerand, for the two built-in JDK types (FlowLayout/BorderLayout), applies the equivalent container-wide CSS to the surrogate's element viaLayoutCss.applyContainerCss(Element, String, Map).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, setEnabled, setFocusable, setFont, setForeground, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setToolTipText, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validateMethods 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
-
Method Details
-
setLayout
Stores theLayoutManagerand, for the two built-in JDK types (FlowLayout/BorderLayout), applies the equivalent container-wide CSS to the surrogate's element viaLayoutCss.applyContainerCss(Element, String, Map). Custom or unrecognised layout managers store but don't dispatch — the renderer ends up with default block flow, matching the pre-Track-A inert behaviour. The previous manager's container CSS is cleared first viaLayoutCss.resetContainerCss(Element), so replacing a built-in layout with a custom one — or withnull, which clears the store — leaves plain block flow rather than the old layout's keys. -
getLayout
Returns whateversetLayout(LayoutManager)last stored. -
addContainerListener
Bucket BSHelper.onNoop(Object, String)— see class-level javadoc for the SD_listeners_without_analog rationale. -
removeContainerListener
Bucket BSHelper.onNoop(Object, String). -
getContainerListeners
Always an empty array — nothing registered; see class-level javadoc. -
paintComponents
Deliberate no-op like theComponentMixin.paint(Graphics)family. -
printComponents
Print-pipeline counterpart topaintComponents(java.awt.Graphics).
-