Class PatchRtfBorderGroup

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

    public class PatchRtfBorderGroup
    extends com.lowagie.text.rtf.RtfElement
    The PatchRtfBorderGroup represents a collection of RtfBorders to use in a PatchRtfCell or PatchRtfTable.
    Version:
    $Id: PatchRtfBorderGroup.java 3427 2008-05-24 18:32:31Z xlv $
    Author:
    Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
    • Field Summary

      • Fields inherited from class com.lowagie.text.rtf.RtfElement

        document, inHeader, inTable
      • Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement

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

      Constructors 
      Modifier Constructor Description
        PatchRtfBorderGroup()
      Constructs an empty PatchRtfBorderGroup.
        PatchRtfBorderGroup​(int bordersToAdd, int borderStyle, float borderWidth, Color borderColor)
      Constructs a PatchRtfBorderGroup with on border style for multiple borders.
      protected PatchRtfBorderGroup​(com.lowagie.text.rtf.document.RtfDocument doc, int borderType, int bordersToUse, float borderWidth, Color borderColor)
      Constructs a PatchRtfBorderGroup with certain borders
      protected PatchRtfBorderGroup​(com.lowagie.text.rtf.document.RtfDocument doc, int borderType, PatchRtfBorderGroup borderGroup)
      Constructs a PatchRtfBorderGroup based on another PatchRtfBorderGroup.
    • Constructor Detail

      • PatchRtfBorderGroup

        public PatchRtfBorderGroup()
        Constructs an empty PatchRtfBorderGroup.
      • PatchRtfBorderGroup

        public PatchRtfBorderGroup​(int bordersToAdd,
                                   int borderStyle,
                                   float borderWidth,
                                   Color borderColor)
        Constructs a PatchRtfBorderGroup with on border style for multiple borders.
        Parameters:
        bordersToAdd - The borders to add (Rectangle.LEFT, Rectangle.RIGHT, Rectangle.TOP, Rectangle.BOTTOM, Rectangle.BOX)
        borderStyle - The style of border to add (from PatchRtfBorder)
        borderWidth - The border width to use
        borderColor - The border color to use
      • PatchRtfBorderGroup

        protected PatchRtfBorderGroup​(com.lowagie.text.rtf.document.RtfDocument doc,
                                      int borderType,
                                      PatchRtfBorderGroup borderGroup)
        Constructs a PatchRtfBorderGroup based on another PatchRtfBorderGroup.
        Parameters:
        doc - The RtfDocument this PatchRtfBorderGroup belongs to
        borderType - The type of borders this PatchRtfBorderGroup contains
        borderGroup - The PatchRtfBorderGroup to use as a base
      • PatchRtfBorderGroup

        protected PatchRtfBorderGroup​(com.lowagie.text.rtf.document.RtfDocument doc,
                                      int borderType,
                                      int bordersToUse,
                                      float borderWidth,
                                      Color borderColor)
        Constructs a PatchRtfBorderGroup with certain borders
        Parameters:
        doc - The RtfDocument this PatchRtfBorderGroup belongs to
        borderType - The type of borders this PatchRtfBorderGroup contains
        bordersToUse - The borders to add (Rectangle.LEFT, Rectangle.RIGHT, Rectangle.TOP, Rectangle.BOTTOM, Rectangle.BOX)
        borderWidth - The border width to use
        borderColor - The border color to use
    • Method Detail

      • addBorder

        public void addBorder​(int bordersToAdd,
                              int borderStyle,
                              float borderWidth,
                              Color borderColor)
        Adds borders to the PatchRtfBorderGroup
        Parameters:
        bordersToAdd - The borders to add (Rectangle.LEFT, Rectangle.RIGHT, Rectangle.TOP, Rectangle.BOTTOM, Rectangle.BOX)
        borderStyle - The style of border to add (from PatchRtfBorder)
        borderWidth - The border width to use
        borderColor - The border color to use
      • removeBorder

        public void removeBorder​(int bordersToRemove)
        Removes borders from the list of borders
        Parameters:
        bordersToRemove - The borders to remove (from Rectangle)
      • writeContent

        public void writeContent​(OutputStream result)
                          throws IOException
        Writes the borders of this PatchRtfBorderGroup
        Specified by:
        writeContent in interface com.lowagie.text.rtf.RtfBasicElement
        Specified by:
        writeContent in class com.lowagie.text.rtf.RtfElement
        Throws:
        IOException
      • getBorders

        protected HashMap<Integer,​PatchRtfBorder> getBorders()
        Gets the RtfBorders of this PatchRtfBorderGroup
        Returns:
        The RtfBorders of this PatchRtfBorderGroup