Class: BorderLayout

BorderLayout

PUXI.BorderLayout is used in conjunction with PUXI.BorderLayoutOptions.

This layout guarantees that the "center" region will always be in the center of the widget-group.

WARNING: This layout may have some bugs in edge cases that haven't been reported.

new BorderLayout ()

Implements

  • PUXI.ILayoutManager

Methods

clearMeasureCache ()

Zeros the measured dimensions.

clearRegions ()

Clears the left, top, right, bottom, and center widget lists.

fitChildren (list, measuredRegionWidth, measuredRegionHeight)

Ensures all widgets in the list measured their dimensions below the region width & height. Widgets that are too large are remeasured in the those limits (using MeasureMode.AT_MOST).

This will handle widgets that have "FILL_PARENT" width or height.

Name Type Description
list Array.<PUXI.Widget>
measuredRegionWidth number
measuredRegionHeight number

indexRegions ()

Indexes the list of left, top, right, bottom, and center widget lists.

measureChildren (list, maxWidth, maxHeight, widthMode, heightMode)Array.<number>

This measures the list of widgets given the constraints. The max width and height amongst the children is returned.

Name Type Description
list Array.<PUXI.Widget>
maxWidth number
maxHeight number
widthMode PUXI.MeasureMode
heightMode PUXI.MeasureMode
Returns:
Type Description
Array.<number>
  • [width, height, widthFixedLowerBound, heightFixedLowerBound] - the max. width and height amongst children. Also, the minimum required width/height for the region (as defined in layout-options).

onMeasure (maxWidth, maxHeight, widthMode, heightMode)

Name Type Description
maxWidth number
maxHeight number
widthMode PUXI.MeasureMode
heightMode PUXI.MeasureMode