com.lowagie.text.rtf.table

## Class RtfBorderGroup

- java.lang.Object
- - com.lowagie.text.rtf.RtfElement
  - - com.lowagie.text.rtf.table.RtfBorderGroup

All Implemented Interfaces:
  RtfBasicElement, RtfElementInterface

    public class RtfBorderGroup
    extends RtfElement

The RtfBorderGroup represents a collection of RtfBorders to use in a RtfCell or RtfTable.

Version:
  $Id$
Author:
  Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)

### Field Summary

Fields
`private java.util.Hashtable` `borders` The borders in this RtfBorderGroup
`private int` `borderType` The type of borders this RtfBorderGroup contains.

### 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
`` `RtfBorderGroup()` Constructs an empty RtfBorderGroup.
`` `RtfBorderGroup(int bordersToAdd, int borderStyle, float borderWidth, java.awt.Color borderColor)` Constructs a RtfBorderGroup with on border style for multiple borders.
`protected` `RtfBorderGroup(RtfDocument doc, int borderType, int bordersToUse, float borderWidth, java.awt.Color borderColor)` Constructs a RtfBorderGroup with certain borders
`protected` `RtfBorderGroup(RtfDocument doc, int borderType, RtfBorderGroup borderGroup)` Constructs a RtfBorderGroup based on another RtfBorderGroup.

### Method Summary

Methods
`void` `addBorder(int bordersToAdd, int borderStyle, float borderWidth, java.awt.Color borderColor)` Adds borders to the RtfBorderGroup
`protected java.util.Hashtable` `getBorders()` Gets the RtfBorders of this RtfBorderGroup
`void` `removeBorder(int bordersToRemove)` Removes borders from the list of borders
`private void` `setBorder(int borderPosition, int borderStyle, float borderWidth, java.awt.Color borderColor)` Sets a border in the Hashtable of borders
`void` `writeContent(java.io.OutputStream result)` Writes the borders of this RtfBorderGroup

### Methods inherited from class com.lowagie.text.rtf.RtfElement

`intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### borderType

    private int borderType

The type of borders this RtfBorderGroup contains. RtfBorder.ROW_BORDER or RtfBorder.CELL_BORDER

#### borders

    private java.util.Hashtable borders

The borders in this RtfBorderGroup

### Constructor Detail

#### RtfBorderGroup

    public RtfBorderGroup()

Constructs an empty RtfBorderGroup.

#### RtfBorderGroup

    public RtfBorderGroup(int bordersToAdd,
                  int borderStyle,
                  float borderWidth,
                  java.awt.Color borderColor)

Constructs a RtfBorderGroup 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 RtfBorder)
  `borderWidth` - The border width to use
  `borderColor` - The border color to use

#### RtfBorderGroup

    protected RtfBorderGroup(RtfDocument doc,
                  int borderType,
                  RtfBorderGroup borderGroup)

Constructs a RtfBorderGroup based on another RtfBorderGroup.

Parameters:
  `doc` - The RtfDocument this RtfBorderGroup belongs to
  `borderType` - The type of borders this RtfBorderGroup contains
  `borderGroup` - The RtfBorderGroup to use as a base

#### RtfBorderGroup

    protected RtfBorderGroup(RtfDocument doc,
                  int borderType,
                  int bordersToUse,
                  float borderWidth,
                  java.awt.Color borderColor)

Constructs a RtfBorderGroup with certain borders

Parameters:
  `doc` - The RtfDocument this RtfBorderGroup belongs to
  `borderType` - The type of borders this RtfBorderGroup 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

#### setBorder

    private void setBorder(int borderPosition,
                 int borderStyle,
                 float borderWidth,
                 java.awt.Color borderColor)

Sets a border in the Hashtable of borders

Parameters:
  `borderPosition` - The position of this RtfBorder
  `borderStyle` - The type of borders this RtfBorderGroup contains
  `borderWidth` - The border width to use
  `borderColor` - The border color to use

#### addBorder

    public void addBorder(int bordersToAdd,
                 int borderStyle,
                 float borderWidth,
                 java.awt.Color borderColor)

Adds borders to the RtfBorderGroup

Parameters:
  `bordersToAdd` - The borders to add (Rectangle.LEFT, Rectangle.RIGHT, Rectangle.TOP, Rectangle.BOTTOM, Rectangle.BOX)
  `borderStyle` - The style of border to add (from RtfBorder)
  `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(java.io.OutputStream result)
                      throws java.io.IOException

Writes the borders of this RtfBorderGroup

Specified by:
  `writeContent` in interface `RtfBasicElement`
Specified by:
  `writeContent` in class `RtfElement`
Parameters:
  `result` - The `OutputStream` to write the content to
Throws:
  `java.io.IOException`

#### getBorders

    protected java.util.Hashtable getBorders()

Gets the RtfBorders of this RtfBorderGroup

Returns:
  The RtfBorders of this RtfBorderGroup