List of usage examples for com.lowagie.text.pdf PdfPTable setRunDirection
public void setRunDirection(int runDirection)
From source file:com.jk.framework.desktop.swing.dao.TableModelPdfBuilder.java
License:Apache License
/** * Creates the pdf table./*from www .ja v a 2 s .co m*/ * * @return the pdf P table * @throws DocumentException * the document exception * @throws IOException * Signals that an I/O exception has occurred. */ public PdfPTable createPdfTable() throws DocumentException, IOException { final Font font = getFont(); int columnCount = 0; for (int i = 0; i < this.model.getColumnCount(); i++) { if (this.model.isVisible(i)) { columnCount++; } } final PdfPTable pdfPTable = new PdfPTable(columnCount); pdfPTable.setRunDirection(getRunDirection()); pdfPTable.getDefaultCell().setRunDirection(getRunDirection()); pdfPTable.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER); pdfPTable.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE); pdfPTable.getDefaultCell().setNoWrap(true); createPdfHeaders(pdfPTable, font); loadDataTable(pdfPTable, font); return pdfPTable; }