Class zebkit.ui.grid.DefViews
extends <zebkit.draw.BaseViewProvider>
<zebkit.ui.grid>

Default grid cell views provider. The class rules how a grid cell content, background has to be rendered and aligned. Developers can implement an own views providers and than setup it for a grid by calling "setViewProvider(...)" method.

Constructor:
zebkit.ui.grid.DefViews ([render])

Parameters:



Inherited methods:

public <String> getCellColor (target, row, col)

Get the given grid cell color


Parameters:
  • target <zebkit.ui.grid.Grid>

    a target grid component

  • row <Integer>

    a grid cell row

  • col <Integer>

    a grid cell column


Returns: <String>

a cell color to be applied to the given grid cell

@Override zebkit.draw.BaseViewProvider
public <zebkit.draw.View> getView (target, row, col, obj)

Get a renderer to draw the specified grid model value.


Parameters:
  • target <zebkit.ui.grid.Grid>

    a target Grid component

  • row <Integer>

    a grid cell row

  • col <Integer>

    a grid cell column

  • obj <Object>

    a model value for the given grid cell


Returns: <zebkit.draw.View>

an instance of view to be used to paint the given cell model value

public <String> getXAlignment (target, row, col)

Get an horizontal alignment a content in the given grid cell has to be adjusted. The method is optional.


Parameters:
  • target <zebkit.ui.grid.Grid>

    a target grid component

  • row <Integer>

    a grid cell row

  • col <Integer>

    a grid cell column


Returns: <String>

a horizontal alignment ("left", "center", "right")

public <String> getYAlignment (target, row, col)

Get a vertical alignment a content in the given grid cell has to be adjusted. The method is optional.


Parameters:
  • target <zebkit.ui.grid.Grid>

    a target grid component

  • row <Integer>

    a grid cell row

  • col <Integer>

    a grid cell column


Returns: <String>

a vertical alignment ("top", "center", "bottom")



Inherited attributes: