- java.lang.Object
-
- com.itextpdf.text.Row
-
- All Implemented Interfaces:
Element
public class Row extends java.lang.Object implements Element
ARowis part of aTableand contains someCells.All
Rows are constructed by aTable-object. You don't have to construct anyRowyourself. In fact you can't construct aRowoutside the package.Since a
Cellcan span several rows and/or columns a row can contain reserved space without any content.
-
-
Field Summary
Fields Modifier and Type Field Description static intCELLid of the Cell element in a Rowprotected java.lang.Object[]cellsThis is the array of Objects (CellorTable).protected intcolumnsThis is the number of columns in theRow.protected intcurrentColumnThis is a valid position theRow.protected inthorizontalAlignmentThis is the vertical alignment.static intNULLid of a null element in a Rowprotected boolean[]reservedThis is the array that keeps track of reserved cells.static intTABLEid of the Table element in a Row-
Fields inherited from interface com.itextpdf.text.Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TITLE, YMARK
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRow(int columns)Constructs aRowwith a certain number of columns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetCell(int column)Gets aCellorTablefrom a certain column.java.util.ArrayListgetChunks()Gets all the chunks in this element.intgetColumns()Gets the number of columns.intgetHorizontalAlignment()Gets the horizontal alignment.booleanisContent()Checks if this element is a content object.booleanisEmpty()Checks if the row is empty.booleanisNestable()Checks if this element is nestable.booleanprocess(ElementListener listener)Processes the element by adding it (or the different parts) to aElementListener.voidsetHorizontalAlignment(int value)Sets the horizontal alignment.inttype()Gets the type of the text element.
-
-
-
Field Detail
-
NULL
public static final int NULL
id of a null element in a Row- See Also:
- Constant Field Values
-
CELL
public static final int CELL
id of the Cell element in a Row- See Also:
- Constant Field Values
-
TABLE
public static final int TABLE
id of the Table element in a Row- See Also:
- Constant Field Values
-
columns
protected int columns
This is the number of columns in theRow.
-
currentColumn
protected int currentColumn
This is a valid position theRow.
-
reserved
protected boolean[] reserved
This is the array that keeps track of reserved cells.
-
cells
protected java.lang.Object[] cells
This is the array of Objects (CellorTable).
-
horizontalAlignment
protected int horizontalAlignment
This is the vertical alignment.
-
-
Method Detail
-
process
public boolean process(ElementListener listener)
Processes the element by adding it (or the different parts) to aElementListener.
-
type
public int type()
Gets the type of the text element.
-
getChunks
public java.util.ArrayList getChunks()
Gets all the chunks in this element.
-
isContent
public boolean isContent()
Description copied from interface:ElementChecks if this element is a content object. If not, it's a metadata object.- Specified by:
isContentin interfaceElement- Returns:
- true if this is a 'content' element; false if this is a 'metadata' element
- Since:
- iText 2.0.8
- See Also:
Element.isContent()
-
isNestable
public boolean isNestable()
Description copied from interface:ElementChecks if this element is nestable.- Specified by:
isNestablein interfaceElement- Returns:
- true if this element can be nested inside other elements.
- Since:
- iText 2.0.8
- See Also:
Element.isNestable()
-
getCell
public java.lang.Object getCell(int column)
Gets aCellorTablefrom a certain column.- Parameters:
column- the column theCell/Tableis in.- Returns:
- the
Cell,Tableor Object if the column was reserved or null if empty.
-
isEmpty
public boolean isEmpty()
Checks if the row is empty.- Returns:
trueif none of the columns is reserved.
-
getColumns
public int getColumns()
Gets the number of columns.- Returns:
- a value
-
setHorizontalAlignment
public void setHorizontalAlignment(int value)
Sets the horizontal alignment.- Parameters:
value- the new value
-
getHorizontalAlignment
public int getHorizontalAlignment()
Gets the horizontal alignment.- Returns:
- a value
-
-