Zebra API Doc

zebra.layout.BorderLayout Class

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 zebra.ui.Panel(new zebra.layout.BorderLayout());

 // add children UI components with top, center and left constraints 
 p.add(zebra.layout.TOP,    new zebra.ui.Label("Top"));
 p.add(zebra.layout.CENTER, new zebra.ui.Label("Center"));
 p.add(zebra.layout.LEFT,   new zebra.ui.Label("Left"));

Construct the layout with the given vertical and horizontal gaps.

Constructor

zebra.layout.BorderLayout

(
  • [hgap]
  • [vgap]
)

Parameters:

  • [hgap] Integer optional

    horizontal gap. The gap is a horizontal distance between laid out components

  • [vgap] Integer optional

    vertical gap. The gap is a vertical distance between laid out components

Item Index

Attributes

Attributes

hgap

Integer readonly

Horizontal gap (space between components)

Default: 0

vgap

Integer readonly

Vertical gap (space between components)

Default: 0