Class zebkit.ui.BorderPan
extends <zebkit.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 zebkit UI component can be used as a border title element.

zebkit.ui.BorderPan ([title], [content], [constraints])

  • [title] <zebkit.ui.Panel | String>

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

  • [content] <zebkit.ui.Panel>

    a content UI component of the border panel

  • [constraints] <Integer>

    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 zebkit.ui.BorderPan("Title",
                                 new zebkit.ui.Panel(),
                                 "top", "center");

protected <Object> getTitleInfo ( )
public void setAlignment (a)
public void setGaps (vg, hg)
public void setOrientation (o)

Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(target)    doLayout( )    fire(event, [path], [params])    focused( )    getBottom( )    getCanvas( )    getComponentAt(x, y)    getHorPadding( )    getLeft( )    getPreferredSize( )    getRight( )    getTop( )    getVerPadding( )    hasFocus( )    indexOf(c)    insert(i, constr, d)    invalidate( )    invalidateLayout( )    kidAdded(index, constr, l)    kidRemoved(i, l)    laidout( )    load(JSON)    off([eventName], [path], [cb])    on([eventName], [path], cb)    paintComponent(g)    paintViewAt(g, ax, ay, v)    properties([path], props)    property([path], name, value)    recalc( )    relocated(px, py)    remove(c)    removeAll( )    removeAt(i)    removeByConstraints(ctr)    removeMe([after])    repaint([x], [y], [w], [h])    requestFocus( )    requestFocusIn([timeout])    resized(pw, ph)    setAt(i, d)    setBackground(v)    setBorder([v])    setBottomPadding(bottom)    setBounds(x, y, w, h)    setByConstraints(constr, c)    setConstraints(ctr)    setEnabled(b)    setId(id)    setKids(a)    setLayout(m)    setLeftPadding(left)    setLocation(xx, yy)    setPadding(v)    setParent(o)    setPreferredSize(w, h)    setProperties([path], props)    setRightPadding(right)    setSize(w, h)    setTopPadding(top)    setVisible(b)    toBack( )    toFront( )    toPreferredHeight( )    toPreferredSize( )    toPreferredWidth( )    toView(target)    validate( )    validateMetric( )    vrp( )   

protected <Object> getTitleInfo ( )

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

Returns: <Object>

a title info

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

public chainable setAlignment (a)

Set border panel title horizontal alignment.

  • a <String>

    a horizontal alignment. Use "left", "right", "center" as the parameter value.

public chainable setGaps (vg, hg)

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

  • vg <Integer>

    a top and bottom paddings

  • hg <Integer>

    a left and right paddings

public chainable setOrientation (o)

Set border panel title orientation. The title area can be placed either at the top or at the bottom of border panel component.

  • o <String>

    a border title orientation. Can be "top" or "bottom"

Inherited attributes:
public zebkit.draw.View bg    public zebkit.draw.View border    public Boolean canHaveFocus    public Object constraints    public Integer height    public Boolean isEnabled    public Boolean isValid    public Boolean isVisible    public Array kids    public zebkit.layout.Layout layout    public zebkit.layout.Layoutable parent    public Integer width    public Integer x    public Integer y   

public <String> alignment

Border panel title horizontal alignment.

public <zebkit.ui.Panel> content

Border panel label content component

public <Integer> hGap

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

public <Integer> indent

Border panel label indent

public <zebkit.ui.Panel> label

Border panel label component

public <String> orient

Border panel title area arrangement. Border title can be placed either at the top or bottom area of border panel component.

public <Integer> vGap

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