Zebra API Doc

zebra.ui.BorderPan Class

Extends zebra.ui.Panel

Border panel UI component class. The component renders titled border around the given content UI component. Border title can be placed on top or bottom border line and aligned horizontally (left, center, right). Every zebra UI component can be used as a border title element.

Constructor

zebra.ui.BorderPan

(
  • [title]
  • [content]
  • [constraints]
)

Parameters:

  • [title] zebra.ui.Panel | String optional

    a border panel title. Can be a string or any other UI component can be used as the border panel title

  • [content] zebra.ui.Panel optional

    a content UI component of the border panel

  • [constraints] Integer optional

    a title constraints. The constraints gives a possibility to place border panel title in different places. Generally the title can be placed on the top or bottom part of the border panel. Also the title can be aligned horizontally.

       // create border panel with a title located at the 
       // top and aligned at the canter   
       var bp = new zebra.ui.BorderPan("Title", 
                                       new zebra.ui.Panel(),
                                       zebra.layout.TOP | zebra.layout.CENTER);

Item Index

Methods

getTitleInfo

() Object protected

Get the border panel title info. The information describes a rectangular area the title occupies, the title location and alignment


Return: Object

a title info

{ x: {Integer}, y: {Integer}, width: {Integer}, height: {Integer}, orient: {Integer} }

setGaps

(
  • vg
  • hg
)
chainable

Set vertical and horizontal paddings between the border panel border and the content of the border panel

Parameters:

  • vg Integer

    a top and bottom paddings

  • hg Integer

    a left and right paddings

Attributes

content

zebra.ui.Panel readonly

Border panel label content component

hGap

Integer readonly

Horizontal gap. Define left and right paddings between border panel border and the border panel content

Default: 0

indent

Integer

Border panel label indent

Default: 4

label

zebra.ui.Panel readonly

Border panel label component

vGap

Integer readonly

Vertical gap. Define top and bottom paddings between border panel border and the border panel content

Default: 0