HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.Section Class Reference

A Section is a part of a Document containing other Sections, Paragraphs, List and/or Tables. More...

Inheritance diagram for iTextSharp.text.Section:
iTextSharp.text.ITextElementArray iTextSharp.text.ILargeElement iTextSharp.text.IElement iTextSharp.text.IElement iTextSharp.text.Chapter iTextSharp.text.ChapterAutoNumber

Public Member Functions

bool Process (IElementListener listener)
 Processes the element by adding it (or the different parts) to an IElementListener. More...
 
bool IsContent ()
 
virtual bool IsNestable ()
 
void Add (int index, Object o)
 Adds a Paragraph, List or Table to this Section. More...
 
new bool Add (Object o)
 Adds a Paragraph, List, Table or another Section to this Section. More...
 
bool AddAll (ICollection collection)
 Adds a collection of Elements to this Section. More...
 
virtual Section AddSection (float indentation, Paragraph title, int numberDepth)
 Creates a Section, adds it to this Section and returns it. More...
 
virtual Section AddSection (float indentation, Paragraph title)
 Creates a Section, adds it to this Section and returns it. More...
 
virtual Section AddSection (Paragraph title, int numberDepth)
 Creates a Section, add it to this Section and returns it. More...
 
MarkedSection AddMarkedSection ()
 
virtual Section AddSection (Paragraph title)
 Creates a Section, adds it to this Section and returns it. More...
 
virtual Section AddSection (float indentation, string title, int numberDepth)
 Adds a Section to this Section and returns it. More...
 
virtual Section AddSection (string title, int numberDepth)
 Adds a Section to this Section and returns it. More...
 
virtual Section AddSection (float indentation, string title)
 Adds a Section to this Section and returns it. More...
 
virtual Section AddSection (string title)
 Adds a Section to this Section and returns it. More...
 
void Set (Properties attributes)
 Alters the attributes of this Section. More...
 
bool IsChapter ()
 Checks if this object is a Chapter. More...
 
bool IsSection ()
 Checks if this object is a Section. More...
 
Paragraph GetBookmarkTitle ()
 
override string ToString ()
 Gets the content of the text element. More...
 
void SetChapterNumber (int number)
 
void FlushContent ()
 
void NewPage ()
 

Static Public Member Functions

static Paragraph ConstructTitle (Paragraph title, ArrayList numbers, int numberDepth, int numberStyle)
 
static bool IsTitle (string tag)
 Checks if a given tag corresponds with a title tag for this object. More...
 
static bool IsTag (string tag)
 Checks if a given tag corresponds with this object. More...
 

Static Public Attributes

const int NUMBERSTYLE_DOTTED = 0
 
const int NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT = 1
 

Protected Attributes

Paragraph title
 This is the title of this section. More...
 
int numberDepth
 
int numberStyle = NUMBERSTYLE_DOTTED
 summary> The indentation of this section on the left side. More...
 
float indentationLeft
 summary> The indentation of this section on the right side. More...
 
float indentationRight
 summary> The additional indentation of the content of this section. More...
 
float indentation
 summary> This is the number of subsections. More...
 
int subsections = 0
 summary> This is the complete list of sectionnumbers of this section and the parents of this section. More...
 
bool complete = true
 
bool addedCompletely = false
 
bool notAddedYet = true
 summary> false if the bookmark children are not visible More...
 
bool bookmarkOpen = true
 
bool triggerNewPage = false
 
string bookmarkTitle
 

Properties

virtual int Type [get]
 Gets the type of the text element. More...
 
ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 
Paragraph Title [get, set]
 Get/set the title of this section More...
 
int NumberStyle [get, set]
 
int NumberDepth [get, set]
 Get/set the numberdepth of this Section. More...
 
float IndentationLeft [get, set]
 Get/set the indentation of this Section on the left side. More...
 
float IndentationRight [get, set]
 Get/set the indentation of this Section on the right side. More...
 
float Indentation [get, set]
 Get/set the indentation of the content of this Section. More...
 
int Depth [get]
 Returns the depth of this section. More...
 
bool BookmarkOpen [get, set]
 Get/set the bookmark More...
 
String BookmarkTitle [set]
 
virtual bool TriggerNewPage [get, set]
 
bool NotAddedYet [get, set]
 
