|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
com.lowagie.text.Section
com.lowagie.text.Chapter
public class Chapter
A 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 |
serialVersionUID
|
| Fields inherited from class com.lowagie.text.Section |
|---|
bookmarkOpen, bookmarkTitle, indentation, indentationLeft, indentationRight, numberDepth, numbers, subsections, title, triggerNewPage |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| 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, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE, TITLE |
| Constructor Summary | |
|---|---|
Chapter(int number)
Constructs a new Chapter. |
|
Chapter(Paragraph title,
int number)
Constructs a new Chapter. |
|
Chapter(Properties attributes,
int number)
Deprecated. As of iText 2.0.3, use ElementFactory.getChapter(Properties) instead,
scheduled for removal at 2.1.0 |
|
Chapter(String title,
int number)
Constructs a new Chapter. |
|
| Method Summary | |
|---|---|
int |
type()
Gets the type of the text element. |
| Methods inherited from class com.lowagie.text.Section |
|---|
add, add, addAll, addMarkedSection, addSection, addSection, addSection, addSection, addSection, addSection, addSection, addSection, addSection, depth, getBookmarkTitle, getChunks, getDepth, getIndentation, getIndentationLeft, getIndentationRight, getNumberDepth, getTitle, indentation, indentationLeft, indentationRight, isBookmarkOpen, isChapter, isSection, isTriggerNewPage, numberDepth, process, setBookmarkOpen, setBookmarkTitle, setChapterNumber, setIndentation, setIndentationLeft, setIndentationRight, setNumberDepth, setTitle, setTriggerNewPage, title |
| Methods inherited from class java.util.ArrayList |
|---|
addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.lowagie.text.Element |
|---|
toString |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
private static final long serialVersionUID
| Constructor Detail |
|---|
public Chapter(int number)
Chapter.
number - the Chapter number
public Chapter(Paragraph title,
int number)
Chapter.
title - the Chapter title (as a Paragraph)number - the Chapter number
public Chapter(String title,
int number)
Chapter.
title - the Chapter title (as a String)number - the Chapter number
public Chapter(Properties attributes,
int number)
ElementFactory.getChapter(Properties) instead,
scheduled for removal at 2.1.0
Chapter following a set of attributes.
attributes - the attributesnumber - a userdefined Chapter number| Method Detail |
|---|
public int type()
type in interface Elementtype in class Section
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||