public class RtfCell extends Cell implements RtfExtendedElement
RtfBorder
Modifier and Type | Field and Description |
---|---|
private RtfColor |
backgroundColor
The background color of this RtfCell
|
private RtfBorderGroup |
borders
The borders of this RtfCell
|
private int |
cellPadding
The padding of this RtfCell
|
private int |
cellRight
The right margin of this RtfCell
|
private int |
cellWidth
The width of this RtfCell
|
private int |
colspan
The number of columns spanned by this RtfCell
|
private java.util.ArrayList |
content
The content of this RtfCell
|
private RtfDocument |
document
The RtfDocument this RtfCell belongs to
|
private boolean |
inHeader
Whether this RtfCell is in a header
|
private static int |
MERGE_NONE
This cell is not merged
|
private static int |
MERGE_VERT_CHILD
This cell is a child cell of a vertical merge operation
|
private static int |
MERGE_VERT_PARENT
This cell is the parent cell of a vertical merge operation
|
private int |
mergeType
The merge type of this RtfCell
|
private RtfRow |
parentRow
The parent RtfRow of this RtfCell
|
private int |
rowspan
The number of rows spanned by this RtfCell
|
private int |
verticalAlignment
The vertical alignment of this RtfCell
|
arrayList, groupChange, header, horizontalAlignment, maxLines, useAscender, useBorderPadding, useDescender, width
background, border, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, color, LEFT, llx, lly, markupAttributes, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBorders
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
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, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, GRAPHIC, HEADER, IMGRAW, IMGTEMPLATE, JPEG, KEYWORDS, LIST, LISTITEM, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE
Modifier | Constructor and Description |
---|---|
|
RtfCell()
Constructs an empty RtfCell
|
|
RtfCell(Element element)
Constructs a RtfCell based upon an Element
|
|
RtfCell(java.util.Properties properties)
Constructs a RtfCell based upon certain Properties
|
protected |
RtfCell(RtfDocument doc,
RtfRow row,
Cell cell)
Constructs a RtfCell based on a Cell.
|
|
RtfCell(java.lang.String content)
Constructs a RtfCell based upon a String
|
Modifier and Type | Method and Description |
---|---|
protected RtfColor |
getBackgroundColor()
Get the background color of this RtfCell
|
protected RtfBorderGroup |
getBorders()
Gets the borders of this RtfCell
|
protected int |
getCellpadding()
Gets the cell padding of this RtfCell
|
protected int |
getCellRight()
Gets the right margin of this RtfCell
|
protected int |
getCellWidth()
Gets the cell width of this RtfCell
|
protected int |
getColspan()
Gets the number of columns this RtfCell spans
|
protected int |
getRowspan()
Gets the number of rows this RtfCell spans
|
protected int |
getVerticalAlignment()
Get the vertical alignment of this RtfCell
|
private void |
importCell(Cell cell)
Imports the Cell properties into the RtfCell
|
private byte[] |
intToByteArray(int i)
Transforms an integer into its String representation and then returns the bytes
of that string.
|
void |
setBorders(RtfBorderGroup borderGroup)
Set the borders of this RtfCell
|
protected void |
setCellMergeChild(RtfCell mergeParent)
Merge this cell into the parent cell.
|
protected void |
setCellRight(int cellRight)
Sets the right margin of this cell.
|
protected void |
setCellWidth(int cellWidth)
Sets the cell width of this RtfCell.
|
void |
setInHeader(boolean inHeader)
Sets whether this RtfCell is in a header
|
void |
setInTable(boolean inTable)
Unused
|
void |
setRtfDocument(RtfDocument doc)
Sets the RtfDocument this RtfCell belongs to
|
byte[] |
write()
Write the content of this RtfCell
|
byte[] |
writeDefinition()
Write the cell definition part of this RtfCell
|
add, addElement, bottom, bottom, cellWidth, clear, colspan, createPdfPCell, getChunks, getDummyCell, getElements, getGroupChange, getMaxLines, getShowTruncation, header, horizontalAlignment, isEmpty, isTable, isTag, isUseAscender, isUseBorderPadding, isUseDescender, leading, left, left, noWrap, process, right, right, rowspan, setBottom, setColspan, setGroupChange, setHeader, setHorizontalAlignment, setHorizontalAlignment, setLeading, setLeft, setMaxLines, setNoWrap, setRight, setRowspan, setShowTruncation, setTop, setUseAscender, setUseBorderPadding, setUseDescender, setVerticalAlignment, setVerticalAlignment, setWidth, size, top, top, type, verticalAlignment
backgroundColor, border, borderColor, borderWidth, bottom, cloneNonPositionParameters, disableBorderSide, enableBorderSide, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getMarkupAttribute, getMarkupAttributeNames, getMarkupAttributes, getRotation, grayFill, hasBorder, hasBorders, height, isUseVariableBorders, left, normalize, rectangle, right, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderColorBottom, setBorderColorLeft, setBorderColorRight, setBorderColorTop, setBorderWidth, setBorderWidthBottom, setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, setBottom, setGrayFill, setLeft, setMarkupAttribute, setMarkupAttributes, setRight, setTop, setUseVariableBorders, softCloneNonPositionParameters, top, toString, width
private static final int MERGE_NONE
private static final int MERGE_VERT_PARENT
private static final int MERGE_VERT_CHILD
private RtfRow parentRow
private java.util.ArrayList content
private int cellRight
private int cellWidth
private RtfBorderGroup borders
private int verticalAlignment
private RtfColor backgroundColor
private int cellPadding
private int mergeType
private int colspan
private int rowspan
private RtfDocument document
private boolean inHeader
public RtfCell()
public RtfCell(java.lang.String content)
content
- The String to base the RtfCell onpublic RtfCell(Element element) throws BadElementException
element
- The Element to base the RtfCell onBadElementException
- If the Element is not validpublic RtfCell(java.util.Properties properties)
properties
- The Properties for this RtfCellprotected RtfCell(RtfDocument doc, RtfRow row, Cell cell)
doc
- The RtfDocument this RtfCell belongs torow
- The RtfRow this RtfCell lies incell
- The Cell to base this RtfCell onprivate void importCell(Cell cell)
cell
- The Cell to importpublic byte[] writeDefinition()
writeDefinition
in interface RtfExtendedElement
public byte[] write()
write
in interface RtfBasicElement
protected void setCellRight(int cellRight)
cellRight
- The right margin to useprotected int getCellRight()
protected void setCellWidth(int cellWidth)
cellWidth
- The cell width to useprotected int getCellWidth()
protected int getColspan()
protected int getRowspan()
protected int getCellpadding()
protected RtfBorderGroup getBorders()
public void setBorders(RtfBorderGroup borderGroup)
borderGroup
- The RtfBorderGroup to use as bordersprotected int getVerticalAlignment()
protected RtfColor getBackgroundColor()
protected void setCellMergeChild(RtfCell mergeParent)
mergeParent
- The RtfCell to merge withpublic void setRtfDocument(RtfDocument doc)
setRtfDocument
in interface RtfBasicElement
doc
- The RtfDocument to usepublic void setInTable(boolean inTable)
setInTable
in interface RtfBasicElement
inTable
- public void setInHeader(boolean inHeader)
setInHeader
in interface RtfBasicElement
inHeader
- True
if this RtfCell is in a header, false
otherwiseprivate byte[] intToByteArray(int i)
i
- The integer to convert