Package muntjac :: Package ui :: Module table :: Class IRowGenerator
[hide private]
[frames] | no frames]

Class IRowGenerator

source code

object --+
         |
        IRowGenerator

Row generators can be used to replace certain items in a table with a generated string. The generator is called each time the table is rendered, which means that new strings can be generated each time.

Row generators can be used for e.g. summary rows or grouping of items.

Instance Methods [hide private]
 
generateRow(self, table, itemId)
Called for every row that is painted in the Table.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

generateRow(self, table, itemId)

source code 

Called for every row that is painted in the Table. Returning a GeneratedRow object will cause the row to be painted based on the contents of the GeneratedRow. A generated row is by default styled similarly to a header or footer row.

The GeneratedRow data object contains the text that should be rendered in the row. The itemId in the container thus works only as a placeholder.

If GeneratedRow.setSpanColumns(true) is used, there will be one String spanning all columns (use setText("Spanning text")). Otherwise you can define one String per visible column.

If GeneratedRow.setRenderAsHtml(true) is used, the strings can contain HTML markup, otherwise all strings will be rendered as text (the default).

A "v-table-generated-row" CSS class is added to all generated rows. For custom styling of a generated row you can combine a RowGenerator with a CellStyleGenerator.

Parameters:
  • table - The Table that is being painted
  • itemId - The itemId for the row
Returns:
A GeneratedRow describing how the row should be painted or null to paint the row with the contents from the container