Class BorderLayout

java.lang.Object
vaadinx.awt.BorderLayout
All Implemented Interfaces:
Serializable, CssEmittingLayoutManager, LayoutManager, LayoutManager2

public class BorderLayout extends Object implements LayoutManager2, CssEmittingLayoutManager, Serializable
Emulator for BorderLayout. Under D_layout_css_on_content, LayoutManager.layoutContainer(Container) writes display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto 1fr auto; grid-template-areas: …; gap: … to the container's peer content element, and addLayoutComponent(Component, Object) writes a per-child grid-area matching the Swing constraint.

Hand-written rather than generator-emitted for the same reason FlowLayout is — the generator's root-class detection would attach a peer field to a LayoutManager.

LINE_START / LINE_END caveat. Real Swing's BorderLayout flips LINE_START between west and east based on the container's ComponentOrientation. CSS grid-area names aren't orientation-aware, and re-writing the area name on every orientation change would require tracking orientation at layoutContainer time. We pin the LTR mapping (LINE_START → west, LINE_END → east) and document the limitation; R_layouts_close_enough applies.

See Also: