Class DOCXSectPr

  • All Implemented Interfaces:
    ICTElement

    public class DOCXSectPr
    extends java.lang.Object
    implements ICTElement
    Internal Use Only.

    Section Properties Definition.

    Represents w:sectPr in xml.

    Author:
    Jamson Chan
    • Constructor Summary

      Constructors 
      Constructor Description
      DOCXSectPr​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
      Create a new SectPr by given CTSectPr.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBodyElements​(java.util.List<AbstractBodyElement> elements)
      Adds the body elements to this section.
      java.util.List<AbstractBodyElement> getBodyElements()
      Returns the body elements.
      org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr getCT()
      Returns the CT object of current element.
      java.lang.String getDefaultFooterId()
      Returns the footer id of default page.
      java.lang.String getDefaultHeaderId()
      Returns the header id of default page.
      java.lang.String getEvenFooterId()
      Returns the footer id of even page.
      java.lang.String getEvenHeaderId()
      Returns the header id of even page.
      java.lang.String getFirstFooterId()
      Returns the footer id of first page.
      java.lang.String getFirstHeaderId()
      Returns the header id of first page.
      java.lang.Double getFooterFromBottom()
      Returns the distance of footer from bottom edge.
      java.lang.Double getGutter()
      Returns the gutter margin.
      java.lang.Double getHeaderFromTop()
      Returns the distance of header from top edge.
      java.lang.Double getMarginBottom()
      Returns the page bottom margin.
      java.lang.Double getMarginLeft()
      Returns the page left margin.
      java.lang.Double getMarginRight()
      Returns the page right margin.
      java.lang.Double getMarginTop()
      Returns the page top margin.
      java.lang.Double getPageHeight()
      Returns the page height.
      java.lang.Double getPageWidth()
      Returns the page width.
      org.openxmlformats.schemas.wordprocessingml.x2006.main.STSectionMark.Enum getType()
      Returns the type of section start.
      boolean isTitlePg()
      Returns whether to use different first header and footer.
      void setFooterFromBottom​(java.lang.Double footerFromBottom)
      Sets the distance of footer from bottom edge.
      void setGutter​(java.lang.Double gutter)
      Sets the gutter margin.
      void setHeaderFromTop​(java.lang.Double headerFromTop)
      Sets the distance of header from top edge.
      void setMarginBottom​(java.lang.Double bottom)
      Sets the page bottom margin.
      void setMarginLeft​(java.lang.Double left)
      Sets the page left margin.
      void setMarginRight​(java.lang.Double right)
      Sets the page right margin.
      void setMarginTop​(java.lang.Double top)
      Sets the page top margin.
      void setPageHeight​(java.lang.Double height)
      Sets the page height.
      void setPageWidth​(java.lang.Double width)
      Sets the page width.
      void setTitlePg​(boolean titlePg)
      Sets whether to use different first header and footer.
      void setType​(org.openxmlformats.schemas.wordprocessingml.x2006.main.STSectionMark.Enum type)
      Sets the type of section start.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DOCXSectPr

        public DOCXSectPr​(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
        Create a new SectPr by given CTSectPr.
        Parameters:
        sectPr - the CTSectPr object.
    • Method Detail

      • getCT

        public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr getCT()
        Description copied from interface: ICTElement
        Returns the CT object of current element.
        Specified by:
        getCT in interface ICTElement
      • addBodyElements

        public void addBodyElements​(java.util.List<AbstractBodyElement> elements)
        Adds the body elements to this section.
        Parameters:
        elements -
      • getBodyElements

        public java.util.List<AbstractBodyElement> getBodyElements()
        Returns the body elements.
        Returns:
        the body elements.
      • getPageWidth

        public java.lang.Double getPageWidth()
        Returns the page width.
        Returns:
        the page width.
      • setPageWidth

        public void setPageWidth​(java.lang.Double width)
        Sets the page width.
        Parameters:
        width - the page width.
      • getPageHeight

        public java.lang.Double getPageHeight()
        Returns the page height.
        Returns:
        the page height.
      • setPageHeight

        public void setPageHeight​(java.lang.Double height)
        Sets the page height.
        Parameters:
        height - the page height.
      • getMarginTop

        public java.lang.Double getMarginTop()
        Returns the page top margin.
        Returns:
        the page top margin.
      • setMarginTop

        public void setMarginTop​(java.lang.Double top)
        Sets the page top margin.
        Parameters:
        top - the page top margin.
      • getMarginLeft

        public java.lang.Double getMarginLeft()
        Returns the page left margin.
        Returns:
        the page left margin.
      • setMarginLeft

        public void setMarginLeft​(java.lang.Double left)
        Sets the page left margin.
        Parameters:
        left - the page left margin.
      • getMarginBottom

        public java.lang.Double getMarginBottom()
        Returns the page bottom margin.
        Returns:
        the page bottom margin.
      • setMarginBottom

        public void setMarginBottom​(java.lang.Double bottom)
        Sets the page bottom margin.
        Parameters:
        bottom - the page bottom margin.
      • getMarginRight

        public java.lang.Double getMarginRight()
        Returns the page right margin.
        Returns:
        the page right margin.
      • setMarginRight

        public void setMarginRight​(java.lang.Double right)
        Sets the page right margin.
        Parameters:
        right - the page right margin.
      • getHeaderFromTop

        public java.lang.Double getHeaderFromTop()
        Returns the distance of header from top edge.
        Returns:
        the distance of header from top edge.
      • setHeaderFromTop

        public void setHeaderFromTop​(java.lang.Double headerFromTop)
        Sets the distance of header from top edge.
        Parameters:
        headerFromTop - the distance of header from top edge.
      • getFooterFromBottom

        public java.lang.Double getFooterFromBottom()
        Returns the distance of footer from bottom edge.
        Returns:
        the distance of footer from bottom edge.
      • setFooterFromBottom

        public void setFooterFromBottom​(java.lang.Double footerFromBottom)
        Sets the distance of footer from bottom edge.
        Parameters:
        footerFromBottom - the distance of footer from bottom edge.
      • getGutter

        public java.lang.Double getGutter()
        Returns the gutter margin.
        Returns:
        the gutter margin.
      • setGutter

        public void setGutter​(java.lang.Double gutter)
        Sets the gutter margin.
        Parameters:
        gutter - the gutter margin.
      • isTitlePg

        public boolean isTitlePg()
        Returns whether to use different first header and footer.
        Returns:
        whether to use different first header and footer.
      • setTitlePg

        public void setTitlePg​(boolean titlePg)
        Sets whether to use different first header and footer.
        Parameters:
        titlePg - whether to use different first header and footer.
      • getType

        public org.openxmlformats.schemas.wordprocessingml.x2006.main.STSectionMark.Enum getType()
        Returns the type of section start.
        Returns:
        the type of section start.
      • setType

        public void setType​(org.openxmlformats.schemas.wordprocessingml.x2006.main.STSectionMark.Enum type)
        Sets the type of section start.
        Parameters:
        type - the type of section start.
      • getFirstHeaderId

        public java.lang.String getFirstHeaderId()
        Returns the header id of first page.
        Returns:
        the header id of first page.
      • getDefaultHeaderId

        public java.lang.String getDefaultHeaderId()
        Returns the header id of default page.
        Returns:
        the header id of default page.
      • getEvenHeaderId

        public java.lang.String getEvenHeaderId()
        Returns the header id of even page.
        Returns:
        the header id of even page.
      • getFirstFooterId

        public java.lang.String getFirstFooterId()
        Returns the footer id of first page.
        Returns:
        the footer id of first page.
      • getDefaultFooterId

        public java.lang.String getDefaultFooterId()
        Returns the footer id of default page.
        Returns:
        the footer id of default page.
      • getEvenFooterId

        public java.lang.String getEvenFooterId()
        Returns the footer id of even page.
        Returns:
        the footer id of even page.