public class RtfCell extends Object
RtfWriter
.
Do not use it directly
ONLY FOR USE WITH THE RtfWriter NOT with the RtfWriter2.
Parts of this Class were contributed by Steffen Stundzig. Many thanks for the
improvements.
Updates by Benoit WIART
Modifier and Type | Field and Description |
---|---|
private static byte[] |
cellBackgroundColor
Deprecated.
Cell background color
|
private static byte[] |
cellBorderBottom
Deprecated.
Cell border bottom
|
private static byte[] |
cellBorderLeft
Deprecated.
Cell border left
|
private static byte[] |
cellBorderRight
Deprecated.
Cell border right
|
private static byte[] |
cellBorderTop
Deprecated.
Cell border top
|
private static byte[] |
cellEnd
Deprecated.
End of cell
|
protected static byte[] |
cellInTable
Deprecated.
Cell is part of table
|
private static byte[] |
cellMergeFirst
Deprecated.
First cell to merge with - Horizontal
|
private static byte[] |
cellMergePrev
Deprecated.
Merge cell with previous horizontal cell
|
private int |
cellpadding
Deprecated.
cell padding, because the table only renders the left and right cell padding
and not the top and bottom one
|
private static byte[] |
cellPaddingBottom
Deprecated.
padding bottom
|
private static byte[] |
cellPaddingBottomUnit
Deprecated.
padding bottom unit
|
private static byte[] |
cellPaddingLeft
Deprecated.
padding left
|
private static byte[] |
cellPaddingLeftUnit
Deprecated.
padding left unit
|
private static byte[] |
cellPaddingRight
Deprecated.
padding right
|
private static byte[] |
cellPaddingRightUnit
Deprecated.
padding right unit
|
private static byte[] |
cellPaddingTop
Deprecated.
padding top
|
private static byte[] |
cellPaddingTopUnit
Deprecated.
padding top unit
|
private int |
cellRight
Deprecated.
Cell right border position
|
private static byte[] |
cellRightBorder
Deprecated.
Cell right border position
|
private static byte[] |
cellVerticalAlignBottom
Deprecated.
Cell content vertical alignment bottom
|
private static byte[] |
cellVerticalAlignCenter
Deprecated.
Cell content vertical alignment center
|
private static byte[] |
cellVerticalAlignTop
Deprecated.
Cell content vertical alignment top
|
private static byte[] |
cellVMergeFirst
Deprecated.
First cell to merge with - Vertical
|
private static byte[] |
cellVMergePrev
Deprecated.
Merge cell with previous vertical cell
|
private int |
cellWidth
Deprecated.
Cell width
|
private static byte[] |
cellWidthStyle
Deprecated.
Cell width format
|
private static byte[] |
cellWidthTag
Deprecated.
Cell width
|
private boolean |
emptyCell
Deprecated.
Is this an empty cell
|
private RtfTable |
mainTable
Deprecated.
The
RtfTable to which this RtfCell belongs. |
private static int |
MERGE_BOTH_FIRST
Deprecated.
A possible value for merging
|
private static int |
MERGE_BOTH_PREV
Deprecated.
A possible value for merging
|
private static int |
MERGE_HORIZ_FIRST
Deprecated.
A possible value for merging
|
private static int |
MERGE_HORIZ_PREV
Deprecated.
A possible value for merging
|
private static int |
MERGE_VERT_FIRST
Deprecated.
A possible value for merging
|
private static int |
MERGE_VERT_PREV
Deprecated.
A possible value for merging
|
private int |
mergeType
Deprecated.
Type of merging to do
|
private Cell |
store
Deprecated.
Cell containing the actual data |
private RtfWriter |
writer
Deprecated.
The
RtfWriter to which this RtfCell belongs. |
Constructor and Description |
---|
RtfCell(RtfWriter writer,
RtfTable mainTable)
Deprecated.
Create a new
RtfCell . |
Modifier and Type | Method and Description |
---|---|
int |
getCellRight()
Deprecated.
Get the position of the right border of this
RtfCell . |
int |
getCellWidth()
Deprecated.
Get the with of this
RtfCell |
Cell |
getStore()
Deprecated.
Get the
Cell with the actual content. |
int |
importCell(Cell cell,
int cellLeft,
int cellWidth,
int x,
int y,
int cellpadding)
Deprecated.
Import a
Cell . |
void |
setCellRight(int value)
Deprecated.
Sets the right position of the cell
|
void |
setCellWidth(int value)
Deprecated.
sets the width of the cell
|
void |
setMerge(int mergeType,
RtfCell mergeCell)
Deprecated.
Sets the merge type and the
RtfCell with which this
RtfCell is to be merged. |
boolean |
writeCellContent(ByteArrayOutputStream os)
Deprecated.
Write the content of the
RtfCell . |
boolean |
writeCellSettings(ByteArrayOutputStream os)
Deprecated.
Write the properties of the
RtfCell . |
private void |
writeInt(ByteArrayOutputStream out,
int i)
Deprecated.
Write an Integer to the Outputstream.
|
private static final int MERGE_HORIZ_FIRST
private static final int MERGE_VERT_FIRST
private static final int MERGE_BOTH_FIRST
private static final int MERGE_HORIZ_PREV
private static final int MERGE_VERT_PREV
private static final int MERGE_BOTH_PREV
private static final byte[] cellMergeFirst
private static final byte[] cellVMergeFirst
private static final byte[] cellMergePrev
private static final byte[] cellVMergePrev
private static final byte[] cellVerticalAlignBottom
private static final byte[] cellVerticalAlignCenter
private static final byte[] cellVerticalAlignTop
private static final byte[] cellBorderLeft
private static final byte[] cellBorderRight
private static final byte[] cellBorderTop
private static final byte[] cellBorderBottom
private static final byte[] cellBackgroundColor
private static final byte[] cellWidthStyle
private static final byte[] cellWidthTag
private static final byte[] cellRightBorder
protected static final byte[] cellInTable
private static final byte[] cellEnd
private static final byte[] cellPaddingTop
private static final byte[] cellPaddingTopUnit
private static final byte[] cellPaddingBottom
private static final byte[] cellPaddingBottomUnit
private static final byte[] cellPaddingLeft
private static final byte[] cellPaddingLeftUnit
private static final byte[] cellPaddingRight
private static final byte[] cellPaddingRightUnit
private RtfWriter writer
RtfWriter
to which this RtfCell
belongs.private RtfTable mainTable
RtfTable
to which this RtfCell
belongs.private int cellWidth
private int cellRight
private Cell store
Cell
containing the actual dataprivate boolean emptyCell
private int mergeType
private int cellpadding
public int importCell(Cell cell, int cellLeft, int cellWidth, int x, int y, int cellpadding)
Cell
.
cell
- The Cell
containing the data for this
RtfCell
cellLeft
- The position of the left bordercellWidth
- The default width of a cellx
- The column index of this RtfCell
y
- The row index of this RtfCell
cellpadding
- the cellpaddingpublic boolean writeCellSettings(ByteArrayOutputStream os) throws DocumentException
RtfCell
.os
- The OutputStream
to which to write the properties
of the RtfCell
to.DocumentException
public boolean writeCellContent(ByteArrayOutputStream os) throws DocumentException
RtfCell
.os
- The OutputStream
to which to write the content of
the RtfCell
to.DocumentException
public void setMerge(int mergeType, RtfCell mergeCell)
RtfCell
with which this
RtfCell
is to be merged.mergeType
- The merge type specifies the kind of merge to be applied
(MERGE_HORIZ_PREV, MERGE_VERT_PREV, MERGE_BOTH_PREV)mergeCell
- The RtfCell
that the cell at x and y is to
be merged withpublic Cell getStore()
Cell
with the actual content.Cell
which is contained in the RtfCell
public int getCellWidth()
RtfCell
RtfCell
public void setCellWidth(int value)
value
- a widthpublic int getCellRight()
RtfCell
.public void setCellRight(int value)
value
- a cell positionprivate void writeInt(ByteArrayOutputStream out, int i) throws IOException
out
- The OutputStream
to be written to.i
- The int to be written.IOException