Example usage for com.itextpdf.text.pdf.draw DottedLineSeparator setAlignment

List of usage examples for com.itextpdf.text.pdf.draw DottedLineSeparator setAlignment

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf.draw DottedLineSeparator setAlignment.

Prototype

public void setAlignment(int align) 

Source Link

Document

Setter for the alignment of the line.

Usage

From source file:se.billes.pdf.renderer.model.text.DottedFillPhrase.java

License:Open Source License

@Override
public void onRender(com.itextpdf.text.Paragraph paragraph) {
    DottedLineSeparator sep = new DottedLineSeparator();
    sep.setAlignment(Element.ALIGN_LEFT);
    sep.setGap(gap);//www .j a  v a 2  s .  c  om
    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);
}