JAva POIを使用してXWPFDocumentのXWPFParagraph(段落)オブジェクトのプロパティの略解を操作する


私はoffice word 2016版を使っています.
 
テキストオブジェクトの作成
XWPFDocument docxDocument = new XWPFDocument();
段落オブジェクトの作成
XWPFParagraph paragraphX = docxDocument.createParagraph();
 
//XWPFParagraph     
//paragraphX.addRun(runX0);//         
//paragraphX.removeRun(1);//       run(  )
paragraphX.setAlignment(ParagraphAlignment.LEFT);//    
//paragraphX.setBorderBetween(Borders.LIGHTNING_1);//   (               )
//paragraphX.setFirstLineIndent(100);//    :-----    
//paragraphX.setFontAlignment(3);//      :1    2  3   
//paragraphX.setIndentationFirstLine(2);//    :-----    
//paragraphX.setIndentationHanging(1);//    ,          ,                   。-----    
//paragraphX.setIndentationLeft(2);//-----    
//paragraphX.setIndentationRight(2);//-----    
//paragraphX.setIndentFromLeft(2);//-----    
//paragraphX.setIndentFromRight(2);//-----    
//paragraphX.setNumID(new BigInteger("3"));//      -----      (       4  )
//paragraphX.setPageBreak(true);//    
//paragraphX.setSpacingAfter(1);//                     。-----    
//paragraphX.setSpacingBeforeLines(2);//                    -----    
//paragraphX.setStyle("   3");//    :    addCustomHeadingStyle(docxDocument, "   3", 3)    
paragraphX.setVerticalAlignment(TextAlignment.BOTTOM);//      (   table            )
paragraphX.setWordWrapped(true);//                               ,       (      )        (    )-----(    :  false     )

 
転載先:https://www.cnblogs.com/unruly/p/7485645.html