Commit 85f0a102 authored by xixinzhao's avatar xixinzhao

交接班pdf样式

parent fdbbbbc7
......@@ -27,17 +27,7 @@ public class PdfUtils {
return document;
}
/**
*
* @param value 单元格数据
* @param font 单元格样式
* @param align 位置
* @param colspan 占几列
* @param row 占几行
* @param size 高度
* @return
*/
public static PdfPCell createCell(Object value, Font font, int align, int colspan, int row, int size){
public static PdfPCell createCell(Object value, Font font, int align, int colspan, int row, int size,int top,int right,int bottom,int left){
String cellValue;
if (value == null) {
cellValue = "";
......@@ -53,35 +43,10 @@ public class PdfUtils {
if (row != 1) {
cell.setRowspan(row);
}
return cell;
}
public static PdfPCell createCell(Object value, Font font, int align, int colspan, int row, int size,boolean flag){
String cellValue;
if (value == null) {
cellValue = "";
} else {
cellValue = value.toString();
}
PdfPCell cell = new PdfPCell();
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(align);
cell.setColspan(colspan);
cell.setPhrase(new Phrase(cellValue,font));
cell.setFixedHeight(size);
if (row != 1) {
cell.setRowspan(row);
}
if (flag) {
cell.setBorderWidthLeft(0);
cell.setBorderWidthTop(0);
cell.setBorderWidthBottom(0);
} else {
cell.setBorderWidthLeft(0);
cell.setBorderWidthRight(0);
cell.setBorderWidthTop(0);
cell.setBorderWidthBottom(0);
}
cell.setBorderWidthLeft(left);
cell.setBorderWidthRight(right);
cell.setBorderWidthTop(top);
cell.setBorderWidthBottom(bottom);
return cell;
}
public static PdfPCell createCell(Image image, int align, int colspan){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment