org.apache.poi.hwpf.usermodel
Class Section

java.lang.Object
  extended by org.apache.poi.hwpf.usermodel.Range
      extended by org.apache.poi.hwpf.usermodel.Section

public final class Section
extends Range


Field Summary
 
Fields inherited from class org.apache.poi.hwpf.usermodel.Range
_characters, _charEnd, _charRangeFound, _charStart, _doc, _end, _paragraphs, _parEnd, _parRangeFound, _parStart, _sectionEnd, _sections, _sectionStart, _start, _text, TYPE_CHARACTER, TYPE_LISTENTRY, TYPE_PARAGRAPH, TYPE_SECTION, TYPE_TABLE, TYPE_TEXT, TYPE_UNDEFINED
 
Constructor Summary
Section(SEPX sepx, Range parent)
           
 
Method Summary
 java.lang.Object clone()
           
 int getDistanceBetweenColumns()
           
 int getEndnoteNumberingFormat()
          Get the numbering format of embedded endnotes
 int getEndnoteNumberingOffset()
           
 short getEndnoteRestartQualifier()
          Get the endnote restart qualifier 0x00If the numbering is continuous throughout the entire document 0x01If the numbering restarts at the beginning of this section 0x02If the numbering restarts on every page
 int getFootnoteNumberingFormat()
          Get the numbering format of embedded footnotes
 int getFootnoteNumberingOffset()
           
 short getFootnoteRestartQualifier()
          Get the footnote restart qualifier 0x00If the numbering is continuous throughout the entire document 0x01If the numbering restarts at the beginning of this section 0x02If the numbering restarts on every page
 int getMarginBottom()
           
 int getMarginLeft()
           
 int getMarginRight()
           
 int getMarginTop()
           
 int getNumColumns()
           
 int getPageHeight()
           
 int getPageWidth()
           
 boolean isColumnsEvenlySpaced()
           
 void setMarginBottom(int marginWidth)
          Set the height of the bottom margin in twips.
 void setMarginLeft(int marginWidth)
          Set the width of the left hand margin in twips.
 void setMarginRight(int marginWidth)
          Set the width of the right hand margin in twips.
 void setMarginTop(int marginWidth)
          Set the height of the top margin in twips.
 java.lang.String toString()
           
 int type()
           
 
Methods inherited from class org.apache.poi.hwpf.usermodel.Range
adjustFIB, delete, getCharacterRun, getDocument, getEndOffset, getParagraph, getSection, getStartOffset, getTable, initAll, insertAfter, insertAfter, insertAfter, insertBefore, insertTableBefore, numCharacterRuns, numParagraphs, numSections, replaceText, replaceText, replaceText, reset, sanityCheck, stripFields, text
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Section

public Section(SEPX sepx,
               Range parent)
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

getDistanceBetweenColumns

public int getDistanceBetweenColumns()
Returns:
distance to be maintained between columns, in twips. Used when isColumnsEvenlySpaced() == true

getMarginBottom

public int getMarginBottom()

getMarginLeft

public int getMarginLeft()

getMarginRight

public int getMarginRight()

getMarginTop

public int getMarginTop()

getNumColumns

public int getNumColumns()

getPageHeight

public int getPageHeight()
Returns:
page height (in twips) in current section. Default value is 15840 twips

getPageWidth

public int getPageWidth()
Returns:
page width (in twips) in current section. Default value is 12240 twips

setMarginBottom

public void setMarginBottom(int marginWidth)
Set the height of the bottom margin in twips. In the AbstractWordUtils class, a constant is defined that indicates how many twips there are per inch and it can be used in setting the margins width a little like this; section.setMarginBottom( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH );

Parameters:
marginWidth - A primitive int whose value will indciate how high the margin should be - in twips.

setMarginLeft

public void setMarginLeft(int marginWidth)
Set the width of the left hand margin in twips. In the AbstractWordUtils class, a constant is defined that indicates how many twips there are per inch and it can be used in setting the margins width a little like this; section.setMarginLeft( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH );

Parameters:
marginWidth - A primitive int whose value will indciate how high the margin should be - in twips.

setMarginRight

public void setMarginRight(int marginWidth)
Set the width of the right hand margin in twips. In the AbstractWordUtils class, a constant is defined that indicates how many twips there are per inch and it can be used in setting the margins width a little like this; section.setMarginRight( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH );

Parameters:
marginWidth - A primitive int whose value will indciate how high the margin should be - in twips.

setMarginTop

public void setMarginTop(int marginWidth)
Set the height of the top margin in twips. In the AbstractWordUtils class, a constant is defined that indicates how many twips there are per inch and it can be used in setting the margins width a little like this; section.setMarginTop( (int) 1.5 * AbstractWordUtils.TWIPS_PER_INCH );

Parameters:
marginWidth - A primitive int whose value will indciate how high the margin should be - in twips.

isColumnsEvenlySpaced

public boolean isColumnsEvenlySpaced()

getFootnoteRestartQualifier

public short getFootnoteRestartQualifier()
Get the footnote restart qualifier
0x00
If the numbering is continuous throughout the entire document
0x01
If the numbering restarts at the beginning of this section
0x02
If the numbering restarts on every page

Returns:
an Rnc, as decribed above, specifying when and where footnote numbering restarts

getFootnoteNumberingOffset

public int getFootnoteNumberingOffset()
Returns:
an offset to be added to footnote numbers

getFootnoteNumberingFormat

public int getFootnoteNumberingFormat()
Get the numbering format of embedded footnotes

The full list of possible return values is given in [MS-OSHARED], v20140428, 2.2.1.3

Returns:
an Nfc specifying the numbering format for footnotes

getEndnoteRestartQualifier

public short getEndnoteRestartQualifier()
Get the endnote restart qualifier
0x00
If the numbering is continuous throughout the entire document
0x01
If the numbering restarts at the beginning of this section
0x02
If the numbering restarts on every page

Returns:
an Rnc, as decribed above, specifying when and where endnote numbering restarts

getEndnoteNumberingOffset

public int getEndnoteNumberingOffset()
Returns:
an offset to be added to endnote numbers

getEndnoteNumberingFormat

public int getEndnoteNumberingFormat()
Get the numbering format of embedded endnotes

The full list of possible return values is given in [MS-OSHARED], v20140428, 2.2.1.3

Returns:
an Nfc specifying the numbering format for endnotes

toString

public java.lang.String toString()
Overrides:
toString in class Range

type

public int type()


Copyright 2017 The Apache Software Foundation or its licensors, as applicable.