Table

<TableBlock>

Description

<TableBlock> is a construct that enables you to insert a table to report diagram. It is typically used to present table of elements or element properties. You must combine the use of <TableRow> and <TableCell> in order to form a complete table. Most of the build-in templates are formed by tables and contains <TableBlock>. You can look for references easily.

Attributes

Name Description/Usage Required?
tableWidth : integer The width of table, in percentage. For example: 50% means to occupy 50% of page width.
Optional
colWidths : integers Specify the widths of table columns in ratio, separate by comma. Note that the number of columns specify in @colWidths must match the number of <TableCell> to add under <TableRow>, under this table.

For example, specify "1, 1, 2" for a table with 20000 as width will result in creating a table with three columns, and have widths 5000, 5000, 10000.
Optional
alignment = center

{left | center | right}
Alignment of table. Optional
rowBackgroundColors : colors Background color of rows in table. Optional
generateHeaderOnNewPage : boolean = false When true, generate the header (the first row of this table) again if this table is generated across multiple pages. Optional
margin Specify the space around the table by providing the value of top, right, bottom, and left margins.

For example, specify "10, 20, 30, 40" for a table that has 10 as top margin, 20 as right margin, 30 as bottom margin and 40 as left margin.
Optional
margin-top: integer Specify the top margin of table. Optional
margin-right: integer Specify the right margin of table. Optional
margin-bottom: integer Specify the bottom margin of table. Optional
margin-left: integer Specify the left margin of table. Optional
Supported attributes for <TableBlock>

Sample template fragment

<Template>
    <TemplateInformationHeader name = "Classes in diagram" description = "/" type = "table" default = "false"/>
    <DiagramBaseInitiationBlock>
        <TableBlock tableWidth="10000" colWidths="1,3" alignment="right">
            <IterationBlock modelType="Class">
                <TableRow>
                    <TableCell>
                        <StringPropertyText propertyText="name"/>
                    </TableCell>
                    <TableCell>
                        <StringPropertyText propertyText="documentation"/>
                    </TableCell>
                </TableRow>
            </IterationBlock>
        </TableBlock>
    </DiagramBaseInitiationBlock>
</Template>

<TableRow>

Description

<TableRow> is a construct that enables you to add rows to a <TableBlock>. Without <TableRow>, <TableBlock> is useless. You should add <TableCell> to <TableRow> in order to complete a table.

Attributes

Name Description/Usage Required?
height : integer How tall it is for the table row.
Optional
backgroundColor : color Background color of row.
Optional
Supported attributes for <TableRow>

Sample template fragment

<Template>
    <TemplateInformationHeader name = "Classes in diagram" description = "/" type = "table" default = "false"/>
    <DiagramBaseInitiationBlock>
        <TableBlock tableWidth="10000" colWidths="1,3" alignment="right">
            <IterationBlock modelType="Class">
                <TableRow>
                    <TableCell>
                        <StringPropertyText propertyText="name"/>
                    </TableCell>
                    <TableCell>
                        <StringPropertyText propertyText="documentation"/>
                    </TableCell>
                </TableRow>
            </IterationBlock>
        </TableBlock>
    </DiagramBaseInitiationBlock>
</Template>

<TableCell>

Description

<TableCell> is a construct that enables you to add cells to a <TableRow>.

Attributes

Name Description/Usage Required?
topBorderEnable : boolean = true True to draw the top border of cell.
Optional
bottomBorderEnable : boolean = true True to draw the bottom border of cell.
Optional
leftBorderEnable : boolean = true
True to draw the left border of cell. Optional
rightBorderEnable : boolean = true True to draw the right border of cell. Optional
color : color The background color of cell. Optional
splitted : boolean = false Determine this cell is splitted. If true, <TableRow> + <TableCell> cannot be added into this cell to make the cell splitted by more cells.
Optional
mergeColumns : integer Deprecated. Replaced by @colspan. Optional
colspan : integer Specify the number of cell this cell consumes horizontally. For example, a colspan of 2 means to consume this and the cell on the right. This is equivalent to HTML’s colspan. Optional
rowspan : integer Specify the number of cell this cell consumes vertically. For example, a rowspan of 2 means to consume this and the cell below. This is equivalent to HTML’s rowspan. Optional
Supported attributes for <TableCell>

Sample template fragment

<Template>
    <TemplateInformationHeader name = "Classes in diagram" description = "/" type = "table" default = "false"/>
    <DiagramBaseInitiationBlock>
        <TableBlock tableWidth="10000" colWidths="1,3" alignment="right">
            <IterationBlock modelType="Class">
                <TableRow>
                    <TableCell>
                        <StringPropertyText propertyText="name"/>
                    </TableCell>
                    <TableCell>
                        <StringPropertyText propertyText="documentation"/>
                    </TableCell>
                </TableRow>
            </IterationBlock>
        </TableBlock>
    </DiagramBaseInitiationBlock>
</Template>
 
7. Text and break Table of Contents 9. Miscellaneous
 

Product

Try this feature with

Business Process Visual ARCHITECT

Technical Support

Have technical issues or suggestions? Please contact Visual Paradigm Support Team.

Sales Support

Have questions related to registration, licensing or payment? Feel free to contact Visual Paradigm Sales Team.

Discussion Forum

Share your suggestions of opinions at VP Discussion Forum.