public class Row extends XmlEntityWithInternals
Repserents a row in a Aspose.Pdf.Generator.Table
.
[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); aspose.pdf.generator.Table table1 = new aspose.pdf.generator.Table(); sec1.getParagraphs().add(table1); table1.setColumnWidths ( "70 2cm"); Row row1 = table1.getRows().add(); Cell cell1Row1 = row1.getCells().add("ColumnsSpan = 2"); cell1Row1.setColumnsSpan ( 2); cell1Row1.setBorder ( new BorderInfo((int)BorderSide.All,0.5F)); Row row2 = table1.getRows().add(); Cell cell1Row2 = row2.getCells().add("cell1"); cell1Row2.setBorder ( new BorderInfo((int)BorderSide.All,0.5F)); Cell cell2Row2 = row2.getCells().add("cell2"); cell2Row2.setBorder ( new BorderInfo((int)BorderSide.All,0.5F,new aspose.pdf.generator.Color("Red"))); pdf1.save(...); [XML] <Pdf xmlns="Aspose.Pdf"> <Section> <Table ColumnWidths="70 2cm"> <Row> <Cell ColumnsSpan="2"> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>ColumnsSpan = 2</Segment> </Text> </Cell> </Row> <Row> <Cell> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>cell1</Segment> </Text> </Cell> <Cell> <Border> <All LineWidth="0.5" Color="Red"></All> </Border> <Text> <Segment>cell2</Segment> </Text> </Cell> </Row> </Table> </Section> </Pdf>
Modifier and Type | Field and Description |
---|---|
Color |
BackgroundColor
Gets or sets a
Aspose.Pdf.Generator.Color object that indicates the background color of the
row. |
BorderInfo |
Border
Gets or sets a
BorderInfo object that indicates the row border info. |
Cells |
Cells
Gets or sets a
Cells collection that indicates all cells in the row. |
BorderInfo |
DefaultCellBorder |
TextInfo |
DefaultCellTextInfo
Gets or sets a
TextInfo object that indicates the text format info of the row. |
MarginInfo |
DefaultRowCellPadding
Gets or sets a
MarginInfo object that indicates the default cell padding in the row. |
float |
FixedRowHeight
Gets or sets a float value that indicates the fixed row height.
|
String |
ID
Gets or sets a string that indicates the ID of the row.
|
boolean |
IsBroken
Gets or sets a bool value that indicates whether the row can be broken or not when the row spans two pages.
|
boolean |
IsDisabled
Gets or sets a bool value that indicates whether this row is disabled.
|
boolean |
IsInNewPage
Gets or sets a bool value that indicates whether to split the table from this row and display the subsequent rows on the next page.
|
Constructor and Description |
---|
Row(Table table)
Initializes a new instance of the
Row class in a table. |
Modifier and Type | Method and Description |
---|---|
com.aspose.pdf.generator.legacyxmlmodel.ITableCell |
addCell() |
Object |
completeClone()
Clones a new
Row object. |
com.aspose.pdf.generator.legacyxmlmodel.ITableCell |
getCell(int index) |
int |
getCellCount() |
int |
getVerticalAlignment()
Gets or sets a
com.aspose.pdf.VerticalAlignment object that indicates the vertical alignment type. |
void |
setVerticalAlignment(int value) |
load
public BorderInfo Border
Gets or sets a BorderInfo
object that indicates the row border info.
public Cells Cells
Gets or sets a Cells
collection that indicates all cells in the row.
public String ID
Gets or sets a string that indicates the ID of the row.
public TextInfo DefaultCellTextInfo
Gets or sets a TextInfo
object that indicates the text format info of the row. If you
want to set text format for all cells that have already been added to the row, please do not set
it directly but follow the method in the example.
[Java] TextInfo info = (TextInfo)row.getDefaultCellTextInfo().clone(); info.setBackgroundColor ( new Color("Blue")); row.setDefaultCellTextInfo ( info);
public BorderInfo DefaultCellBorder
public MarginInfo DefaultRowCellPadding
Gets or sets a MarginInfo
object that indicates the default cell padding in the row.
public float FixedRowHeight
Gets or sets a float value that indicates the fixed row height. If the fixed row height is set, the property of IsBroken is disabled unless the real height of the row is out of the margin bound. When the value is too small, it will be enlarged automatically.
public boolean IsDisabled
Gets or sets a bool value that indicates whether this row is disabled. The default value is false. If this property is set to true, this row will not be rendered.
public boolean IsInNewPage
Gets or sets a bool value that indicates whether to split the table from this row and display the subsequent rows on the next page. The property doesn't support nested table.
public Color BackgroundColor
Gets or sets a Aspose.Pdf.Generator.Color
object that indicates the background color of the
row.
public boolean IsBroken
Gets or sets a bool value that indicates whether the row can be broken or not when the row spans two pages. Default value is true.
public Row(Table table)
Initializes a new instance of the Row
class in a table.
table
- The Table
object where the row is in.public int getVerticalAlignment()
Gets or sets a com.aspose.pdf.VerticalAlignment
object that indicates the vertical alignment type.
public void setVerticalAlignment(int value)
public com.aspose.pdf.generator.legacyxmlmodel.ITableCell addCell()
public com.aspose.pdf.generator.legacyxmlmodel.ITableCell getCell(int index)
public int getCellCount()
public Object completeClone()
Clones a new Row
object. This method clones both format and contents of the Row.
Copyright © 2014 Aspose. All Rights Reserved.