aspose.pdf
Class Rows

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by aspose.pdf.Rows
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class Rows
extends java.util.ArrayList

Represents a collection of Row objects.

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] <?xml version="1.0" encoding="utf-8" ?> <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>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Rows()
          Initializes a new instance of the Rows class.
 
Method Summary
 Row add()
          Initializes a new instance of the Row class and add it to the Rows collection.
 void add(Row row)
          Adds a new Row object into the collection.
 void addRow(Row row)
          Adds a new Row object into the collection.
 void copyTo(Row[] rowArray, int index)
          Copies the elements to a Row object array, starting at a specified array index.
 Row getRow(int index)
          Gets a Row object from the collection according to Row index.
 Row getRow(java.lang.String rowID)
          Gets a Row object from the collection according to Row ID.
 Table getTable()
          Gets parentTable object
 int indexOf(Row row)
          Gets the index of a specified row in the collection.
 void insert(int index, Row row)
          Inserts a new Row object into the collection at specified position.
 void insert(Row rowToInsertAfter, Row newRow)
          Inserts a new Row object into the collection after specified Cell object.
 void moveAfter(Row rowToMoveAfter, Rows newRows)
          move the row from row collection
 void moveAt(Row rowToMoveAt, Rows newRows)
          move row from row collection
 void remove(Row rowToRemove)
          Removes a Row object from the collection.
 void setRow(int index, Row value)
          Sets a Row object from the collection according to Row index.
 void setRow(java.lang.String rowID, Row value)
          Sets a Row object from the collection according to Row ID.
 void setTable(Table value)
          Sets the parent table
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

Rows

public Rows()
Initializes a new instance of the Rows class.

Method Detail

addRow

public void addRow(Row row)
Adds a new Row object into the collection.

Parameters:
row -

add

public void add(Row row)
Adds a new Row object into the collection.

Parameters:
row - The Row object to be added.

add

public Row add()
Initializes a new instance of the Row class and add it to the Rows collection.

Returns:
The new Row object.

getTable

public Table getTable()
Gets parentTable object

Returns:
parentTable

setTable

public void setTable(Table value)
Sets the parent table

Parameters:
value -

getRow

public Row getRow(int index)
Gets a Row object from the collection according to Row index.

Parameters:
index -

setRow

public void setRow(int index,
                   Row value)
Sets a Row object from the collection according to Row index.

Parameters:
index -
value -

getRow

public Row getRow(java.lang.String rowID)
Gets a Row object from the collection according to Row ID.


setRow

public void setRow(java.lang.String rowID,
                   Row value)
Sets a Row object from the collection according to Row ID.

Parameters:
rowID -
value -

insert

public void insert(int index,
                   Row row)
Inserts a new Row object into the collection at specified position.

Parameters:
index - The zero-based index at which Row object should be inserted.
row - The Row object to be inserted.

insert

public void insert(Row rowToInsertAfter,
                   Row newRow)
Inserts a new Row object into the collection after specified Cell object.

Parameters:
rowToInsertAfter - The Row object to insert after.
newRow - The Row object to be inserted.

indexOf

public int indexOf(Row row)
Gets the index of a specified row in the collection.

Parameters:
row - The specified row.
Returns:
The index value.

remove

public void remove(Row rowToRemove)
Removes a Row object from the collection.

Parameters:
rowToRemove - The Row object to be removed.

moveAt

public void moveAt(Row rowToMoveAt,
                   Rows newRows)
move row from row collection

Parameters:
rowToMoveAt -
newRows -

moveAfter

public void moveAfter(Row rowToMoveAfter,
                      Rows newRows)
move the row from row collection

Parameters:
rowToMoveAfter -
newRows -

copyTo

public void copyTo(Row[] rowArray,
                   int index)
Copies the elements to a Row object array, starting at a specified array index.

Parameters:
rowArray - The Row object array.
index - The start index.