bool AddedCompletely [get, set]
 
bool ElementComplete [get, set]
 
- Properties inherited from iTextSharp.text.IElement
int Type [get]
 Gets the type of the text element. More...
 
ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 
- Properties inherited from iTextSharp.text.ILargeElement
bool ElementComplete [get, set]
 

Detailed Description

A Section is a part of a Document containing other Sections, Paragraphs, List and/or Tables.

You can not construct a Section yourself. You will have to ask an instance of Section to the Chapter or Section to which you want to add the new Section.

Paragraph title2 = new Paragraph("This is Chapter 2", FontFactory.GetFont(FontFactory.HELVETICA, 18, Font.BOLDITALIC, new Color(0, 0, 255)));
Chapter chapter2 = new Chapter(title2, 2);
Paragraph someText = new Paragraph("This is some text");
chapter2.Add(someText);
Paragraph title21 = new Paragraph("This is Section 1 in Chapter 2", FontFactory.GetFont(FontFactory.HELVETICA, 16, Font.BOLD, new Color(255, 0, 0)));
<strong>Section section1 = chapter2.AddSection(title21);</strong>
Paragraph someSectionText = new Paragraph("This is some silly paragraph in a chapter and/or section. It contains some text to test the functionality of Chapters and Section.");
<strong>section1.Add(someSectionText);</strong>
Paragraph title211 = new Paragraph("This is SubSection 1 in Section 1 in Chapter 2", FontFactory.GetFont(FontFactory.HELVETICA, 14, Font.BOLD, new Color(255, 0, 0)));
<strong>Section section11 = section1.AddSection(40, title211, 2);
section11.Add(someSectionText);</strong>strong>

Member Function Documentation

◆ Add() [1/2]

void iTextSharp.text.Section.Add ( int  index,
Object  o 
)

Adds a Paragraph, List or Table to this Section.

Parameters
indexindex at which the specified element is to be inserted
oan object of type Paragraph, List or Table

◆ Add() [2/2]

new bool iTextSharp.text.Section.Add ( Object  o)

Adds a Paragraph, List, Table or another Section to this Section.

Parameters
oan object of type Paragraph, List, Table or another Section
Returns
a bool

Implements iTextSharp.text.ITextElementArray.

◆ AddAll()

bool iTextSharp.text.Section.AddAll ( ICollection  collection)

Adds a collection of Elements to this Section.

Parameters
collectiona collection of Paragraphs, Lists and/or Tables
Returns
true if the action succeeded, false if not.

◆ AddMarkedSection()

MarkedSection iTextSharp.text.Section.AddMarkedSection ( )

Adds a marked section. For use in class MarkedSection only!

◆ AddSection() [1/8]

virtual Section iTextSharp.text.Section.AddSection ( float  indentation,
Paragraph  title 
)
virtual

Creates a Section, adds it to this Section and returns it.

Parameters
indentationthe indentation of the new section
titlethe title of the new section
Returns
the newly added Section

◆ AddSection() [2/8]

virtual Section iTextSharp.text.Section.AddSection ( float  indentation,
Paragraph  title,
int  numberDepth 
)
virtual

Creates a Section, adds it to this Section and returns it.

Parameters
indentationthe indentation of the new section
titlethe title of the new section
numberDepththe numberDepth of the section
Returns
the newly added Section

◆ AddSection() [3/8]

virtual Section iTextSharp.text.Section.AddSection ( float  indentation,
string  title 
)
virtual

Adds a Section to this Section and returns it.

Parameters
indentationthe indentation of the new section
titlethe title of the new section
Returns
the newly added Section

◆ AddSection() [4/8]

virtual Section iTextSharp.text.Section.AddSection ( float  indentation,
string  title,
int  numberDepth 
)
virtual

Adds a Section to this Section and returns it.

Adds a Section to this Section and returns it.

Parameters
indentationthe indentation of the new section
titlethe title of the new section
numberDepththe numberDepth of the section
Parameters
indentationthe indentation of the new section
titlethe title of the new section
numberDepththe numberDepth of the section
Returns
the newly added Section

◆ AddSection() [5/8]

virtual Section iTextSharp.text.Section.AddSection ( Paragraph  title)
virtual

Creates a Section, adds it to this Section and returns it.

Parameters
titlethe title of the new section
Returns
the newly added Section

