aspose.pdf
Class Row

java.lang.Object
  extended by aspose.pdf.Row

public class Row
extends java.lang.Object

Repserents a row in a Table.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Table table1 = new 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(BorderSide.All.getValue(),0.5f)); Row row2 = table1.getRows().add(); Cell cell1Row2 = row2.getCells().add("cell1"); cell1Row2.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); Cell cell2Row2 = row2.getCells().add("cell2"); cell2Row2.setBorder(new BorderInfo(BorderSide.All.getValue(),0.5f)); 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>


Field Summary
 int index
           
 boolean isPositionGot
           
 
Constructor Summary
Row(Table table)
          Initializes a new instance of the Row class in a table.
 
Method Summary
 java.lang.Object clone()
          Clones a new Row object.
 java.lang.Object completeClone()
          Clones a new Row object.
 Color getBackgroundColor()
          Gets a Color object that indicates the background color of the row.
 BorderInfo getBorder()
          Gets a BorderInfo object that indicates the row border info.
 Cells getCells()
          Gets a Cells collection that indicates all cells in the row.
 BorderInfo getDefaultCellBorder()
          Gets a BorderInfo object that indicates the default border style for all cells in this row.
 TextInfo getDefaultCellTextInfo()
          Gets a TextInfo object that indicates the text format info of the row.
 float getFixedRowHeight()
          Gets a float value that indicates the fixed row height.
 float getHeight()
          Represents a float value that indicates the row height.
 float getHeight(Pdf doc)
          Gets the row height.
 float getHeightWithoutRowSpan(Pdf doc)
          Get float row span height.
 java.lang.String getID()
          Gets a String that indicates the ID of the cell.
 boolean getIsBorderSetbyUser()
          Gets a boolean value that indicates the Border of the Row in Table has been set by user.
 boolean getIsDefaultBorderSetbyUser()
          Get a boolean value that indicates the Default BorderInfo of the Row has been set by user.
 float getPosX()
          Represents a float value that indicates the x-coordinate of the row beginning position.
 float getPosY()
          Represents a float value that indicates the y-coordinate of the row beginning position.
 float getRowHeight()
          Gets a float value that indicates the Row height
 Cells getRowSpanRefCells()
          get Row span Cells
 float getRowWidth()
          Gets a float value that indicates the Row width
 Table getTable()
          Gets a Table reference which indicates where the row is in.
 VerticalAlignmentType getVerticalAlignment()
          Gets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in this row.
 Cells getVirtualCells()
          get virtual cell
 float getWidth()
          Represents a float value that indicates the row width.
 boolean isBroken()
          Gets a boolean value that indicates whether the row can be broken or not when the row spans two pages.
 boolean isDisabled()
          Gets a boolean value that indicates whether this row is disabled.
 boolean isInNewPage()
          Gets a boolean value that indicates whether to split the table from this row and display the subsequent rows on the next page.
 boolean isKeptWithNext()
          Gets a boolean value that indicates whether this row is kept with next page.
 boolean isVerticalAlignmentSet()
          Gets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in this row.
 void setBackgroundColor(Color backColor)
          Sets a Color object that indicates the background color of the row.
 void setBorder(BorderInfo rowBorder)
          Sets a BorderInfo object that indicates the row border info.
 void setCells(Cells cellsInRow)
          Sets a Cells collection that indicates all cells in the row.
 void setDefaultCellBorder(BorderInfo defaultCellsBorder)
          Sets a BorderInfo object that indicates the default border style for all cells in this row.
 void setDefaultCellTextInfo(TextInfo rowTextInfo)
          Sets a TextInfo object that indicates the text format info of the row.
 void setFixedRowHeight(float fixedHeight)
          Sets a float value that indicates the fixed row height.
 void setHeight(float rowHeight)
          Represents a float value that indicates the row height.
 void setID(java.lang.String cellID)
          Sets a String that indicates the ID of the cell.
 void setIsBorderSetbyUser(boolean isBorderSetbyUser)
          Sets a boolean value that indicates the Border of the Row in Table has been set by user.
 void setIsBroken(boolean isBroken)
          Sets a boolean value that indicates whether the row can be broken or not when the row spans two pages.
 void setIsDefaultBorderSetbyUser(boolean isDefaultBorderSetbyUser)
          set a boolean value that indicates the Default BorderInfo of the Row has been set by user.
 void setIsDisabled(boolean isDisabled)
          Sets a boolean value that indicates whether this row is disabled.
 void setIsInNewPage(boolean isInNewPage)
          Sets a boolean value that indicates whether to split the table from this row and display the subsequent rows on the next page.
 void setPosX(float posX)
          Represents a float value that indicates the x-coordinate of the row beginning position.
 void setPosY(float posY)
          Represents a float value that indicates the y-coordinate of the row beginning position.
 void setRowHeight(float rowHeight)
          Sets a float value that indicates the Row height
 void setRowSpanRefCells(Cells RowSpanRefCells)
          set RowSpan reference Cells
 void setRowWidth(float rowWidth)
          Sets a float value that indicates the Row width
 void setTable(Table tableIn)
          Sets a Table reference which indicates where the row is in.
 void setVerticalAlignment(VerticalAlignmentType verticalAlignment)
          Sets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in this row.
 void setVirtualCells(Cells VirtualCells)
          set virtual cell
 void setWidth(float rowWidth)
          Represents a float value that indicates the row width.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

