Package org.apache.poi.hwpf.usermodel
Class Paragraph
- java.lang.Object
-
- org.apache.poi.hwpf.usermodel.Range
-
- org.apache.poi.hwpf.usermodel.Paragraph
-
-
Field Summary
Fields Modifier and Type Field Description static shortSPRM_ANLDstatic shortSPRM_AUTOSPACEDEstatic shortSPRM_AUTOSPACEDNstatic shortSPRM_BRCBARstatic shortSPRM_BRCBOTTOMstatic shortSPRM_BRCLstatic shortSPRM_BRCLEFTstatic shortSPRM_BRCPstatic shortSPRM_BRCRIGHTstatic shortSPRM_BRCTOPstatic shortSPRM_CHGTABSstatic shortSPRM_CHGTABSPAPXstatic shortSPRM_CRLFstatic shortSPRM_DCSstatic shortSPRM_DXAABSstatic shortSPRM_DXAFROMTEXTstatic shortSPRM_DXALEFTstatic shortSPRM_DXALEFT1static shortSPRM_DXARIGHTstatic shortSPRM_DXAWIDTHstatic shortSPRM_DYAABSstatic shortSPRM_DYAAFTERstatic shortSPRM_DYABEFOREstatic shortSPRM_DYAFROMTEXTstatic shortSPRM_DYALINEstatic shortSPRM_FADJUSTRIGHTstatic shortSPRM_FBIDIstatic shortSPRM_FINTABLEstatic shortSPRM_FKEEPstatic shortSPRM_FKEEPFOLLOWstatic shortSPRM_FKINSOKUstatic shortSPRM_FLOCKEDstatic shortSPRM_FNOAUTOHYPHstatic shortSPRM_FNOLINENUMBstatic shortSPRM_FNUMRMLNSstatic shortSPRM_FOVERFLOWPUNCTstatic shortSPRM_FPAGEBREAKBEFOREstatic shortSPRM_FRAMETEXTFLOWstatic shortSPRM_FSIDEBYSIDEstatic shortSPRM_FTOPLINEPUNCTstatic shortSPRM_FTTPstatic shortSPRM_FWIDOWCONTROLstatic shortSPRM_FWORDWRAPstatic shortSPRM_ILFOstatic shortSPRM_ILVLstatic shortSPRM_JCstatic shortSPRM_NUMRMstatic shortSPRM_OUTLVLstatic shortSPRM_PCstatic shortSPRM_PROPRMARKstatic shortSPRM_RULERstatic shortSPRM_SHDstatic shortSPRM_SHD80static shortSPRM_USEPGSUSETTINGSstatic shortSPRM_WALIGNFONTstatic shortSPRM_WHEIGHTABSstatic shortSPRM_WR-
Fields inherited from class org.apache.poi.hwpf.usermodel.Range
TYPE_CHARACTER, TYPE_LISTENTRY, TYPE_PARAGRAPH, TYPE_SECTION, TYPE_TABLE, TYPE_TEXT, TYPE_UNDEFINED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ParagraphPropertiescloneProperties()Clone the ParagraphProperties object associated with this Paragraph, so that you can apply the same properties to another Paragraph.Paragraphcopy()BorderCodegetBarBorder()BorderCodegetBottomBorder()DropCapSpecifiergetDropCap()intgetFirstLineIndent()intgetFontAlignment()intgetIlfo()Returns the ilfo, an index to the document's hpllfo, which describes the automatic number formatting of the paragraph.intgetIlvl()Returns the multi-level indent for the paragraph.intgetIndentFromLeft()intgetIndentFromRight()intgetJustification()BorderCodegetLeftBorder()LineSpacingDescriptorgetLineSpacing()HWPFListgetList()intgetLvl()Returns the heading level (1-8), or 9 if the paragraph isn't in a heading style.ParagraphPropertiesgetProps()BorderCodegetRightBorder()ShadingDescriptorgetShading()intgetSpacingAfter()intgetSpacingBefore()shortgetStyleIndex()Returns the index of the style which applies to this Paragraph.intgetTableLevel()intgetTabStopsNumber()Returns number of tabs stops defined for paragraph.int[]getTabStopsPositions()Returns array of positions of itbdMac tab stopsBorderCodegetTopBorder()booleanisAutoHyphenated()booleanisBackward()booleanisEmbeddedCellMark()booleanisInList()booleanisInTable()booleanisKinsoku()booleanisLineNotNumbered()booleanisSideBySide()booleanisTableRowEnd()booleanisVertical()booleanisWidowControlled()booleanisWordWrapped()booleankeepOnPage()booleankeepWithNext()static ParagraphnewParagraph(Range parent, PAPX papx)booleanpageBreakBefore()voidsetAutoHyphenated(boolean autoHyph)voidsetBackward(boolean bward)voidsetBarBorder(BorderCode bar)voidsetBottomBorder(BorderCode bottom)voidsetDropCap(DropCapSpecifier dcs)voidsetFirstLineIndent(int first)voidsetFontAlignment(int align)voidsetIndentFromLeft(int dxaLeft)voidsetIndentFromRight(int dxaRight)voidsetJustification(byte jc)voidsetKeepOnPage(boolean fKeep)voidsetKeepWithNext(boolean fKeepFollow)voidsetKinsoku(boolean kinsoku)voidsetLeftBorder(BorderCode left)voidsetLineNotNumbered(boolean fNoLnn)voidsetLineSpacing(LineSpacingDescriptor lspd)voidsetPageBreakBefore(boolean fPageBreak)voidsetRightBorder(BorderCode right)voidsetShading(ShadingDescriptor shd)voidsetSideBySide(boolean fSideBySide)voidsetSpacingAfter(int after)voidsetSpacingBefore(int before)voidsetTopBorder(BorderCode top)voidsetVertical(boolean vertical)voidsetWidowControl(boolean widowControl)voidsetWordWrapped(boolean wrap)java.lang.StringtoString()-
Methods inherited from class org.apache.poi.hwpf.usermodel.Range
delete, getCharacterRun, getEndOffset, getParagraph, getSection, getStartOffset, getTable, insertAfter, insertBefore, insertTableBefore, numCharacterRuns, numParagraphs, numSections, replaceText, replaceText, replaceText, sanityCheck, stripFields, text
-
-
-
-
Field Detail
-
SPRM_JC
public static final short SPRM_JC
- See Also:
- Constant Field Values
-
SPRM_FSIDEBYSIDE
public static final short SPRM_FSIDEBYSIDE
- See Also:
- Constant Field Values
-
SPRM_FKEEP
public static final short SPRM_FKEEP
- See Also:
- Constant Field Values
-
SPRM_FKEEPFOLLOW
public static final short SPRM_FKEEPFOLLOW
- See Also:
- Constant Field Values
-
SPRM_FPAGEBREAKBEFORE
public static final short SPRM_FPAGEBREAKBEFORE
- See Also:
- Constant Field Values
-
SPRM_BRCL
public static final short SPRM_BRCL
- See Also:
- Constant Field Values
-
SPRM_BRCP
public static final short SPRM_BRCP
- See Also:
- Constant Field Values
-
SPRM_ILVL
public static final short SPRM_ILVL
- See Also:
- Constant Field Values
-
SPRM_ILFO
public static final short SPRM_ILFO
- See Also:
- Constant Field Values
-
SPRM_FNOLINENUMB
public static final short SPRM_FNOLINENUMB
- See Also:
- Constant Field Values
-
SPRM_CHGTABSPAPX
public static final short SPRM_CHGTABSPAPX
- See Also:
- Constant Field Values
-
SPRM_DXARIGHT
public static final short SPRM_DXARIGHT
- See Also:
- Constant Field Values
-
SPRM_DXALEFT
public static final short SPRM_DXALEFT
- See Also:
- Constant Field Values
-
SPRM_DXALEFT1
public static final short SPRM_DXALEFT1
- See Also:
- Constant Field Values
-
SPRM_DYALINE
public static final short SPRM_DYALINE
- See Also:
- Constant Field Values
-
SPRM_DYABEFORE
public static final short SPRM_DYABEFORE
- See Also:
- Constant Field Values
-
SPRM_DYAAFTER
public static final short SPRM_DYAAFTER
- See Also:
- Constant Field Values
-
SPRM_CHGTABS
public static final short SPRM_CHGTABS
- See Also:
- Constant Field Values
-
SPRM_FINTABLE
public static final short SPRM_FINTABLE
- See Also:
- Constant Field Values
-
SPRM_FTTP
public static final short SPRM_FTTP
- See Also:
- Constant Field Values
-
SPRM_DXAABS
public static final short SPRM_DXAABS
- See Also:
- Constant Field Values
-
SPRM_DYAABS
public static final short SPRM_DYAABS
- See Also:
- Constant Field Values
-
SPRM_DXAWIDTH
public static final short SPRM_DXAWIDTH
- See Also:
- Constant Field Values
-
SPRM_PC
public static final short SPRM_PC
- See Also:
- Constant Field Values
-
SPRM_WR
public static final short SPRM_WR
- See Also:
- Constant Field Values
-
SPRM_BRCTOP
public static final short SPRM_BRCTOP
- See Also:
- Constant Field Values
-
SPRM_BRCLEFT
public static final short SPRM_BRCLEFT
- See Also:
- Constant Field Values
-
SPRM_BRCBOTTOM
public static final short SPRM_BRCBOTTOM
- See Also:
- Constant Field Values
-
SPRM_BRCRIGHT
public static final short SPRM_BRCRIGHT
- See Also:
- Constant Field Values
-
SPRM_BRCBAR
public static final short SPRM_BRCBAR
- See Also:
- Constant Field Values
-
SPRM_FNOAUTOHYPH
public static final short SPRM_FNOAUTOHYPH
- See Also:
- Constant Field Values
-
SPRM_WHEIGHTABS
public static final short SPRM_WHEIGHTABS
- See Also:
- Constant Field Values
-
SPRM_DCS
public static final short SPRM_DCS
- See Also:
- Constant Field Values
-
SPRM_SHD80
public static final short SPRM_SHD80
- See Also:
- Constant Field Values
-
SPRM_SHD
public static final short SPRM_SHD
- See Also:
- Constant Field Values
-
SPRM_DYAFROMTEXT
public static final short SPRM_DYAFROMTEXT
- See Also:
- Constant Field Values
-
SPRM_DXAFROMTEXT
public static final short SPRM_DXAFROMTEXT
- See Also:
- Constant Field Values
-
SPRM_FLOCKED
public static final short SPRM_FLOCKED
- See Also:
- Constant Field Values
-
SPRM_FWIDOWCONTROL
public static final short SPRM_FWIDOWCONTROL
- See Also:
- Constant Field Values
-
SPRM_RULER
public static final short SPRM_RULER
- See Also:
- Constant Field Values
-
SPRM_FKINSOKU
public static final short SPRM_FKINSOKU
- See Also:
- Constant Field Values
-
SPRM_FWORDWRAP
public static final short SPRM_FWORDWRAP
- See Also:
- Constant Field Values
-
SPRM_FOVERFLOWPUNCT
public static final short SPRM_FOVERFLOWPUNCT
- See Also:
- Constant Field Values
-
SPRM_FTOPLINEPUNCT
public static final short SPRM_FTOPLINEPUNCT
- See Also:
- Constant Field Values
-
SPRM_AUTOSPACEDE
public static final short SPRM_AUTOSPACEDE
- See Also:
- Constant Field Values
-
SPRM_AUTOSPACEDN
public static final short SPRM_AUTOSPACEDN
- See Also:
- Constant Field Values
-
SPRM_WALIGNFONT
public static final short SPRM_WALIGNFONT
- See Also:
- Constant Field Values
-
SPRM_FRAMETEXTFLOW
public static final short SPRM_FRAMETEXTFLOW
- See Also:
- Constant Field Values
-
SPRM_ANLD
public static final short SPRM_ANLD
- See Also:
- Constant Field Values
-
SPRM_PROPRMARK
public static final short SPRM_PROPRMARK
- See Also:
- Constant Field Values
-
SPRM_OUTLVL
public static final short SPRM_OUTLVL
- See Also:
- Constant Field Values
-
SPRM_FBIDI
public static final short SPRM_FBIDI
- See Also:
- Constant Field Values
-
SPRM_FNUMRMLNS
public static final short SPRM_FNUMRMLNS
- See Also:
- Constant Field Values
-
SPRM_CRLF
public static final short SPRM_CRLF
- See Also:
- Constant Field Values
-
SPRM_NUMRM
public static final short SPRM_NUMRM
- See Also:
- Constant Field Values
-
SPRM_USEPGSUSETTINGS
public static final short SPRM_USEPGSUSETTINGS
- See Also:
- Constant Field Values
-
SPRM_FADJUSTRIGHT
public static final short SPRM_FADJUSTRIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStyleIndex
public short getStyleIndex()
Returns the index of the style which applies to this Paragraph. Details of the style can be looked up from theStyleSheet, viaStyleSheet.getStyleDescription(int)
-
isInTable
public boolean isInTable()
-
isTableRowEnd
public boolean isTableRowEnd()
- Returns:
true, if table trailer paragraph (last in table row),falseotherwise
-
getTableLevel
public int getTableLevel()
-
isEmbeddedCellMark
public boolean isEmbeddedCellMark()
- Returns:
true, if the end of paragraph mark is really an end of cell mark for a nested table cell,falseotherwise
-
getJustification
public int getJustification()
-
setJustification
public void setJustification(byte jc)
-
keepOnPage
public boolean keepOnPage()
-
setKeepOnPage
public void setKeepOnPage(boolean fKeep)
-
keepWithNext
public boolean keepWithNext()
-
setKeepWithNext
public void setKeepWithNext(boolean fKeepFollow)
-
pageBreakBefore
public boolean pageBreakBefore()
-
setPageBreakBefore
public void setPageBreakBefore(boolean fPageBreak)
-
isLineNotNumbered
public boolean isLineNotNumbered()
-
setLineNotNumbered
public void setLineNotNumbered(boolean fNoLnn)
-
isSideBySide
public boolean isSideBySide()
-
setSideBySide
public void setSideBySide(boolean fSideBySide)
-
isAutoHyphenated
public boolean isAutoHyphenated()
-
setAutoHyphenated
public void setAutoHyphenated(boolean autoHyph)
-
isWidowControlled
public boolean isWidowControlled()
-
setWidowControl
public void setWidowControl(boolean widowControl)
-
getIndentFromRight
public int getIndentFromRight()
-
setIndentFromRight
public void setIndentFromRight(int dxaRight)
-
getIndentFromLeft
public int getIndentFromLeft()
-
setIndentFromLeft
public void setIndentFromLeft(int dxaLeft)
-
getFirstLineIndent
public int getFirstLineIndent()
-
setFirstLineIndent
public void setFirstLineIndent(int first)
-
getLineSpacing
public LineSpacingDescriptor getLineSpacing()
-
setLineSpacing
public void setLineSpacing(LineSpacingDescriptor lspd)
-
getSpacingBefore
public int getSpacingBefore()
-
setSpacingBefore
public void setSpacingBefore(int before)
-
getSpacingAfter
public int getSpacingAfter()
-
setSpacingAfter
public void setSpacingAfter(int after)
-
isKinsoku
public boolean isKinsoku()
-
setKinsoku
public void setKinsoku(boolean kinsoku)
-
isWordWrapped
public boolean isWordWrapped()
-
setWordWrapped
public void setWordWrapped(boolean wrap)
-
getFontAlignment
public int getFontAlignment()
-
setFontAlignment
public void setFontAlignment(int align)
-
isVertical
public boolean isVertical()
-
setVertical
public void setVertical(boolean vertical)
-
isBackward
public boolean isBackward()
-
setBackward
public void setBackward(boolean bward)
-
getTopBorder
public BorderCode getTopBorder()
-
setTopBorder
public void setTopBorder(BorderCode top)
-
getLeftBorder
public BorderCode getLeftBorder()
-
setLeftBorder
public void setLeftBorder(BorderCode left)
-
getBottomBorder
public BorderCode getBottomBorder()
-
setBottomBorder
public void setBottomBorder(BorderCode bottom)
-
getRightBorder
public BorderCode getRightBorder()
-
setRightBorder
public void setRightBorder(BorderCode right)
-
getBarBorder
public BorderCode getBarBorder()
-
setBarBorder
public void setBarBorder(BorderCode bar)
-
getShading
public ShadingDescriptor getShading()
-
setShading
public void setShading(ShadingDescriptor shd)
-
getDropCap
public DropCapSpecifier getDropCap()
-
setDropCap
public void setDropCap(DropCapSpecifier dcs)
-
getIlfo
public int getIlfo()
Returns the ilfo, an index to the document's hpllfo, which describes the automatic number formatting of the paragraph. A value of zero means it isn't numbered.
-
getIlvl
public int getIlvl()
Returns the multi-level indent for the paragraph. Will be zero for non-list paragraphs, and the first level of any list. Subsequent levels in hold values 1-8.
-
getLvl
public int getLvl()
Returns the heading level (1-8), or 9 if the paragraph isn't in a heading style.
-
getTabStopsNumber
public int getTabStopsNumber()
Returns number of tabs stops defined for paragraph. Must be >= 0 and <= 64.- Returns:
- number of tabs stops defined for paragraph. Must be >= 0 and <= 64
-
getTabStopsPositions
public int[] getTabStopsPositions()
Returns array of positions of itbdMac tab stops- Returns:
- array of positions of itbdMac tab stops
-
getList
public HWPFList getList()
-
isInList
public boolean isInList()
-
cloneProperties
public ParagraphProperties cloneProperties()
Clone the ParagraphProperties object associated with this Paragraph, so that you can apply the same properties to another Paragraph.
-
copy
public Paragraph copy()
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable
-
getProps
@Internal public ParagraphProperties getProps()
-
-