|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lowagie.text.Rectangle
com.lowagie.text.Cell
com.lowagie.text.rtf.table.RtfCell
public class RtfCell
The RtfCell wraps a Cell, but can also be added directly to a Table. The RtfCell is an extension of Cell, that supports a multitude of different borderstyles.
RtfBorder
Field Summary | |
---|---|
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 float |
cellPaddingBottom
|
private float |
cellPaddingLeft
|
private float |
cellPaddingRight
|
private float |
cellPaddingTop
|
private int |
cellRight
The right margin of this RtfCell |
private int |
cellWidth
The width of this RtfCell |
private ArrayList |
content
The content of this RtfCell |
private boolean |
deleted
Whether this RtfCell is a placeholder for a removed table cell. |
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 boolean |
usePadding
Whether to use generic padding or individual padding values (cellPaddingLeft, cellPaddingTop, cellPaddingBottom, cellPaddingRight) |
Fields inherited from class com.lowagie.text.Cell |
---|
arrayList, colspan, groupChange, header, horizontalAlignment, maxLines, percentage, rowspan, useAscender, useBorderPadding, useDescender, verticalAlignment, width |
Fields inherited from class com.lowagie.text.Rectangle |
---|
border, borderColor, borderColorBottom, borderColorLeft, borderColorRight, borderColorTop, borderWidth, borderWidthBottom, borderWidthLeft, borderWidthRight, borderWidthTop, BOTTOM, BOX, LEFT, llx, lly, NO_BORDER, RIGHT, rotation, TOP, UNDEFINED, urx, ury, useVariableBorders |
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement |
---|
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR |
Fields inherited from interface com.lowagie.text.Element |
---|
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, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE, YMARK |
Constructor Summary | |
---|---|
|
RtfCell()
Constructs an empty RtfCell |
protected |
RtfCell(boolean deleted)
Constructs a deleted RtfCell. |
|
RtfCell(Element element)
Constructs a RtfCell based upon an Element |
protected |
RtfCell(RtfDocument doc,
RtfRow row,
Cell cell)
Constructs a RtfCell based on a Cell. |
protected |
RtfCell(RtfDocument doc,
RtfRow row,
PdfPCell cell)
Constructs a RtfCell based on a Cell. |
|
RtfCell(String content)
Constructs a RtfCell based upon a String |
Method Summary | |
---|---|
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 RtfColor |
getRtfBackgroundColor()
Get the background color of this RtfCell |
private void |
importCell(Cell cell)
Imports the Cell properties into the RtfCell |
private void |
importCell(PdfPCell 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. |
boolean |
isDeleted()
Checks whether this RtfCell is a placeholder for a table cell that has been removed due to col/row spanning. |
boolean |
isInHeader()
Gets whether this RtfCell is in a header |
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 |
void |
writeContent(OutputStream result)
Write the content of this RtfCell |
void |
writeDefinition(OutputStream result)
Write the cell definition part of this RtfCell |
Methods inherited from class com.lowagie.text.Cell |
---|
add, addElement, bottom, clear, createPdfPCell, getBottom, getChunks, getColspan, getElements, getGroupChange, getHorizontalAlignment, getLeading, getLeft, getMaxLines, getRight, getRowspan, getShowTruncation, getTop, getVerticalAlignment, getWidth, getWidthAsString, isEmpty, isHeader, isTable, isUseAscender, isUseBorderPadding, isUseDescender, left, process, right, setBottom, setColspan, setGroupChange, setHeader, setHorizontalAlignment, setHorizontalAlignment, setLeading, setLeft, setMaxLines, setRight, setRowspan, setShowTruncation, setTop, setUseAscender, setUseBorderPadding, setUseDescender, setVerticalAlignment, setVerticalAlignment, setWidth, setWidth, size, top, type |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.lowagie.text.Element |
---|
isContent, isNestable, toString |
Field Detail |
---|
private static final int MERGE_NONE
private static final int MERGE_VERT_PARENT
private static final int MERGE_VERT_CHILD
private RtfRow parentRow
private ArrayList content
private int cellRight
private int cellWidth
private RtfBorderGroup borders
private RtfColor backgroundColor
private int cellPadding
private int mergeType
private RtfDocument document
private boolean inHeader
private boolean deleted
private boolean usePadding
private float cellPaddingLeft
private float cellPaddingTop
private float cellPaddingBottom
private float cellPaddingRight
Constructor Detail |
---|
public RtfCell()
public RtfCell(String content)
content
- The String to base the RtfCell onpublic RtfCell(Element element) throws BadElementException
element
- The Element to base the RtfCell on
BadElementException
- If the Element is not validprotected RtfCell(boolean deleted)
deleted
- Whether this RtfCell is actually deleted.protected 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 onprotected RtfCell(RtfDocument doc, RtfRow row, PdfPCell cell)
doc
- The RtfDocument this RtfCell belongs torow
- The RtfRow this RtfCell lies incell
- The PdfPCell to base this RtfCell onMethod Detail |
---|
private void importCell(Cell cell)
cell
- The Cell to importprivate void importCell(PdfPCell cell)
cell
- The PdfPCell to importpublic void writeDefinition(OutputStream result) throws IOException
writeDefinition
in interface RtfExtendedElement
result
- The OutputStream
to write the element definition to
IOException
public void writeContent(OutputStream result) throws IOException
writeContent
in interface RtfBasicElement
result
- The OutputStream
to write the content to
IOException
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 getCellpadding()
protected RtfBorderGroup getBorders()
public void setBorders(RtfBorderGroup borderGroup)
borderGroup
- The RtfBorderGroup to use as bordersprotected RtfColor getRtfBackgroundColor()
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
otherwisepublic boolean isInHeader()
RtfCell
is in a header
True
if this RtfCell
is in a header, false
otherwiseprivate byte[] intToByteArray(int i)
i
- The integer to convert
public boolean isDeleted()
True
if this RtfCell is deleted, false
otherwise.
|
Hosted by Hostbasket | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |