Class RtfBorderGroup
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.table.RtfBorderGroup
- All Implemented Interfaces:
RtfBasicElement
The RtfBorderGroup represents a collection of RtfBorders to use in a RtfCell
or RtfTable.
- Version:
- $Id: RtfBorderGroup.java 3427 2008-05-24 18:32:31Z xlv $
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe borders in this RtfBorderGroupprivate intThe type of borders this RtfBorderGroup contains.Fields inherited from class RtfElement
document, inHeader, inTableFields inherited from interface RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructs an empty RtfBorderGroup.RtfBorderGroup(int bordersToAdd, int borderStyle, float borderWidth, Color borderColor) Constructs a RtfBorderGroup with on border style for multiple borders.protectedRtfBorderGroup(RtfDocument doc, int borderType, int bordersToUse, float borderWidth, Color borderColor) Constructs a RtfBorderGroup with certain bordersprotectedRtfBorderGroup(RtfDocument doc, int borderType, RtfBorderGroup borderGroup) Constructs a RtfBorderGroup based on another RtfBorderGroup. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds borders to the RtfBorderGroupGets the RtfBorders of this RtfBorderGroupvoidremoveBorder(int bordersToRemove) Removes borders from the list of bordersprivate voidSets a border in the Hashtable of bordersvoidwriteContent(OutputStream result) Writes the borders of this RtfBorderGroupMethods inherited from class RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
-
Field Details
-
borderType
private int borderTypeThe type of borders this RtfBorderGroup contains. RtfBorder.ROW_BORDER or RtfBorder.CELL_BORDER -
borders
-
-
Constructor Details
-
RtfBorderGroup
public RtfBorderGroup()Constructs an empty RtfBorderGroup. -
RtfBorderGroup
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 useborderColor- The border color to use
-
RtfBorderGroup
Constructs a RtfBorderGroup based on another RtfBorderGroup.- Parameters:
doc- The RtfDocument this RtfBorderGroup belongs toborderType- The type of borders this RtfBorderGroup containsborderGroup- 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 toborderType- The type of borders this RtfBorderGroup containsbordersToUse- The borders to add (Rectangle.LEFT, Rectangle.RIGHT, Rectangle.TOP, Rectangle.BOTTOM, Rectangle.BOX)borderWidth- The border width to useborderColor- The border color to use
-
-
Method Details
-
setBorder
Sets a border in the Hashtable of borders- Parameters:
borderPosition- The position of this RtfBorderborderStyle- The type of borders this RtfBorderGroup containsborderWidth- The border width to useborderColor- The border color to use
-
addBorder
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 useborderColor- 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
Writes the borders of this RtfBorderGroup- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
IOException
-
getBorders
-