List of usage examples for org.apache.poi.xwpf.usermodel BreakType COLUMN
BreakType COLUMN
To view the source code for org.apache.poi.xwpf.usermodel BreakType COLUMN.
Click Source Link
From source file:org.obeonetwork.m2doc.generator.M2DocEvaluator.java
License:Open Source License
/** * Insert the given {@link MPagination}. * //from w w w . j a v a2s . c om * @param run * the {@link XWPFRun} to insert to * @param mPagination * the {@link MPagination} */ private void insertMPagination(XWPFRun run, MPagination mPagination) { switch (mPagination) { case newColumn: run.addBreak(BreakType.COLUMN); break; case newParagraph: createNewParagraph((XWPFParagraph) run.getParent()); break; case newPage: run.addBreak(BreakType.PAGE); break; case newTableOfContent: CTP ctP = currentGeneratedParagraph.getCTP(); CTSimpleField toc = ctP.addNewFldSimple(); toc.setInstr("TOC \\h"); toc.setDirty(STOnOff.TRUE); break; case newTextWrapping: run.addBreak(BreakType.TEXT_WRAPPING); break; default: throw new IllegalStateException("Not supported MPagination."); } }