Java Code Examples for com.lowagie.text.ListItem#getLeading()
The following examples show how to use
com.lowagie.text.ListItem#getLeading() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PdfCell.java From gcs with Mozilla Public License 2.0 | 5 votes |
private void addList(List list, float left, float right, int alignment) { PdfChunk chunk; PdfChunk overflow; ArrayList allActions = new ArrayList(); processActions(list, null, allActions); int aCounter = 0; for (Iterator it = list.getItems().iterator(); it.hasNext();) { Element ele = (Element) it.next(); switch (ele.type()) { case Element.LISTITEM: ListItem item = (ListItem) ele; line = new PdfLine(left + item.getIndentationLeft(), right, alignment, item.getLeading()); line.setListItem(item); for (Iterator j = item.getChunks().iterator(); j.hasNext();) { chunk = new PdfChunk((Chunk) j.next(), (PdfAction) allActions.get(aCounter++)); while ((overflow = line.add(chunk)) != null) { addLine(line); line = new PdfLine(left + item.getIndentationLeft(), right, alignment, item.getLeading()); chunk = overflow; } line.resetAlignment(); addLine(line); line = new PdfLine(left + item.getIndentationLeft(), right, alignment, leading); } break; case Element.LIST: List sublist = (List) ele; addList(sublist, left + sublist.getIndentationLeft(), right, alignment); break; } } }
Example 2
Source File: PdfCell.java From itext2 with GNU Lesser General Public License v3.0 | 5 votes |
private void addList(List list, float left, float right, int alignment) { PdfChunk chunk; PdfChunk overflow; ArrayList allActions = new ArrayList(); processActions(list, null, allActions); int aCounter = 0; for (Iterator it = list.getItems().iterator(); it.hasNext();) { Element ele = (Element)it.next(); switch (ele.type()) { case Element.LISTITEM: ListItem item = (ListItem)ele; line = new PdfLine(left + item.getIndentationLeft(), right, alignment, item.getLeading()); line.setListItem(item); for (Iterator j = item.getChunks().iterator(); j.hasNext();) { chunk = new PdfChunk((Chunk) j.next(), (PdfAction) (allActions.get(aCounter++))); while ((overflow = line.add(chunk)) != null) { addLine(line); line = new PdfLine(left + item.getIndentationLeft(), right, alignment, item.getLeading()); chunk = overflow; } line.resetAlignment(); addLine(line); line = new PdfLine(left + item.getIndentationLeft(), right, alignment, leading); } break; case Element.LIST: List sublist = (List)ele; addList(sublist, left + sublist.getIndentationLeft(), right, alignment); break; } } }