Layout manager implementation that logically splits component area into five areas: top, bottom, left, right and center. Top and bottom components are stretched to fill all available space horizontally and are sized to have preferred height horizontally. Left and right components are stretched to fill all available space vertically and are sized to have preferred width vertically. Center component is stretched to occupy all available space taking in account top, left, right and bottom components.
// create panel with border layout var p = new zebkit.ui.Panel(new zebkit.layout.BorderLayout()); // add children UI components with top, center and left constraints p.add("top", new zebkit.ui.Label("Top")); p.add("center", new zebkit.ui.Label("Center")); p.add("left", new zebkit.ui.Label("Left"));
Construct the layout with the given vertical and horizontal gaps.
horizontal gap. The gap is a horizontal distance between laid out components
vertical gap. The gap is a vertical distance between laid out components