![]() | |
Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
ArrayList
com.lowagie.text.Section
com.lowagie.text.Chapter
public class Chapter
extends Section
Chapter
is a special Section
.
A chapter number has to be created using a Paragraph
as title
and an int
as chapter number. The chapter number is shown be
default. If you don't want to see the chapter number, you have to set the
numberdepth to 0.
Example:
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); chapter2.setNumberDepth(0); 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))); Section section1 = chapter2.addSection(title21); 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."); section1.add(someSectionText);
Field Summary | |
private static long |
Fields inherited from class com.lowagie.text.Section | |
bookmarkOpen , bookmarkTitle , indentationLeft , indentationRight , numberDepth , numbers , sectionIndent , serialVersionUID , subsections , title , triggerNewPage |
Fields inherited from interface com.lowagie.text.Element | |
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 |
Constructor Summary | |
| |
| |
|
Method Summary | |
static boolean |
|
int |
|
Methods inherited from class com.lowagie.text.Section | |
add , add , addAll , addMarkedSection , addSection , addSection , addSection , addSection , addSection , addSection , addSection , addSection , addSection , depth , getBookmarkTitle , getChunks , indentation , indentationLeft , indentationRight , isBookmarkOpen , isChapter , isSection , isTag , isTitle , isTriggerNewPage , numberDepth , process , set , setBookmarkOpen , setBookmarkTitle , setChapterNumber , setIndentation , setIndentationLeft , setIndentationRight , setNumberDepth , setNumbers , setTitle , setTriggerNewPage , title , type |
public Chapter(Properties attributes, int number)
Creates a newChapter
following a set of attributes.
- Parameters:
attributes
- the attributesnumber
- a userdefined Chapter number
public Chapter(String title, int number)
Constructs a newChapter
.
- Parameters:
title
- the Chapter title (as aString
)number
- the Chapter number
public Chapter(Paragraph title, int number)
Constructs a newChapter
.
- Parameters:
title
- the Chapter title (as aParagraph
)number
- the Chapter number
public Chapter(int number)
Constructs a newChapter
.
- Parameters:
number
- the Chapter number
public static boolean isTag(String tag)
Checks if a given tag corresponds with this object.
- Parameters:
tag
- the given tag
- Returns:
- true if the tag corresponds