public class Row extends CompositeNode
Row can only be a child of a Table.
Row can contain one or more Cell nodes.
A minimal valid row needs to have at least one Cell.
| Constructor and Description |
|---|
Row(DocumentBase doc)
Initializes a new instance of the Row class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DocumentVisitor visitor)
Accepts a visitor.
|
void |
clearRowAttrs() |
void |
ensureMinimum()
If the Row has no cells, creates and appends one Cell.
|
java.lang.Object |
fetchInheritedRowAttr(int key) |
java.lang.Object |
fetchRowAttr(int key) |
CellCollection |
getCells()
Provides typed access to the Cell child nodes of the row.
|
java.lang.Object |
getDirectRowAttr(int key) |
Cell |
getFirstCell()
Returns the first Cell in the row.
|
Cell |
getLastCell()
Returns the last Cell in the row.
|
int |
getNodeType()
Returns NodeType.Row.
|
Table |
getParentTable()
Returns the immediate parent table of the row.
|
RowFormat |
getRowFormat()
Provides access to the formatting properties of the row.
|
java.lang.String |
getText()
Gets the text of all cells in this row including the end of row character.
|
boolean |
isFirstRow()
True if this is the first row in a table; false otherwise.
|
boolean |
isLastRow()
True if this is the last row in a table; false otherwise.
|
void |
removeMoveRevisions() |
void |
resetToDefaultAttrs() |
void |
setRowAttr(int key,
java.lang.Object value) |
acceptChildren, acceptCore, appendChild, coreRemoveSelfOnly, getChild, getChildNodes, getChildNodes, getContainer, getCount, getCurrentNode, getFirstChild, getLastChild, getNextMatchingNode, hasChildNodes, indexOf, insertAfter, insertBefore, isComposite, iterator, prependChild, removeAllChildren, removeChild, removeSmartTags, selectNodes, selectSingleNodedd, deepClone, getAncestor, getAncestor, getCustomNodeId, getDocument, getNextSibling, getParentNode, getPreviousSibling, getRange, memberwiseClone, nextPreOrder, nodeTypeToString, previousPreOrder, remove, setCustomNodeId, toString, toString, toString, visitorActionToBoolpublic Row(DocumentBase doc)
When Row is created, it belongs to the specified document, but is not yet part of the document and ParentNode is null.
To append Row to the document use InsertAfter or InsertBefore on the table where you want the row inserted.
doc - The owner document.public int getNodeType()
getNodeType in class NodeNodeType constants.public Table getParentTable()
(Table)FirstNonMarkupParentNode.public boolean isFirstRow()
boolean value.public boolean isLastRow()
boolean value.public Cell getFirstCell()
public Cell getLastCell()
public CellCollection getCells()
CellCollection value.public RowFormat getRowFormat()
RowFormat value.public boolean accept(DocumentVisitor visitor) throws java.lang.Exception
Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.
For more info see the Visitor design pattern.
public java.lang.String getText()
Returns concatenated text of all child nodes with the end of row character ControlChar.CELL appended at the end.
The returned string includes all control and special characters as described in ControlChar.
getText in class CompositeNodepublic void ensureMinimum()
public java.lang.Object getDirectRowAttr(int key)
public java.lang.Object fetchRowAttr(int key)
public java.lang.Object fetchInheritedRowAttr(int key)
public void setRowAttr(int key,
java.lang.Object value)
public void clearRowAttrs()
public void resetToDefaultAttrs()
throws java.lang.Exception
java.lang.Exceptionpublic void removeMoveRevisions()