List of usage examples for com.itextpdf.text ChapterAutoNumber ChapterAutoNumber
public ChapterAutoNumber(final String title)
From source file:com.vectorprint.report.itext.DefaultElementProducer.java
License:Open Source License
@Override public <E extends Element> E createElement(Object data, Class<E> elementClass, List<? extends BaseStyler> stylers) throws VectorPrintException, InstantiationException, IllegalAccessException { if (PdfPCell.class.equals(elementClass)) { return (E) createCell(data, stylers); } else if (Chunk.class.equals(elementClass)) { return (E) createChunk(data, stylers); } else if (Phrase.class.equals(elementClass)) { return (E) createPhrase(data, stylers); } else if (Paragraph.class.equals(elementClass)) { return (E) createParagraph(data, stylers); } else if (Anchor.class.equals(elementClass)) { return (E) createAnchor(data, stylers); } else if (ListItem.class.equals(elementClass)) { return (E) createListItem(data, stylers); } else if (PdfPTable.class.equals(elementClass)) { return createElementByStyler(stylers, data, elementClass); } else if (Image.class.equals(elementClass)) { return createElementByStyler(stylers, data, elementClass); } else if (ChapterAutoNumber.class.equals(elementClass)) { ChapterAutoNumber can = new ChapterAutoNumber(formatValue(data)); return (E) styleHelper.style(can, data, stylers); }/*from ww w . j a va2s . c om*/ return styleHelper.style(elementClass.newInstance(), data, stylers); }