Example usage for com.itextpdf.text Section setIndentationRight

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

Introduction

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

Prototype

public void setIndentationRight(final float indentation) 

Source Link

Document

Sets the indentation of this Section on the right 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   ww  w.j ava2s .  com*/
    return text;
}