com.lowagie.text
Class MarkedSection
- Element
public class MarkedSection
Wrapper that allows to add properties to a Chapter/Section object.
Before iText 1.5 every 'basic building block' implemented the MarkupAttributes interface.
By setting attributes, you could add markup to the corresponding XML and/or HTML tag.
This functionality was hardly used by anyone, so it was removed, and replaced by
the MarkedObject functionality.
ALIGN_BASELINE , ALIGN_BOTTOM , ALIGN_CENTER , ALIGN_JUSTIFIED , ALIGN_JUSTIFIED_ALL , ALIGN_LEFT , ALIGN_MIDDLE , ALIGN_RIGHT , ALIGN_TOP , ALIGN_UNDEFINED , ANCHOR , ANNOTATION , AUTHOR , CCITTG3_1D , CCITTG3_2D , CCITTG4 , CCITT_BLACKIS1 , CCITT_ENCODEDBYTEALIGN , CCITT_ENDOFBLOCK , CCITT_ENDOFLINE , CELL , CHAPTER , CHUNK , CREATIONDATE , CREATOR , HEADER , IMGRAW , IMGTEMPLATE , JPEG , KEYWORDS , LIST , LISTITEM , MARKED , MULTI_COLUMN_TEXT , PARAGRAPH , PHRASE , PRODUCER , PTABLE , RECTANGLE , ROW , SECTION , SUBJECT , TABLE , TITLE |
boolean | add(Object o) - Adds a
Paragraph , List , Table or another Section
to this Section .
|
void | add(int index, Object o) - Adds a
Paragraph , List or Table
to this Section .
|
boolean | addAll(Collection collection) - Adds a collection of
Element s
to this Section .
|
MarkedSection | addSection() - Creates a
Section , adds it to this Section and returns it.
|
MarkedSection | addSection(float indentation) - Creates a
Section , adds it to this Section and returns it.
|
MarkedSection | addSection(float indentation, int numberDepth) - Creates a
Section , adds it to this Section and returns it.
|
MarkedSection | addSection(int numberDepth) - Creates a
Section , add it to this Section and returns it.
|
boolean | process(ElementListener listener) - Processes the element by adding it (or the different parts) to an
ElementListener .
|
void | set(Properties attributes) - Alters the attributes of this
Section .
|
void | setBookmarkOpen(boolean bookmarkOpen) - Setter for property bookmarkOpen.
|
void | setBookmarkTitle(String bookmarkTitle) - Sets the bookmark title.
|
void | setIndentation(float indentation) - Sets the indentation of the content of this
Section .
|
void | setIndentationLeft(float indentation) - Sets the indentation of this
Section on the left side.
|
void | setIndentationRight(float indentation) - Sets the indentation of this
Section on the right side.
|
void | setNumberDepth(int numberDepth) - Sets the depth of the sectionnumbers that will be shown preceding the title.
|
void | setTitle(MarkedObject title) - Sets the title of this section.
|
void | setTriggerNewPage(boolean triggerNewPage) - Setter for property triggerNewPage.
|
MarkedObject | title() - Gets the title of this MarkedSection.
|
title
protected MarkedObject title
This is the title of this section.
MarkedSection
public MarkedSection(Section section)
Creates a MarkedObject with a Section or Chapter object.
section
- the marked section
add
public boolean add(Object o)
Adds a Paragraph
, List
, Table
or another Section
to this Section
.
o
- an object of type Paragraph
, List
, Table
or another Section
add
public void add(int index,
Object o)
Adds a Paragraph
, List
or Table
to this Section
.
index
- index at which the specified element is to be insertedo
- an object of type Paragraph
, List
or Table
=
addAll
public boolean addAll(Collection collection)
Adds a collection of Element
s
to this Section
.
collection
- a collection of Paragraph
s, List
s and/or Table
s
true
if the action succeeded, false
if not.
addSection
public MarkedSection addSection()
Creates a Section
, adds it to this Section
and returns it.
addSection
public MarkedSection addSection(float indentation)
Creates a Section
, adds it to this Section
and returns it.
indentation
- the indentation of the new section
addSection
public MarkedSection addSection(float indentation,
int numberDepth)
Creates a Section
, adds it to this Section
and returns it.
indentation
- the indentation of the new sectionnumberDepth
- the numberDepth of the section
addSection
public MarkedSection addSection(int numberDepth)
Creates a Section
, add it to this Section
and returns it.
numberDepth
- the numberDepth of the section
process
public boolean process(ElementListener listener)
Processes the element by adding it (or the different parts) to an
ElementListener
.
- process in interface Element
- process in interface MarkedObject
listener
- an ElementListener
true
if the element was processed successfully
set
public void set(Properties attributes)
Alters the attributes of this Section
.
attributes
- the attributes
setBookmarkOpen
public void setBookmarkOpen(boolean bookmarkOpen)
Setter for property bookmarkOpen.
bookmarkOpen
- false if the bookmark children are not
visible.
setBookmarkTitle
public void setBookmarkTitle(String bookmarkTitle)
Sets the bookmark title. The bookmark title is the same as the section title but
can be changed with this method.
bookmarkTitle
- the bookmark title
setIndentation
public void setIndentation(float indentation)
Sets the indentation of the content of this Section
.
indentation
- the indentation
setIndentationLeft
public void setIndentationLeft(float indentation)
Sets the indentation of this Section
on the left side.
indentation
- the indentation
setIndentationRight
public void setIndentationRight(float indentation)
Sets the indentation of this Section
on the right side.
indentation
- the indentation
setNumberDepth
public void setNumberDepth(int numberDepth)
Sets the depth of the sectionnumbers that will be shown preceding the title.
If the numberdepth is 0, the sections will not be numbered. If the numberdepth
is 1, the section will be numbered with their own number. If the numberdepth is
higher (for instance x > 1), the numbers of x - 1 parents will be shown.
numberDepth
- the new numberDepth
setTitle
public void setTitle(MarkedObject title)
Sets the title of this section.
setTriggerNewPage
public void setTriggerNewPage(boolean triggerNewPage)
Setter for property triggerNewPage.
triggerNewPage
- true if a new page has to be triggered.
title
public MarkedObject title()
Gets the title of this MarkedSection.