Zebra API Doc

zebra.layout.Constraints Class

Grid layout manager constraints. Constraints says how a component has to be placed in grid layout virtual cell. The constraints specifies vertical and horizontal alignments, a virtual cell paddings, etc.

Constructor

zebra.layout.Constraints

(
  • [ax]
  • [ay]
  • [p]
)

Parameters:

  • [ax] Integer optional

    a horizontal alignment

  • [ay] Integer optional

    a vertical alignment

  • [p] Integer optional

    a cell padding

Item Index

Attributes

Methods

setPadding

(
  • p
)

Set all four paddings (top, left, bottom, right) to the given value

Parameters:

  • p Integer

    a padding

setPadding

(
  • t
  • l
  • b
  • r
)

Set top, left, bottom, right paddings

Parameters:

  • t Integer

    a top padding

  • l Integer

    a left padding

  • b Integer

    a bottom padding

  • r Integer

    a right padding

Attributes

ax

Integer

Horizontal alignment

Default: zebra.layout.STRETCH

ay

Integer

Vertical alignment

Default: zebra.layout.STRETCH

bottom

Integer

Bottom cell padding

Default: 0

left

Integer

Left cell padding

Default: 0

right

Integer

Right cell padding

Default: 0

top

Integer

Top cell padding

Default: 0