Package com.lowagie.text.rtf.text
Class RtfSection
java.lang.Object
com.lowagie.text.rtf.RtfElement
com.lowagie.text.rtf.text.RtfSection
- All Implemented Interfaces:
RtfBasicElement
,com.lowagie.text.RtfElementInterface
- Direct Known Subclasses:
RtfChapter
The RtfSection wraps a Section element.
INTERNAL CLASS
- Version:
- $Id: RtfSection.java 3373 2008-05-12 16:21:24Z xlv $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArrayList
<RtfBasicElement> The sub-items of this RtfSectionprotected RtfParagraph
The title paragraph of this RtfSectionFields 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
ConstructorsConstructorDescriptionRtfSection
(RtfDocument doc, com.lowagie.text.Section section) Constructs a RtfSection for a given Section. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setInHeader
(boolean inHeader) Sets whether this RtfSection is in a header.void
setInTable
(boolean inTable) Sets whether this RtfSection is in a table.private void
updateIndentation
(float indentLeft, float indentRight, float indentContent) Updates the left, right and content indentation of all RtfParagraph and RtfSection elements that this RtfSection contains.void
writeContent
(OutputStream result) Write this RtfSection and its contentsMethods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setRtfDocument
-
Field Details
-
title
The title paragraph of this RtfSection -
items
The sub-items of this RtfSection
-
-
Constructor Details
-
RtfSection
Constructs a RtfSection for a given Section. If the autogenerateTOCEntries property of the RtfDocument is set and the title is not empty then a TOC entry is generated for the title.- Parameters:
doc
- The RtfDocument this RtfSection belongs tosection
- The Section this RtfSection is based on
-
-
Method Details
-
writeContent
Write this RtfSection and its contents- Specified by:
writeContent
in interfaceRtfBasicElement
- Specified by:
writeContent
in classRtfElement
- Parameters:
result
- TheOutputStream
to write the content to- Throws:
IOException
-
setInTable
public void setInTable(boolean inTable) Sets whether this RtfSection is in a table. Sets the correct inTable setting for all child elements.- Specified by:
setInTable
in interfaceRtfBasicElement
- Overrides:
setInTable
in classRtfElement
- Parameters:
inTable
-True
if this RtfSection is in a table,false
otherwise
-
setInHeader
public void setInHeader(boolean inHeader) Sets whether this RtfSection is in a header. Sets the correct inTable setting for all child elements.- Specified by:
setInHeader
in interfaceRtfBasicElement
- Overrides:
setInHeader
in classRtfElement
- Parameters:
inHeader
-True
if this RtfSection is in a header,false
otherwise
-
updateIndentation
private void updateIndentation(float indentLeft, float indentRight, float indentContent) Updates the left, right and content indentation of all RtfParagraph and RtfSection elements that this RtfSection contains.- Parameters:
indentLeft
- The left indentation to add.indentRight
- The right indentation to add.indentContent
- The content indentation to add.
-