Class Section

java.lang.Object
com.independentsoft.office.odf.Section
All Implemented Interfaces:
ICellContent, IContentElement, IIndexContent, ITextContent, IHeaderFooterContent

public class Section extends Object implements ITextContent, IHeaderFooterContent
Represents a named region of content in a document.
  • Constructor Details

  • Method Details

    • add

      public void add(Change change)
      Adds a Change object to the content.
      Parameters:
      change - the change
    • add

      public void add(ChangeEnd changeEnd)
      Adds a ChangeEnd object to the content.
      Parameters:
      changeEnd - the change end
    • add

      public void add(ChangeStart changeStart)
      Adds a ChangeStart object to the content.
      Parameters:
      changeStart - the change start
    • add

      public void add(Shape shape)
      Adds a Shape object to the content.
      Parameters:
      shape - the shape
    • add

      public void add(IndexOfIllustrations index)
      Adds an IndexOfIllustrations object to the content.
      Parameters:
      index - the index
    • add

      public void add(Heading heading)
      Adds a Heading object to the content.
      Parameters:
      heading - the heading
    • add

      public void add(List list)
      Adds a List object to the content.
      Parameters:
      list - the list
    • add

      public void add(Paragraph paragraph)
      Adds a Paragraph object to the content.
      Parameters:
      paragraph - the paragraph
    • add

      public void add(Section section)
      Adds a Section object to the content.
      Parameters:
      section - the section
    • add

      public void add(Table table)
      Adds a Table object to the content.
      Parameters:
      table - the table
    • add

      public void add(TableOfContents toc)
      Adds a TableOfContents object to the content.
      Parameters:
      toc - the toc
    • add

      public void add(ITextContent textContent)
      Adds an ITextContent object to the content.
      Parameters:
      textContent - the text content
    • getContentElements

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

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

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

      public Section clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface ICellContent
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IHeaderFooterContent
      Specified by:
      clone in interface IIndexContent
      Specified by:
      clone in interface ITextContent
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

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

      public List<ITextContent> getContent()
      Contains a collection of ITextContent objects.
      Returns:
      the content
    • getName

      public String getName()
      Gets the unique name.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the unique name.
      Parameters:
      name - the new name
    • getProtectionKey

      public String getProtectionKey()
      Specifies that an authorization is required for removing the protection of the section.
      Returns:
      the protection key
    • setProtectionKey

      public void setProtectionKey(String protectionKey)
      Specifies that an authorization is required for removing the protection of the section.
      Parameters:
      protectionKey - the new protection key
    • isProtected

      public boolean isProtected()
      Specifies whether a section is protected.
      Returns:
      true, if is protected
    • setProtected

      public void setProtected(boolean isProtected)
      Specifies whether a section is protected.
      Parameters:
      isProtected - the new protected
    • getStyle

      public String getStyle()
      Gets the section family style for a section.
      Returns:
      the style
    • setStyle

      public void setStyle(String style)
      Sets the section family style.
      Parameters:
      style - the new style
    • getDisplay

      public SectionDisplayType getDisplay()
      Specifies whether the section is hidden.
      Returns:
      the display
    • setDisplay

      public void setDisplay(SectionDisplayType display)
      Specifies whether the section is hidden.
      Parameters:
      display - the new display
    • getCondition

      public String getCondition()
      Gets the condition under which a section is hidden. The condition is encoded as a string.
      Returns:
      the condition
    • setCondition

      public void setCondition(String condition)
      Sets the condition under which a section is hidden. The condition is encoded as a string.
      Parameters:
      condition - the new condition