Package org.commonmark.ext.gfm.tables
Class TableCell
java.lang.Object
org.commonmark.node.Node
org.commonmark.node.CustomNode
org.commonmark.ext.gfm.tables.TableCell
Table cell of a
TableRow
containing inline nodes.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
How the cell is aligned horizontally. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getWidth()
boolean
isHeader()
void
setAlignment
(TableCell.Alignment alignment) void
setHeader
(boolean header) void
setWidth
(int width) Methods inherited from class org.commonmark.node.CustomNode
accept
Methods inherited from class org.commonmark.node.Node
addSourceSpan, appendChild, getFirstChild, getLastChild, getNext, getParent, getPrevious, getSourceSpans, insertAfter, insertBefore, prependChild, setParent, setSourceSpans, toString, toStringAttributes, unlink
-
Field Details
-
header
private boolean header -
alignment
-
width
private int width
-
-
Constructor Details
-
TableCell
public TableCell()
-
-
Method Details
-
isHeader
public boolean isHeader()- Returns:
- whether the cell is a header or not
-
setHeader
public void setHeader(boolean header) -
getAlignment
- Returns:
- the cell alignment or
null
if no specific alignment
-
setAlignment
-
getWidth
public int getWidth()- Returns:
- the cell width (the number of dash and colon characters in the delimiter row of the table for this column)
-
setWidth
public void setWidth(int width)
-