36 lines
805 B
Plaintext
36 lines
805 B
Plaintext
package com.bonus.doc.planbudget;
|
||
|
||
import java.awt.Color;
|
||
import java.io.IOException;
|
||
import java.util.List;
|
||
|
||
import com.lowagie.text.BadElementException;
|
||
import com.lowagie.text.Cell;
|
||
import com.lowagie.text.Document;
|
||
import com.lowagie.text.DocumentException;
|
||
import com.lowagie.text.Element;
|
||
import com.lowagie.text.Font;
|
||
import com.lowagie.text.Paragraph;
|
||
import com.lowagie.text.Table;
|
||
import com.lowagie.text.rtf.style.RtfFont;
|
||
|
||
public class CreateTable {
|
||
|
||
/**
|
||
* 添加cell,以及样式
|
||
*
|
||
* @param cell
|
||
* @param table
|
||
* @return table
|
||
*/
|
||
public static Table addCellStyle(Cell cell, Table table) {
|
||
table.addCell(cell);
|
||
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
|
||
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
|
||
return table;
|
||
}
|
||
|
||
|
||
|
||
|
||
} |