Example usage for com.itextpdf.text Section setIndentationLeft

List of usage examples for com.itextpdf.text Section setIndentationLeft

Introduction

In this page you can find the example usage for com.itextpdf.text Section setIndentationLeft.

Prototype

public void setIndentationLeft(final float indentation) 

Source Link

Document

Sets the indentation of this Section on the left side.

Usage

From source file:com.vectorprint.report.itext.style.stylers.Indent.java

License:Open Source License

@Override
public <E> E style(E text, Object data) throws VectorPrintException {
    if (text instanceof Section) {
        Section cell = (Section) text;

        cell.setIndentationLeft(getIndentLeft());
        cell.setIndentationRight(getIndentRight());
    } else if (text instanceof Paragraph) {
        Paragraph par = (Paragraph) text;

        par.setIndentationLeft(getIndentLeft());
        par.setIndentationRight(getIndentRight());

    } else if (text instanceof List) {
        ((List) text).setIndentationLeft(getIndentLeft());
        ((List) text).setIndentationLeft(getIndentRight());
    } else if (text instanceof ListItem) {
        ((com.itextpdf.text.ListItem) text).setIndentationLeft(getIndentLeft());
        ((com.itextpdf.text.ListItem) text).setIndentationLeft(getIndentRight());
    } else if (text instanceof PdfPCell) {
        ((PdfPCell) text).setIndent(getIndentLeft());
    }/*from w  w  w.j a va2 s  .co  m*/
    return text;
}