Class ChapterAutoNumber

  • All Implemented Interfaces:
    Element, LargeElement, TextElementArray, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

    public class ChapterAutoNumber
    extends Chapter
    Chapter with auto numbering.
    See Also:
    Serialized Form
    • Field Detail

      • numberSet

        private boolean numberSet
        Is the chapter number already set?
        Since:
        2.1.4
    • Constructor Detail

      • ChapterAutoNumber

        public ChapterAutoNumber​(java.lang.String title)
        Create a new object.
        Parameters:
        title - the Chapter title (as a String)
    • Method Detail

      • addSection

        public Section addSection​(java.lang.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

        int setAutomaticNumber​(int number)
        Changes the Chapter number.
        Parameters:
        number - the new chapter number
        Returns:
        Number
        Since:
        2.1.4