Class PatchRtfCell

  • All Implemented Interfaces:
    com.lowagie.text.Element, com.lowagie.text.rtf.RtfBasicElement, com.lowagie.text.rtf.RtfExtendedElement, com.lowagie.text.RtfElementInterface, com.lowagie.text.TextElementArray

    public class PatchRtfCell
    extends com.lowagie.text.Cell
    implements com.lowagie.text.rtf.RtfExtendedElement
    The PatchRtfCell wraps a Cell, but can also be added directly to a Table. The PatchRtfCell is an extension of Cell, that supports a multitude of different borderstyles.
    Version:
    $Id: PatchRtfCell.java 3580 2008-08-06 15:52:00Z howard_s $
    Author:
    Mark Hall (Mark.Hall@mail.room3b.eu), Steffen Stundzig, Benoit Wiart, Thomas Bickel (tmb99@inode.at)
    See Also:
    RtfBorder
    • Field Summary

      • 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.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
      • Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement

        CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        PatchRtfCell()
      Constructs an empty PatchRtfCell
      protected PatchRtfCell​(boolean deleted)
      Constructs a deleted PatchRtfCell.
        PatchRtfCell​(com.lowagie.text.Element element)
      Constructs a PatchRtfCell based upon an Element
      protected PatchRtfCell​(com.lowagie.text.rtf.document.RtfDocument doc, PatchRtfRow row, com.lowagie.text.Cell cell)
      Constructs a PatchRtfCell based on a Cell.
      protected PatchRtfCell​(com.lowagie.text.rtf.document.RtfDocument doc, PatchRtfRow row, com.lowagie.text.pdf.PdfPCell cell)
      Constructs a PatchRtfCell based on a Cell.
        PatchRtfCell​(String content)
      Constructs a PatchRtfCell based upon a String
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected PatchRtfBorderGroup getBorders()
      Gets the borders of this PatchRtfCell
      protected int getCellpadding()
      Gets the cell padding of this PatchRtfCell
      protected int getCellRight()
      Gets the right margin of this PatchRtfCell
      protected int getCellWidth()
      Gets the cell width of this PatchRtfCell
      float getMinimumHeight()  
      protected com.lowagie.text.rtf.style.RtfColor getRtfBackgroundColor()
      Get the background color of this PatchRtfCell
      boolean isDeleted()
      Checks whether this PatchRtfCell is a placeholder for a table cell that has been removed due to col/row spanning.
      boolean isInHeader()
      Gets whether this PatchRtfCell is in a header
      void setBorders​(PatchRtfBorderGroup borderGroup)
      Set the borders of this PatchRtfCell
      protected void setCellMergeChild​(PatchRtfCell 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 PatchRtfCell.
      void setInHeader​(boolean inHeader)
      Sets whether this PatchRtfCell is in a header
      void setInTable​(boolean inTable)
      Unused
      void setMinimumHeight​(float minimumHeight)  
      void setRtfDocument​(com.lowagie.text.rtf.document.RtfDocument doc)
      Sets the RtfDocument this PatchRtfCell belongs to
      void writeContent​(OutputStream result)
      Write the content of this PatchRtfCell
      void writeDefinition​(OutputStream result)
      Write the cell definition part of this PatchRtfCell
      • 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 com.lowagie.text.Rectangle

        cloneNonPositionParameters, disableBorderSide, enableBorderSide, getBackgroundColor, getBorder, getBorderColor, getBorderColorBottom, getBorderColorLeft, getBorderColorRight, getBorderColorTop, getBorderWidth, getBorderWidthBottom, getBorderWidthLeft, getBorderWidthRight, getBorderWidthTop, getBottom, getGrayFill, getHeight, getLeft, getRight, getRotation, getTop, hasBorder, hasBorders, isContent, isNestable, isUseVariableBorders, normalize, rectangle, rotate, setBackgroundColor, setBorder, setBorderColor, setBorderColorBottom, setBorderColorLeft, setBorderColorRight, setBorderColorTop, setBorderWidth, setBorderWidthBottom, setBorderWidthLeft, setBorderWidthRight, setBorderWidthTop, setBottom, setGrayFill, setLeft, setRight, setTop, setUseVariableBorders, softCloneNonPositionParameters, toString
      • Methods inherited from interface com.lowagie.text.Element

        isContent, isNestable, toString
    • Constructor Detail

      • PatchRtfCell

        public PatchRtfCell()
        Constructs an empty PatchRtfCell
      • PatchRtfCell

        public PatchRtfCell​(String content)
        Constructs a PatchRtfCell based upon a String
        Parameters:
        content - The String to base the PatchRtfCell on
      • PatchRtfCell

        public PatchRtfCell​(com.lowagie.text.Element element)
                     throws com.lowagie.text.BadElementException
        Constructs a PatchRtfCell based upon an Element
        Parameters:
        element - The Element to base the PatchRtfCell on
        Throws:
        com.lowagie.text.BadElementException - If the Element is not valid
      • PatchRtfCell

        protected PatchRtfCell​(boolean deleted)
        Constructs a deleted PatchRtfCell.
        Parameters:
        deleted - Whether this PatchRtfCell is actually deleted.
      • PatchRtfCell

        protected PatchRtfCell​(com.lowagie.text.rtf.document.RtfDocument doc,
                               PatchRtfRow row,
                               com.lowagie.text.Cell cell)
        Constructs a PatchRtfCell based on a Cell.
        Parameters:
        doc - The RtfDocument this PatchRtfCell belongs to
        row - The PatchRtfRow this PatchRtfCell lies in
        cell - The Cell to base this PatchRtfCell on
      • PatchRtfCell

        protected PatchRtfCell​(com.lowagie.text.rtf.document.RtfDocument doc,
                               PatchRtfRow row,
                               com.lowagie.text.pdf.PdfPCell cell)
        Constructs a PatchRtfCell based on a Cell.
        Parameters:
        doc - The RtfDocument this PatchRtfCell belongs to
        row - The PatchRtfRow this PatchRtfCell lies in
        cell - The PdfPCell to base this PatchRtfCell on
        Since:
        2.1.3
    • Method Detail

      • writeDefinition

        public void writeDefinition​(OutputStream result)
                             throws IOException
        Write the cell definition part of this PatchRtfCell
        Specified by:
        writeDefinition in interface com.lowagie.text.rtf.RtfExtendedElement
        Throws:
        IOException
      • writeContent

        public void writeContent​(OutputStream result)
                          throws IOException
        Write the content of this PatchRtfCell
        Specified by:
        writeContent in interface com.lowagie.text.rtf.RtfBasicElement
        Throws:
        IOException
      • setCellRight

        protected void setCellRight​(int cellRight)
        Sets the right margin of this cell. Used in merge operations
        Parameters:
        cellRight - The right margin to use
      • getCellRight

        protected int getCellRight()
        Gets the right margin of this PatchRtfCell
        Returns:
        The right margin of this PatchRtfCell.
      • setCellWidth

        protected void setCellWidth​(int cellWidth)
        Sets the cell width of this PatchRtfCell. Used in merge operations.
        Parameters:
        cellWidth - The cell width to use
      • getCellWidth

        protected int getCellWidth()
        Gets the cell width of this PatchRtfCell
        Returns:
        The cell width of this PatchRtfCell
      • getCellpadding

        protected int getCellpadding()
        Gets the cell padding of this PatchRtfCell
        Returns:
        The cell padding of this PatchRtfCell
      • getBorders

        protected PatchRtfBorderGroup getBorders()
        Gets the borders of this PatchRtfCell
        Returns:
        The borders of this PatchRtfCell
      • setBorders

        public void setBorders​(PatchRtfBorderGroup borderGroup)
        Set the borders of this PatchRtfCell
        Parameters:
        borderGroup - The PatchRtfBorderGroup to use as borders
      • getRtfBackgroundColor

        protected com.lowagie.text.rtf.style.RtfColor getRtfBackgroundColor()
        Get the background color of this PatchRtfCell
        Returns:
        The background color of this PatchRtfCell
      • setCellMergeChild

        protected void setCellMergeChild​(PatchRtfCell mergeParent)
        Merge this cell into the parent cell.
        Parameters:
        mergeParent - The PatchRtfCell to merge with
      • setRtfDocument

        public void setRtfDocument​(com.lowagie.text.rtf.document.RtfDocument doc)
        Sets the RtfDocument this PatchRtfCell belongs to
        Specified by:
        setRtfDocument in interface com.lowagie.text.rtf.RtfBasicElement
        Parameters:
        doc - The RtfDocument to use
      • setInTable

        public void setInTable​(boolean inTable)
        Unused
        Specified by:
        setInTable in interface com.lowagie.text.rtf.RtfBasicElement
        Parameters:
        inTable -
      • setInHeader

        public void setInHeader​(boolean inHeader)
        Sets whether this PatchRtfCell is in a header
        Specified by:
        setInHeader in interface com.lowagie.text.rtf.RtfBasicElement
        Parameters:
        inHeader - True if this PatchRtfCell is in a header, false otherwise
      • isInHeader

        public boolean isInHeader()
        Gets whether this PatchRtfCell is in a header
        Returns:
        True if this PatchRtfCell is in a header, false otherwise
        Since:
        2.1.0
      • isDeleted

        public boolean isDeleted()
        Checks whether this PatchRtfCell is a placeholder for a table cell that has been removed due to col/row spanning.
        Returns:
        True if this PatchRtfCell is deleted, false otherwise.
      • getMinimumHeight

        public float getMinimumHeight()
      • setMinimumHeight

        public void setMinimumHeight​(float minimumHeight)