Package vaadinx.awt
vaadinx.awt reproduces the Component
/ Container hierarchy the vaadinx.swing emulators build
on. Each emulator holds one Vaadin peer by composition (D_emulator_surrogate_split) and drives
it to match the Swing-side state it stores (R_swing_is_truth); EHelper holds the
hand-written plumbing shared across the generated scaffolds.
This is the overview, not the authority — see CLAUDE.md and
emulators/architecture.md for the whole picture. It lives at package
level because the hierarchy root Component is a regenerated
scaffold: a class-level home for the contract below would be clobbered on the
next generator run.
UI-thread-confined. Every emulator (and the Vaadin peer
beneath it) is a Vaadin component, so all methods must run on the session's UI
thread — the emulated EDT. Migrated code reaching in from a background thread
marshals through SwingUtilities.invokeLater(Runnable) /
UI.access, exactly as real Swing requires the EDT; peer→Swing event callbacks
re-enter on the UI thread through EHelper.callSwing(Runnable) (R_callswing_envelope). The
concurrency primitives in vaadinx.swing (Timer,
SwingWorker, SwingUtilities) are the
deviations — they self-marshal delivery onto the UI thread — and carry their own
thread contracts.
-
ClassDescriptionEmulator for
BorderLayout.Per-UI snapshot of the browser's client-specific display facts thatToolkit's screen accessors need but a headless server JVM cannot supply: the viewport size, device-pixel ratio, and whether the client is a Mac / iOS device (used to choose the menu-shortcut modifier —METAon macOS / iOS,CTRLelsewhere).Emulator forButton— a thin delegating shell over itsSButtonpeer.Emulator forCheckboxGroup— the AWT 1.0 radio-button mutex.Emulator forComponent.Emulator forContainer.ALayoutManagerthat positions children by emitting CSS onto the container's peer<div>(and optionally onto each child) instead of the pixelsetBoundsarithmetic a desktopLayoutManagerdoes — there is no synchronous child-size measurement in the browser to drive that arithmetic.Emulator forDialog, rendered bySFrame.AWT's modality type — controls which other windows the modal Dialog blocks.Emulator forEventQueue.Emulator forFileDialog.Emulator forFlowLayout.Emulator forFrame.Import-swap target forGraphicsConfiguration— the browser viewport's single display configuration (D_graphics_environment).Import-swap target forGraphicsDevice— the browser viewport as the one screen a migrated app has (D_graphics_environment).Kinds of per-window translucency a device may support; none are, here.Import-swap target forGraphicsEnvironment— the browser viewport presented as a local display, so the maximize-to-screen idiom ports unchanged:Emulator forGridBagLayout.Emulator forGridLayout(D_gridlayout).Emulator forKeyboardFocusManager— who has focus, and moving it on (D_focus_managers).Port ofLayoutManager.Port ofLayoutManager2.Emulator forScrollbar— the AWT 1.0 scrollbar, notJScrollBar.Emulator forScrollPane— AWT's scrolling container, notJScrollPane.Emulator forScrollPaneAdjustable— the value model behind one axis of aScrollPane.Import-swap target forToolkit— a full-surface emulator (D_toolkit_full_surface).Emulator forWindow.