Пример #1
0
 void setTable(PdfPTable table) {
   this.table = table;
   column.setText(null);
   image = null;
   if (table != null) {
     table.setExtendLastRow(verticalAlignment == Element.ALIGN_TOP);
     column.addElement(table);
     table.setWidthPercentage(100);
   }
 }
Пример #2
0
 /**
  * Adds an iText element to the cell.
  *
  * @param element
  */
 public void addElement(Element element) {
   if (table != null) {
     table = null;
     column.setText(null);
   }
   if (element instanceof PdfPTable) {
     ((PdfPTable) element).setSplitLate(false);
   } else if (element instanceof PdfDiv) {
     for (Element divChildElement : ((PdfDiv) element).getContent()) {
       if (divChildElement instanceof PdfPTable) {
         ((PdfPTable) divChildElement).setSplitLate(false);
       }
     }
   }
   column.addElement(element);
 }
Пример #3
0
 /**
  * Setter for property image.
  *
  * @param image New value of property image.
  */
 public void setImage(Image image) {
   column.setText(null);
   table = null;
   this.image = image;
 }
Пример #4
0
 /**
  * Sets the <CODE>Phrase</CODE> for this cell.
  *
  * @param phrase the <CODE>Phrase</CODE>
  */
 public void setPhrase(Phrase phrase) {
   table = null;
   image = null;
   column.setText(this.phrase = phrase);
 }