Reimplemented in iTextSharp.text.ChapterAutoNumber.

◆ AddSection() [6/8]

virtual Section iTextSharp.text.Section.AddSection ( Paragraph  title,
int  numberDepth 
)
virtual

Creates a Section, add it to this Section and returns it.

Parameters
titlethe title of the new section
numberDepththe numberDepth of the section
Returns
the newly added Section

◆ AddSection() [7/8]

virtual Section iTextSharp.text.Section.AddSection ( string  title)
virtual

Adds a Section to this Section and returns it.

Parameters
titlethe title of the new section
Returns
the newly added Section

◆ AddSection() [8/8]

virtual Section iTextSharp.text.Section.AddSection ( string  title,
int  numberDepth 
)
virtual

Adds a Section to this Section and returns it.

Adds a Section to this Section and returns it.

Parameters
titlethe title of the new section
numberDepththe numberDepth of the section
Parameters
titlethe title of the new section
numberDepththe numberDepth of the section
Returns
the newly added Section

◆ ConstructTitle()

static Paragraph iTextSharp.text.Section.ConstructTitle ( Paragraph  title,
ArrayList  numbers,
int  numberDepth,
int  numberStyle 
)
static

Constructs a Paragraph that will be used as title for a Section or Chapter.

Parameters
titlethe title of the section
numbersa list of sectionnumbers
numberDepthhow many numbers have to be shown
numberStylethe numbering style
Returns
a Paragraph object
Since
iText 2.0.8

◆ FlushContent()

void iTextSharp.text.Section.FlushContent ( )
Since
iText 2.0.8
See also
com.lowagie.text.LargeElement::flushContent()

Implements iTextSharp.text.ILargeElement.

◆ GetBookmarkTitle()

Paragraph iTextSharp.text.Section.GetBookmarkTitle ( )

Gets the bookmark title.

Returns
the bookmark title

◆ IsChapter()

bool iTextSharp.text.Section.IsChapter ( )

Checks if this object is a Chapter.

Returns
true if it is a Chapter, false if it is a Section

◆ IsContent()

bool iTextSharp.text.Section.IsContent ( )
See also
com.lowagie.text.Element::isContent()
Since
iText 2.0.8

Implements iTextSharp.text.IElement.

◆ IsNestable()

virtual bool iTextSharp.text.Section.IsNestable ( )
virtual
See also
com.lowagie.text.Element::isNestable()
Since
iText 2.0.8

Implements iTextSharp.text.IElement.

Reimplemented in iTextSharp.text.Chapter.

◆ IsSection()

bool iTextSharp.text.Section.IsSection ( )

Checks if this object is a Section.

Returns
true if it is a Section, false if it is a Chapter.

◆ IsTag()

static bool iTextSharp.text.Section.IsTag ( string  tag)
static

Checks if a given tag corresponds with this object.

Parameters
tagthe given tag
Returns
true if the tag corresponds

◆ IsTitle()

static bool iTextSharp.text.Section.IsTitle ( string  tag)
static

Checks if a given tag corresponds with a title tag for this object.

Parameters
tagthe given tag
Returns
true if the tag corresponds

◆ NewPage()

void iTextSharp.text.Section.NewPage ( )

Adds a new page to the section.

Since
2.1.1

◆ Process()

bool iTextSharp.text.Section.Process ( IElementListener  listener)

Processes the element by adding it (or the different parts) to an IElementListener.

Parameters
listenerthe IElementListener
Returns
true if the element was processed successfully

Implements iTextSharp.text.IElement.

◆ Set()

void iTextSharp.text.Section.Set ( Properties  attributes)

Alters the attributes of this Section.

Parameters
attributesthe attributes

◆ SetChapterNumber()

void iTextSharp.text.Section.SetChapterNumber ( int  number)

Changes the Chapter number.

◆ ToString()

override string iTextSharp.text.Section.ToString ( )

Gets the content of the text element.

Returns
the content of the text element

Implements iTextSharp.text.IElement.

Member Data Documentation

◆ addedCompletely

bool iTextSharp.text.Section.addedCompletely = false
protected

Indicates if the Section was added completely to the document.

Since
iText 2.0.8

◆ bookmarkOpen

bool iTextSharp.text.Section.bookmarkOpen = true
protected

