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
-
public class TableCell extends CustomNode
Table cell of aTableRow
containing inline nodes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TableCell.Alignment
How the cell is aligned horizontally.
-
Field Summary
Fields Modifier and Type Field Description private TableCell.Alignment
alignment
private boolean
header
private int
width
-
Constructor Summary
Constructors Constructor Description TableCell()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableCell.Alignment
getAlignment()
int
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 Detail
-
header
private boolean header
-
alignment
private TableCell.Alignment alignment
-
width
private int width
-
-
Method Detail
-
isHeader
public boolean isHeader()
- Returns:
- whether the cell is a header or not
-
setHeader
public void setHeader(boolean header)
-
getAlignment
public TableCell.Alignment getAlignment()
- Returns:
- the cell alignment or
null
if no specific alignment
-
setAlignment
public void setAlignment(TableCell.Alignment alignment)
-
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)
-
-