Class Chapter

java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.Chapter
All Implemented Interfaces:
IContentElement, IParagraphContent

public class Chapter extends Field
Represents a field that displays one of the following: - The name of the current chapter. - The number of the current chapter. - Both the name and number of the current chapter. If this element is placed inside a header or footer, it displays the current chapter name or number on every page.
  • Constructor Details

  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Specified by:
      getContentElements in class Field
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Overrides:
      getParent in class Field
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Overrides:
      setParent in class Field
      Parameters:
      parent - the new parent
    • clone

      public Chapter clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IParagraphContent
      Specified by:
      clone in class Field
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Chapter object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getDisplayType

      public ChapterDisplayType getDisplayType()
      Gets the information that a chapter field should display.
      Returns:
      the display type
    • setDisplayType

      public void setDisplayType(ChapterDisplayType displayType)
      Sets the information that a chapter field should display.
      Parameters:
      displayType - the new display type
    • getOutlineLevel

      public int getOutlineLevel()
      Gets the outline level.
      Returns:
      the outline level
    • setOutlineLevel

      public void setOutlineLevel(int outlineLevel)
      Sets the outline level.
      Parameters:
      outlineLevel - the new outline level
    • getValue

      public String getValue()
      Gets the chapter.
      Returns:
      the value
    • setValue

      public void setValue(String value)
      Sets the chapter.
      Parameters:
      value - the new value