Class zebkit.ui.grid.GridCaption
extends <zebkit.ui.grid.BaseCaption>
<zebkit.ui.grid>

Grid caption class that implements rendered caption. Rendered means all caption titles, border are painted as a number of views.

Constructor:
zebkit.ui.grid.GridCaption ([titles], [render])

Parameters:
  • [titles] <Array>

    a caption titles. Title can be a string or a zebkit.draw.View class instance

  • [render] <zebkit.draw.BaseTextRender>

    a text render to be used to paint grid titles




Inherited methods:
$setConstraints(c)    add(constr, d)    byConstraints([p], c)    byPath(path, [cb])    calcPreferredSize(target)    calcRowColAt(x, y, [f])    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)    matrixResized(target, prevRows, prevCols)    matrixSorted(target, sortInfo)    off([eventName], [path], [cb])    on([eventName], [path], cb)    paintComponent(g)    paintViewAt(g, ax, ay, v)    pointerClicked(e)    pointerDragEnded(e)    pointerDragged(e)    pointerDragStarted(e)    pointerMoved(e)    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)    setLabels([labels])    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( )   


@Override zebkit.ui.grid.BaseCaption
protected <Integer> getCaptionPS (rowcol)

Get cell caption preferred size.


Parameters:
  • rowcol <Integer>

    row or col of the cell depending the caption orientation.


Returns: <Integer>

a preferred width or height of the cell

public <Object> getTitle (rowcol)

Get rendered caption cell object.


Parameters:
  • rowcol <Ineteger>

    a row or column


Returns: <Object>

a rendered caption cell object

public chainable setCellBackground (rowcol, bg)

Set the given caption cell background


Parameters:
public chainable setLabel (rowcol, title)

Put the given title for the given caption cell.


Parameters:
  • rowcol <Integer>

    a grid caption cell index

  • title <String | zebkit.draw.View | zebkit.ui.Panel>

    a title of the given grid caption cell. Can be a string or zebkit.draw.View or zebkit.ui.Panel class instance

public chainable setLabelAlignments (rowcol, xa, ya)

Set the specified alignments of the given caption column or row.


Parameters:
  • rowcol <Integer>

    a row or column depending on the caption orientation

  • xa <String>

    a horizontal caption cell alignment. Use "left", "right" or "center" as the title alignment value.

  • ya <String>

    a vertical caption cell alignment. Use "top", "bottom" or "center" as the title alignment value.

public chainable setViewProvider (p)

Set the given caption view provider.


Parameters:


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



public <zebkit.draw.View> defCellBg

Default cell background view.

public <String> defYAlignment

Default horizontal cell view alignment.

public <String> defYAlignment

Default vertical cell view alignment.

public <zebkit.ui.grid.CaptionViewProvider> provider

Grid caption view provider.