com.itextpdf.text
Class ChapterAutoNumber
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Element>
com.itextpdf.text.Section
com.itextpdf.text.Chapter
com.itextpdf.text.ChapterAutoNumber
- All Implemented Interfaces:
- Indentable, Element, LargeElement, TextElementArray, Serializable, Cloneable, Iterable<Element>, Collection<Element>, List<Element>, RandomAccess
public class ChapterAutoNumber
- extends Chapter
Chapter with auto numbering.
- Author:
- Michael Niedermair
- See Also:
- Serialized Form
Field Summary |
protected boolean |
numberSet
Is the chapter number already set? |
Fields inherited from class com.itextpdf.text.Section |
addedCompletely, bookmarkOpen, bookmarkTitle, complete, indentation, indentationLeft, indentationRight, notAddedYet, numberDepth, numbers, numberStyle, NUMBERSTYLE_DOTTED, NUMBERSTYLE_DOTTED_WITHOUT_FINAL_DOT, subsections, title, triggerNewPage |
Fields inherited from interface com.itextpdf.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, CHAPTER, CHUNK, CREATIONDATE, CREATOR, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LIST, LISTITEM, MARKED, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, YMARK |
Methods inherited from class com.itextpdf.text.Section |
add, add, addAll, addMarkedSection, addSection, addSection, addSection, addSection, addSection, addSection, constructTitle, flushContent, getBookmarkTitle, getChunks, getDepth, getIndentation, getIndentationLeft, getIndentationRight, getNumberDepth, getNumberStyle, getTitle, isAddedCompletely, isBookmarkOpen, isChapter, isComplete, isContent, isNotAddedYet, isSection, isTriggerNewPage, newPage, process, setAddedCompletely, setBookmarkOpen, setBookmarkTitle, setChapterNumber, setComplete, setIndentation, setIndentationLeft, setIndentationRight, setNotAddedYet, setNumberDepth, setNumberStyle, setTitle, setTriggerNewPage |
Methods inherited from class java.util.ArrayList |
addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
numberSet
protected boolean numberSet
- Is the chapter number already set?
- Since:
- 2.1.4
ChapterAutoNumber
public ChapterAutoNumber(Paragraph para)
- Create a new object.
- Parameters:
para
- the Chapter title (as a Paragraph
)
ChapterAutoNumber
public ChapterAutoNumber(String title)
- Create a new object.
- Parameters:
title
- the Chapter title (as a String
)
addSection
public Section addSection(String title)
- Create a new section for this chapter and ad it.
- Overrides:
addSection
in class Section
- Parameters:
title
- the Section title (as a String
)
- Returns:
- Returns the new section.
addSection
public Section addSection(Paragraph title)
- Create a new section for this chapter and add it.
- Overrides:
addSection
in class Section
- Parameters:
title
- the Section title (as a Paragraph
)
- Returns:
- Returns the new section.
setAutomaticNumber
public int setAutomaticNumber(int number)
- Changes the Chapter number.
- Parameters:
number
- the new chapter number
- Returns:
- possibly increased number if the chapternumber was already set.
- Since:
- 2.1.4
Copyright © 2011. All Rights Reserved.