Java 类com.itextpdf.text.pdf.draw.DottedLineSeparator 实例源码

项目:iTextTutorial    文件:T14_TOC.java   
@SuppressWarnings("unchecked")
protected void fillColumnText(List<HashMap<String, Object>> bookmarkList, ColumnText ct, float leftIndent, int depth) {
    if (null != bookmarkList) {
        for (int i = 0; i < bookmarkList.size(); i++) {
            HashMap<String, Object> bookmark = bookmarkList.get(i);

            String title = (String) bookmark.get("Title");
            String pageNum = ((String) bookmark.get("Page")).split(" ")[0];
            Paragraph paragraph = new Paragraph(title);
            paragraph.add(new Chunk(new DottedLineSeparator()));
            paragraph.add(Integer.toString((Integer.parseInt(pageNum))));
            paragraph.setIndentationLeft(leftIndent * depth);
            paragraph.setSpacingBefore(0 == depth ? 9 : 0);
            ct.addElement(paragraph);

            fillColumnText(((List<HashMap<String, Object>>) bookmark.get("Kids")), ct, leftIndent, depth + 1);
        }
    }
}
项目:pdf-renderer    文件:DottedFillPhrase.java   
@Override
public void onRender(com.itextpdf.text.Paragraph paragraph) {
    DottedLineSeparator sep = new DottedLineSeparator();
    sep.setAlignment( Element.ALIGN_LEFT );
    sep.setGap( gap );
    sep.setLineColor( getBaseColor());
    com.itextpdf.text.Font f = new com.itextpdf.text.Font( getBaseFont(), getFontSize()  );
    f.setColor( getBaseColor() );
    Chunk separator = new Chunk( sep );
    separator.setFont(  f );
    paragraph.add( separator );
}
项目:cvbuilder_lib    文件:ModelFactory.java   
public Phrase DotLine()
{
    Phrase section = new Phrase();

    DottedLineSeparator dottedLine = new DottedLineSeparator();
    dottedLine.setGap(2);

    section.add(new Chunk(dottedLine));

    return section;
}