本文整理汇总了Java中com.itextpdf.text.pdf.PdfPCell.setBorderWidthLeft方法的典型用法代码示例。如果您正苦于以下问题:Java PdfPCell.setBorderWidthLeft方法的具体用法?Java PdfPCell.setBorderWidthLeft怎么用?Java PdfPCell.setBorderWidthLeft使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.itextpdf.text.pdf.PdfPCell
的用法示例。
在下文中一共展示了PdfPCell.setBorderWidthLeft方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cellRodape
import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private PdfPTable cellRodape(String value, boolean l,boolean r,int align)
{
Font fontCorpoTableO= FontFactory.getFont(Fontes.FONT, BaseFont.WINANSI, BaseFont.EMBEDDED ,7.5f);
PdfPTable pTable = new PdfPTable(1);
pTable.setWidthPercentage(100f);
PdfPCell cellValue = new PdfPCell(new Phrase(value,fontCorpoTableO));
if(l){cellValue.setBorderWidthLeft(0);}
if(r){cellValue.setBorderWidthRight(0);}
switch (align)
{
case Element.ALIGN_RIGHT:cellValue.setHorizontalAlignment(Element.ALIGN_RIGHT);break;
case Element.ALIGN_LEFT:cellValue.setHorizontalAlignment(Element.ALIGN_LEFT);break;
case Element.ALIGN_CENTER:cellValue.setHorizontalAlignment(Element.ALIGN_CENTER);break;
default:break;
}
pTable.addCell(cellValue);
return pTable;
}
示例2: writeCommentsSection
import com.itextpdf.text.pdf.PdfPCell; //导入方法依赖的package包/类
private void writeCommentsSection(final PdfPTable table,
final Font baseFont,
final int height) {
PdfPCell commentLabel = null;
PdfPCell emptySpace = null;
Font font = new Font(baseFont);
font.setStyle(Font.ITALIC);
// This is the 'Comments' section at the bottom of every table for the judge
// to write in
commentLabel = createCell("Comments:", font, NO_BORDERS);
commentLabel.setRotation(90);
commentLabel.setRowspan(1);
commentLabel.setBorderWidthLeft(0);
commentLabel.setBorderWidthBottom(0);
commentLabel.setHorizontalAlignment(Element.ALIGN_CENTER);
commentLabel.setVerticalAlignment(Element.ALIGN_CENTER);
emptySpace = createCell(" ", font, TOP_ONLY);
emptySpace.setMinimumHeight(18f);
table.addCell(commentLabel);
// Need to add the empty cells so the row is complete and is displayed in
// the pdf
for (int i1 = 0; i1 < 5; i1++) {
table.addCell(emptySpace);
}
emptySpace = createCell(" ", font, NO_BORDERS);
for (int i2 = 0; i2 < height; i2++) {
for (int i3 = 0; i3 < 6; i3++) {
table.addCell(emptySpace);
}
}
}