public int index

isPositionGot

public boolean isPositionGot
Constructor Detail

Row

public Row(Table table)
Initializes a new instance of the Row class in a table.

Method Detail

getIsBorderSetbyUser

public boolean getIsBorderSetbyUser()
Gets a boolean value that indicates the Border of the Row in Table has been set by user.


setIsBorderSetbyUser

public void setIsBorderSetbyUser(boolean isBorderSetbyUser)
Sets a boolean value that indicates the Border of the Row in Table has been set by user.

Parameters:
isBorderSetbyUser -

getBorder

public BorderInfo getBorder()
Gets a BorderInfo object that indicates the row border info.


setBorder

public void setBorder(BorderInfo rowBorder)
Sets a BorderInfo object that indicates the row border info.

Parameters:
rowBorder -

getRowHeight

public float getRowHeight()
Gets a float value that indicates the Row height

Returns:
a float value that indicates the Row height

setRowHeight

public void setRowHeight(float rowHeight)
Sets a float value that indicates the Row height

Parameters:
rowHeight -

getHeight

public float getHeight()
Represents a float value that indicates the row height.


setHeight

public void setHeight(float rowHeight)
Represents a float value that indicates the row height.

Parameters:
rowHeight -

getRowWidth

public float getRowWidth()
Gets a float value that indicates the Row width

Returns:
a float value that indicates the Row height

setRowWidth

public void setRowWidth(float rowWidth)
Sets a float value that indicates the Row width

Parameters:
rowWidth -

getWidth

public float getWidth()
Represents a float value that indicates the row width.


setWidth

public void setWidth(float rowWidth)
Represents a float value that indicates the row width.

Parameters:
rowWidth -

getPosX

public float getPosX()
Represents a float value that indicates the x-coordinate of the row beginning position.


setPosX

public void setPosX(float posX)
Represents a float value that indicates the x-coordinate of the row beginning position.

Parameters:
posX -

getPosY

public float getPosY()
Represents a float value that indicates the y-coordinate of the row beginning position.


setPosY

public void setPosY(float posY)
Represents a float value that indicates the y-coordinate of the row beginning position.

Parameters:
posY -

getCells

public Cells getCells()
Gets a Cells collection that indicates all cells in the row.


setCells

public void setCells(Cells cellsInRow)
Sets a Cells collection that indicates all cells in the row.

Parameters:
cellsInRow -

getRowSpanRefCells

public Cells getRowSpanRefCells()
get Row span Cells

Returns:
rowSpanRefCells

setRowSpanRefCells

public void setRowSpanRefCells(Cells RowSpanRefCells)
set RowSpan reference Cells

Parameters:
RowSpanRefCells -

getID

public java.lang.String getID()
Gets a String that indicates the ID of the cell.


setID

public void setID(java.lang.String cellID)
Sets a String that indicates the ID of the cell.

Parameters:
cellID -

getTable

public Table getTable()
Gets a Table reference which indicates where the row is in. This property is used in api mode.