◆ bookmarkTitle

string iTextSharp.text.Section.bookmarkTitle
protected

The bookmark title if different from the content title

◆ complete

bool iTextSharp.text.Section.complete = true
protected

Indicates if the Section will be complete once added to the document.

Since
iText 2.0.8

◆ indentation

float iTextSharp.text.Section.indentation
protected

summary> This is the number of subsections.

◆ indentationLeft

float iTextSharp.text.Section.indentationLeft
protected

summary> The indentation of this section on the right side.

◆ indentationRight

float iTextSharp.text.Section.indentationRight
protected

summary> The additional indentation of the content of this section.

◆ notAddedYet

bool iTextSharp.text.Section.notAddedYet = true
protected

summary> false if the bookmark children are not visible

Indicates if this is the first time the section was added.

Since
iText 2.0.8

◆ numberDepth

int iTextSharp.text.Section.numberDepth
protected

◆ numberStyle

int iTextSharp.text.Section.numberStyle = NUMBERSTYLE_DOTTED
protected

summary> The indentation of this section on the left side.

The style for sectionnumbers.

Since
iText 2.0.8

◆ NUMBERSTYLE_DOTTED

const int iTextSharp.text.Section.NUMBERSTYLE_DOTTED = 0
static

A possible number style. The default number style: "1.2.3."

Since
iText 2.0.8

◆ NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT

const int iTextSharp.text.Section.NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT = 1
static

A possible number style. For instance: "1.2.3"

Since
iText 2.0.8

◆ subsections

int iTextSharp.text.Section.subsections = 0
protected

summary> This is the complete list of sectionnumbers of this section and the parents of this section.

◆ title

Paragraph iTextSharp.text.Section.title
protected

This is the title of this section.

summary> This is the number of sectionnumbers that has to be shown before the section title.

◆ triggerNewPage

bool iTextSharp.text.Section.triggerNewPage = false
protected

true if the section has to trigger a new page

Property Documentation

◆ AddedCompletely

bool iTextSharp.text.Section.AddedCompletely
getsetprotected
See also
com.lowagie.text.LargeElement::isAddedCompletely()
Since
iText 2.0.8

◆ BookmarkOpen

bool iTextSharp.text.Section.BookmarkOpen
getset

Get/set the bookmark

a bool

◆ BookmarkTitle

String iTextSharp.text.Section.BookmarkTitle
set

Sets the bookmark title. The bookmark title is the same as the section title but can be changed with this method.

Parameters
bookmarkTitlethe bookmark title

◆ Chunks

ArrayList iTextSharp.text.Section.Chunks
get

Gets all the chunks in this element.

an ArrayList

◆ Depth

int iTextSharp.text.Section.Depth
get

Returns the depth of this section.

the depth

◆ ElementComplete

bool iTextSharp.text.Section.ElementComplete
getset
Since
iText 2.0.8
See also
com.lowagie.text.LargeElement::isComplete()

◆ Indentation

float iTextSharp.text.Section.Indentation
getset

Get/set the indentation of the content of this Section.

the indentation

◆ IndentationLeft

float iTextSharp.text.Section.IndentationLeft
getset

Get/set the indentation of this Section on the left side.

the indentation

◆ IndentationRight

float iTextSharp.text.Section.IndentationRight
getset

Get/set the indentation of this Section on the right side.

the indentation

◆ NotAddedYet

bool iTextSharp.text.Section.NotAddedYet
getset

Indicates if this is the first time the section is added.

Since
iText2.0.8
Returns
true if the section wasn't added yet

◆ NumberDepth

int iTextSharp.text.Section.NumberDepth
getset

Get/set the numberdepth of this Section.

a int

◆ NumberStyle

int iTextSharp.text.Section.NumberStyle
getset

Sets the style for numbering sections. Possible values are NUMBERSTYLE_DOTTED: 1.2.3. (the default) or NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT: 1.2.3

Since
iText 2.0.8

◆ Title

Paragraph iTextSharp.text.Section.Title
getset

Get/set the title of this section

a Paragraph

◆ TriggerNewPage

virtual bool iTextSharp.text.Section.TriggerNewPage
getset

◆ Type

virtual int iTextSharp.text.Section.Type
get

Gets the type of the text element.

a type


The documentation for this class was generated from the following file: