本文整理汇总了Java中com.itextpdf.text.Chunk.append方法的典型用法代码示例。如果您正苦于以下问题:Java Chunk.append方法的具体用法?Java Chunk.append怎么用?Java Chunk.append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.itextpdf.text.Chunk
的用法示例。
在下文中一共展示了Chunk.append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: certaintyToNaturalString
import com.itextpdf.text.Chunk; //导入方法依赖的package包/类
private Chunk certaintyToNaturalString(String certainty)
{
Chunk c = new Chunk();
if(certainty.equalsIgnoreCase("exact")){
c.append("in exactly ");
}
else if (certainty.equalsIgnoreCase("after")){
c.append("after ");
}
else if (certainty.equalsIgnoreCase("before")){
c.append("before ");
}
else{
c.append("in "+certainty.toLowerCase() + " ");
}
c.setFont(bodyFont);
return c;
}
示例2: createTable
import com.itextpdf.text.Chunk; //导入方法依赖的package包/类
/**
* Creates the table.
*
* @param consent the consent
* @return the pdf p table
*/
private PdfPTable createTable(Consent consent) {
Font fontbold = FontFactory.getFont("Helvetica", 15, Font.BOLD);
PdfPTable table = new PdfPTable(new float[]{0.2f,0.8f});
table.setWidthPercentage(100f);
table.getDefaultCell().setBorder(0);
Chunk chunk2=new Chunk("NO EXCEPT",fontbold);
Chunk chunk3=new Chunk("NO NEVER",fontbold);
if(consent.getConsentRevokationType().equals("EMERGENCY ONLY")){
chunk2.append("\n(This is the option you chose.)");
}
else if(consent.getConsentRevokationType().equals("NO NEVER")){
chunk3.append("\n(This is the option you chose.)");
}
table.addCell(new PdfPCell(new Phrase(chunk2)));
table.addCell(new PdfPCell(new Phrase("I Deny Consent for all Participants to access " +
"my electronic health information through Consent 2 Share for any purpose, EXCEPT " +
"in a medical emergency. By checking this box you agree, \"No, none of the Participants" +
" may be given access to my medical records through Consent 2 Share unless it is a medical emergency.\"")));
table.addCell(new PdfPCell(new Phrase(chunk3)));
table.addCell(new PdfPCell(new Phrase("I Deny Consent for all Participants to access my electronic health information" +
" through Consent 2 Share for any purpose, INCLUDING in a medical emergency.")));
return table;
}
示例3: getWidthPoint
import com.itextpdf.text.Chunk; //导入方法依赖的package包/类
public float getWidthPoint(String str){
Chunk ch = new Chunk();
ch.append(str);
return ch.getWidthPoint();
}