Home » iText-2.1.7 » com.lowagie » text » [javadoc | source]
public class: Chapter [javadoc | source]

All Implemented Interfaces:
    TextElementArray, LargeElement, List, Serializable, RandomAccess, Cloneable, Collection

Direct Known Subclasses:

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.


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");
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.");
Fields inherited from com.lowagie.text.Section:
NUMBERSTYLE_DOTTED,  NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT,  title,  bookmarkTitle,  numberDepth,  numberStyle,  indentationLeft,  indentationRight,  indentation,  bookmarkOpen,  triggerNewPage,  subsections,  numbers,  complete,  addedCompletely,  notAddedYet
Fields inherited from java.util.AbstractList:
 public Chapter(int number) 
 public Chapter(Paragraph title,
    int number) 
    Constructs a new Chapter.
    title - the Chapter title (as a Paragraph)
    number - the Chapter number
 public Chapter(String title,
    int number) 
    Constructs a new Chapter.
    title - the Chapter title (as a String)
    number - the Chapter number
Method from com.lowagie.text.Chapter Summary:
isNestable,   type
Methods from com.lowagie.text.Section:
add,   add,   addAll,   addMarkedSection,   addSection,   addSection,   addSection,   addSection,   addSection,   addSection,   addSection,   addSection,   constructTitle,   flushContent,   getBookmarkTitle,   getChunks,   getDepth,   getIndentation,   getIndentationLeft,   getIndentationRight,   getNumberDepth,   getNumberStyle,   getTitle,   isAddedCompletely,   isBookmarkOpen,   isChapter,   isComplete,   isContent,   isNestable,   isNotAddedYet,   isSection,   isTriggerNewPage,   newPage,   process,   setAddedCompletely,   setBookmarkOpen,   setBookmarkTitle,   setChapterNumber,   setComplete,   setIndentation,   setIndentationLeft,   setIndentationRight,   setNotAddedYet,   setNumberDepth,   setNumberStyle,   setTitle,   setTriggerNewPage,   type
Methods from java.util.ArrayList:
add,   add,   addAll,   addAll,   clear,   clone,   contains,   ensureCapacity,   get,   indexOf,   isEmpty,   lastIndexOf,   remove,   remove,   removeRange,   set,   size,   toArray,   toArray,   trimToSize
Methods from java.util.AbstractList:
add,   add,   addAll,   clear,   equals,   get,   hashCode,   indexOf,   iterator,   lastIndexOf,   listIterator,   listIterator,   remove,   removeRange,   set,   subList
Methods from java.util.AbstractCollection:
add,   addAll,   clear,   contains,   containsAll,   isEmpty,   iterator,   remove,   removeAll,   retainAll,   size,   toArray,   toArray,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.Chapter Detail:
 public boolean isNestable() 
 public int type() 
    Gets the type of the text element.