setTable

public void setTable(Table tableIn)
Sets a Table reference which indicates where the row is in. This property is used in api mode.

Parameters:
tableIn -

getDefaultCellTextInfo

public TextInfo getDefaultCellTextInfo()
Gets 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) row2.getDefaultCellTextInfo().clone(); info.setBackgroundColor(new Color("Blue")); row2.setDefaultCellTextInfo(info);


setDefaultCellTextInfo

public void setDefaultCellTextInfo(TextInfo rowTextInfo)
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) row2.getDefaultCellTextInfo().clone(); info.setBackgroundColor(new Color("Blue")); row2.setDefaultCellTextInfo(info);

Parameters:
rowTextInfo -

getIsDefaultBorderSetbyUser

public boolean getIsDefaultBorderSetbyUser()
Get a boolean value that indicates the Default BorderInfo of the Row has been set by user.

Returns:
a boolean value that indicates the Default BorderInfo of the Row has been set by user.

setIsDefaultBorderSetbyUser

public void setIsDefaultBorderSetbyUser(boolean isDefaultBorderSetbyUser)
set a boolean value that indicates the Default BorderInfo of the Row has been set by user.

Parameters:
isDefaultBorderSetbyUser -

getDefaultCellBorder

public BorderInfo getDefaultCellBorder()
Gets a BorderInfo object that indicates the default border style for all cells in this row.


setDefaultCellBorder

public void setDefaultCellBorder(BorderInfo defaultCellsBorder)
Sets a BorderInfo object that indicates the default border style for all cells in this row.

Parameters:
defaultCellsBorder -

getVerticalAlignment

public VerticalAlignmentType getVerticalAlignment()
Gets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in this row.


setVerticalAlignment

public void setVerticalAlignment(VerticalAlignmentType verticalAlignment)
Sets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in this row.


isVerticalAlignmentSet

public boolean isVerticalAlignmentSet()
Gets a VerticalAlignmentType object that indicates the vertical alignment type of all cells in this row.


getFixedRowHeight

public float getFixedRowHeight()
Gets 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.


setFixedRowHeight

public void setFixedRowHeight(float fixedHeight)
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.

Parameters:
fixedHeight -

clone

public java.lang.Object clone()
Clones a new Row object. This method clones only the format but not contents of the Row.

Overrides:
clone in class java.lang.Object

completeClone

public java.lang.Object completeClone()
Clones a new Row object. This method clones both format and contents of the Row.


isDisabled

public boolean isDisabled()
Gets a boolean 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.


setIsDisabled

public void setIsDisabled(boolean isDisabled)
Sets a boolean 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.

Parameters:
isDisabled -

isKeptWithNext

public boolean isKeptWithNext()
Gets a boolean value that indicates whether this row is kept with next page.


isInNewPage

public boolean isInNewPage()
Gets a boolean 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.


setIsInNewPage

public void setIsInNewPage(boolean isInNewPage)
Sets a boolean 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.

Parameters:
isInNewPage -

getBackgroundColor

public Color getBackgroundColor()
Gets a Color object that indicates the background color of the row.


setBackgroundColor

public void setBackgroundColor(Color backColor)
Sets a Color object that indicates the background color of the row.

Parameters:
backColor -

isBroken

public boolean isBroken()
Gets a boolean value that indicates whether the row can be broken or not when the row spans two pages. Default value is true.


setIsBroken

public void setIsBroken(boolean isBroken)
Sets a boolean value that indicates whether the row can be broken or not when the row spans two pages. Default value is true.

Parameters:
isBroken -

getHeight

public float getHeight(Pdf doc)
Gets the row height. Note that this method returns correct value only when the Row object is added into Table object. Image in table will be ignored.

Parameters:
doc - The Pdf object.
Returns:
The row height in points.

getHeightWithoutRowSpan

public float getHeightWithoutRowSpan(Pdf doc)
Get float row span height.

Parameters:
doc -
Returns:
row span height.

getVirtualCells

public Cells getVirtualCells()
get virtual cell

Returns:
virtual cell

setVirtualCells

public void setVirtualCells(Cells VirtualCells)
set virtual cell

Parameters:
VirtualCells -