/** * Creates a PdfPCell based on this Cell object. * @return a PdfPCell * @throws BadElementException */ public PdfPCell createPdfPCell() throws BadElementException { if (rowspan > 1) throw new BadElementException("PdfPCells can't have a rowspan > 1"); if (isTable()) return new PdfPCell(((Table)arrayList.get(0)).createPdfPTable()); PdfPCell cell = new PdfPCell(); cell.setVerticalAlignment(verticalAlignment); cell.setHorizontalAlignment(horizontalAlignment); cell.setColspan(colspan); cell.setUseBorderPadding(useBorderPadding); cell.setUseDescender(useDescender); cell.setLeading(getLeading(), 0); cell.cloneNonPositionParameters(this); cell.setNoWrap(getMaxLines() == 1); for (Iterator i = getElements(); i.hasNext(); ) { Element e = (Element)i.next(); if (e.type() == Element.PHRASE || e.type() == Element.PARAGRAPH) { Paragraph p = new Paragraph((Phrase)e); p.setAlignment(horizontalAlignment); e = p; } cell.addElement(e); } return cell; }
/** * Creates a PdfPCell based on this Cell object. * @return a PdfPCell * @throws BadElementException */ public PdfPCell createPdfPCell() throws BadElementException { if (rowspan > 1) throw new BadElementException(MessageLocalization.getComposedMessage("pdfpcells.can.t.have.a.rowspan.gt.1")); if (isTable()) return new PdfPCell(((Table)arrayList.get(0)).createPdfPTable()); PdfPCell cell = new PdfPCell(); cell.setVerticalAlignment(verticalAlignment); cell.setHorizontalAlignment(horizontalAlignment); cell.setColspan(colspan); cell.setUseBorderPadding(useBorderPadding); cell.setUseDescender(useDescender); cell.setLeading(getLeading(), 0); cell.cloneNonPositionParameters(this); cell.setNoWrap(getMaxLines() == 1); for (Iterator i = getElements(); i.hasNext(); ) { Element e = (Element)i.next(); if (e.type() == Element.PHRASE || e.type() == Element.PARAGRAPH) { Paragraph p = new Paragraph((Phrase)e); p.setAlignment(horizontalAlignment); e = p; } cell.addElement(e); } return cell; }
/** * Creates a PdfPCell based on this Cell object. * @return a PdfPCell * @throws BadElementException */ public PdfPCell createPdfPCell() throws BadElementException { if (rowspan > 1) throw new BadElementException(MessageLocalization.getComposedMessage("pdfpcells.can.t.have.a.rowspan.gt.1")); if (isTable()) return new PdfPCell(((Table)arrayList.get(0)).createPdfPTable()); PdfPCell cell = new PdfPCell(); cell.setVerticalAlignment(verticalAlignment); cell.setHorizontalAlignment(horizontalAlignment); cell.setColspan(colspan); cell.setUseBorderPadding(useBorderPadding); cell.setUseDescender(useDescender); cell.setLeading(getLeading(), 0); cell.cloneNonPositionParameters(this); cell.setNoWrap(getMaxLines() == 1); for (Iterator i = getElements(); i.hasNext(); ) { Element e = (Element)i.next(); if (e.type() == Element.PHRASE || e.type() == Element.PARAGRAPH) { Paragraph p = new Paragraph((Phrase)e); p.setAlignment(horizontalAlignment); e = p; } cell.addElement(e); } return cell; }
if ((cell = (Element)row.getCell(i)) != null) { if (cell instanceof Table) { pcell = new PdfPCell(((Table)cell).createPdfPTable());
if ((cell = (Element)row.getCell(i)) != null) { if (cell instanceof Table) { pcell = new PdfPCell(((Table)cell).createPdfPTable());
if ((cell = (Element)row.getCell(i)) != null) { if (cell instanceof Table) { pcell = new PdfPCell(((Table)cell).createPdfPTable());
} else if (element instanceof Table) { try { PdfPTable ptable = ((Table)element).createPdfPTable(); if (ptable.size() <= ptable.getHeaderRows()) break; //nothing to do
} else if (element instanceof Table) { try { PdfPTable ptable = ((Table)element).createPdfPTable(); if (ptable.size() <= ptable.getHeaderRows()) break; //nothing to do
} else if (element instanceof Table) { try { PdfPTable ptable = ((Table)element).createPdfPTable(); if (ptable.size() <= ptable.getHeaderRows()) break; //nothing to do