Package 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
,IAccessibleElement
,TextElementArray
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<Element>
,java.util.Collection<Element>
,java.util.List<Element>
,java.util.RandomAccess
public class ChapterAutoNumber extends Chapter
Chapter with auto numbering.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
numberSet
Is the chapter number already set?private static long
serialVersionUID
-
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, BODY, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, DIV, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LANGUAGE, LIST, LISTITEM, MARKED, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, YMARK
-
-
Constructor Summary
Constructors Constructor Description ChapterAutoNumber(Paragraph para)
Create a new object.ChapterAutoNumber(java.lang.String title)
Create a new object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Section
addSection(Paragraph title)
Create a new section for this chapter and add it.Section
addSection(java.lang.String title)
Create a new section for this chapter and ad it.int
setAutomaticNumber(int number)
Changes the Chapter number.-
Methods inherited from class com.itextpdf.text.Chapter
isNestable, type
-
Methods inherited from class com.itextpdf.text.Section
add, add, addAll, addMarkedSection, addSection, addSection, addSection, addSection, addSection, addSection, constructTitle, flushContent, getAccessibleAttribute, getAccessibleAttributes, getBookmarkTitle, getChunks, getDepth, getId, getIndentation, getIndentationLeft, getIndentationRight, getNumberDepth, getNumberStyle, getRole, getTitle, isAddedCompletely, isBookmarkOpen, isChapter, isComplete, isContent, isInline, isNotAddedYet, isSection, isTriggerNewPage, newPage, process, setAccessibleAttribute, setAddedCompletely, setBookmarkOpen, setBookmarkTitle, setChapterNumber, setComplete, setId, setIndentation, setIndentationLeft, setIndentationRight, setNotAddedYet, setNumberDepth, setNumberStyle, setRole, setTitle, setTriggerNewPage
-
Methods inherited from class java.util.ArrayList
addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
numberSet
protected boolean numberSet
Is the chapter number already set?- Since:
- 2.1.4
-
-
Constructor Detail
-
ChapterAutoNumber
public ChapterAutoNumber(Paragraph para)
Create a new object.- Parameters:
para
- the Chapter title (as aParagraph
)
-
ChapterAutoNumber
public ChapterAutoNumber(java.lang.String title)
Create a new object.- Parameters:
title
- the Chapter title (as aString
)
-
-
Method Detail
-
addSection
public Section addSection(java.lang.String title)
Create a new section for this chapter and ad it.- Overrides:
addSection
in classSection
- Parameters:
title
- the Section title (as aString
)- Returns:
- Returns the new section.
-
addSection
public Section addSection(Paragraph title)
Create a new section for this chapter and add it.- Overrides:
addSection
in classSection
- Parameters:
title
- the Section title (as aParagraph
)- 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
-
-