Class s.r.b.t.ColumnTableBuilder(ReportTableBuilder):

Part of stoqlib.reporting.base.tables View In Hierarchy

Known subclasses: stoqlib.reporting.base.tables.ObjectTableBuilder

Column table builder
Method __init__ Creates a new ColumnTableBuilder object
Method create_table Override ReportTableBuilder create_table method to allow specify
Method get_row_data Returns all the row columns formatted
Method build_data Create the table rows list.
Method _get_header Returns a list with the column names.
Method add_row Just add an extra row to the table
Method update_style Apply the column table style.

Inherited from ReportTableBuilder:

Method set_highlight Set the table highlight type:
Method get_data Return all the table rows
def __init__(self, data, columns, style=None, progress_handler=None, table_line=TABLE_LINE, do_header=True, extra_row=None, summary_row=None, width=None):
Creates a new ColumnTableBuilder object
ParametersdataA list of lists, where each nested list represents a row (naturally, each column of this nested list is a table column).
(type: list )
columnsA list of TableColumn instances representing the table columns
(type: list )
styleThe table style. @type TableStyle
table_lineDefine the type of the line that is inserted between the table rows.
(type: One of TABLE_LINE or TABLE_LINE_BLANK constants. )
do_headerMust the table header be drawed? Defaults to True
(type: bool )
extra_rowAn list of strings to be inserted right after the table.
(type: list )
summary_rowA list of strings to be inserted after the table and that means the sum of one or more columns.
(type: list )
def create_table(self, *args, **kwargs):
Override ReportTableBuilder create_table method to allow specify the columns width.
def get_row_data(self, values):
Returns all the row columns formatted
def build_data(self, data):
Create the table rows list.
Parametersdatathe row list passed by the user when creating the table
(type: list )
def _get_header(self):
Returns a list with the column names.
def add_row(self, data):
Just add an extra row to the table
def update_style(self):
Apply the column table style.
API Documentation for Stoqlib, generated by pydoctor at 2009-07-14 16:00:32.