Class ChapterAutoNumber

All Implemented Interfaces:
Element, LargeElement, TextElementArray, Serializable, Cloneable, Iterable<Element>, Collection<Element>, List<Element>, RandomAccess, SequencedCollection<Element>

public class ChapterAutoNumber extends Chapter
Chapter with auto numbering.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • numberSet

      protected boolean numberSet
      Is the chapter number already set?
      Since:
      2.1.4
  • Constructor Details

    • 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)
  • Method Details

    • 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:
      updated chapter number
      Since:
      2.1.4