com.lowagie.text.rtf.table

Class RtfBorderGroup

public class RtfBorderGroup extends RtfElement

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

Version: $Id: RtfBorderGroup.java 2776 2007-05-23 20:01:40Z hallm $

Author: Mark Hall (mhall@edu.uni-klu.ac.at) Thomas Bickel (tmb99@inode.at)

Field Summary
Hashtableborders
The borders in this RtfBorderGroup
intborderType
The type of borders this RtfBorderGroup contains.
Constructor Summary
RtfBorderGroup()
Constructs an empty RtfBorderGroup.
RtfBorderGroup(int bordersToAdd, int borderStyle, float borderWidth, Color borderColor)
Constructs a RtfBorderGroup with on border style for multiple borders.
protected RtfBorderGroup(RtfDocument doc, int borderType, RtfBorderGroup borderGroup)
Constructs a RtfBorderGroup based on another RtfBorderGroup.
protected RtfBorderGroup(RtfDocument doc, int borderType, int bordersToUse, float borderWidth, Color borderColor)
Constructs a RtfBorderGroup with certain borders
Method Summary
voidaddBorder(int bordersToAdd, int borderStyle, float borderWidth, Color borderColor)
Adds borders to the RtfBorderGroup
protected HashtablegetBorders()
Gets the RtfBorders of this RtfBorderGroup
voidremoveBorder(int bordersToRemove)
Removes borders from the list of borders
voidsetBorder(int borderPosition, int borderStyle, float borderWidth, Color borderColor)
Sets a border in the Hashtable of borders
byte[]write()
Writes the borders of this RtfBorderGroup
voidwriteContent(OutputStream result)
Writes the borders of this RtfBorderGroup

Field Detail

borders

private Hashtable borders
The borders in this RtfBorderGroup

borderType

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

Constructor Detail

RtfBorderGroup

public RtfBorderGroup()
Constructs an empty RtfBorderGroup.

RtfBorderGroup

public RtfBorderGroup(int bordersToAdd, int borderStyle, float borderWidth, 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, 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

addBorder

public void addBorder(int bordersToAdd, int borderStyle, float borderWidth, 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

getBorders

protected Hashtable getBorders()
Gets the RtfBorders of this RtfBorderGroup

Returns: The RtfBorders of this RtfBorderGroup

removeBorder

public void removeBorder(int bordersToRemove)
Removes borders from the list of borders

Parameters: bordersToRemove The borders to remove (from Rectangle)

setBorder

private void setBorder(int borderPosition, int borderStyle, float borderWidth, 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

write

public byte[] write()

Deprecated: replaced by writeContent

Writes the borders of this RtfBorderGroup

Returns: A byte array with the borders of this RtfBorderGroup

writeContent

public void writeContent(OutputStream result)
Writes the borders of this RtfBorderGroup