List of usage examples for com.lowagie.text Chunk isEmpty
public boolean isEmpty()
Chunk
is empty. From source file:org.pz.platypus.plugin.pdf.PdfOutfile.java
License:Open Source License
/** * Adds a new bullet list to the stack of bulleted lists. (These are saved in a stack because * lists can nest)./* w w w. j av a 2 s. c o m*/ * * @param bulletSymbol symbol to be used as the bullet marker (an iText Chunk) */ public void startPlainBulletList(final Chunk bulletSymbol) { // set the skip to 0 lines, output old text, start a new paragraph. float initialParaSkip = pdfData.getParagraphSkip(); int initialParaSkipSource = pdfData.getParagraphSkipLine(); pdfData.setParagraphSkip(0f, new Source(0, initialParaSkipSource)); startNewParagraph(); // then reset the paragraph skip to the previous value. pdfData.setParagraphSkip(initialParaSkip, new Source(0, initialParaSkipSource)); // create the bullet list Chunk bulletMarker = bulletSymbol; float indentMargin = 18f; // for the nonce, all indents are 1/4" List bulletList = new List(List.UNORDERED, indentMargin); if (bulletMarker == null || bulletMarker.isEmpty()) { bulletMarker = new Chunk(DefaultValues.BULLET); } bulletList.setListSymbol(bulletMarker); bulletLists.add(bulletList); }