Example usage for com.lowagie.text ElementTags CELLPADDING

List of usage examples for com.lowagie.text ElementTags CELLPADDING

Introduction

In this page you can find the example usage for com.lowagie.text ElementTags CELLPADDING.

Prototype

String CELLPADDING

To view the source code for com.lowagie.text ElementTags CELLPADDING.

Click Source Link

Document

attribute of the table tag

Usage

From source file:org.apache.maven.doxia.module.itext.ITextSink.java

License:Apache License

/** {@inheritDoc} */
public void table() {
    writeStartElement(ElementTags.CHUNK);
    writeAddAttribute(ElementTags.FONT, font.getFontName());
    writeAddAttribute(ElementTags.SIZE, font.getFontSize());
    writeAddAttribute(ElementTags.STYLE, font.getFontStyle());
    writeAddAttribute(ElementTags.BLUE, font.getFontColorBlue());
    writeAddAttribute(ElementTags.GREEN, font.getFontColorGreen());
    writeAddAttribute(ElementTags.RED, font.getFontColorRed());

    writeStartElement(ElementTags.TABLE);
    writeAddAttribute(ElementTags.LEFT, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.RIGHT, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.TOP, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.BOTTOM, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.ALIGN, ElementTags.ALIGN_CENTER);
    writeAddAttribute(ElementTags.WIDTH, "100.0%");
    writeAddAttribute(ElementTags.TABLEFITSPAGE, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.CELLSFITPAGE, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.CELLPADDING, "10");
    //writeAddAttribute( ElementTags.COLUMNS, "2" );

    actionContext.setAction(SinkActionContext.TABLE);
}

From source file:org.apache.maven.doxia.module.itext.ITextSink.java

License:Apache License

/** {@inheritDoc} */
public void verbatim(boolean boxed) {
    // Always boxed
    writeStartElement(ElementTags.CHUNK);
    writeAddAttribute(ElementTags.FONT, font.getFontName());
    writeAddAttribute(ElementTags.SIZE, font.getFontSize());
    writeAddAttribute(ElementTags.STYLE, font.getFontStyle());
    writeAddAttribute(ElementTags.BLUE, font.getFontColorBlue());
    writeAddAttribute(ElementTags.GREEN, font.getFontColorGreen());
    writeAddAttribute(ElementTags.RED, font.getFontColorRed());

    writeStartElement(ElementTags.TABLE);
    writeAddAttribute(ElementTags.COLUMNS, "1");
    writeAddAttribute(ElementTags.LEFT, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.RIGHT, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.TOP, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.BOTTOM, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.ALIGN, ElementTags.ALIGN_CENTER);
    writeAddAttribute(ElementTags.TABLEFITSPAGE, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.CELLSFITPAGE, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.CELLPADDING, "10");
    writeAddAttribute(ElementTags.WIDTH, "100.0%");

    writeStartElement(ElementTags.ROW);/*  w  w w .ja  v  a 2s.c o m*/

    writeStartElement(ElementTags.CELL);
    writeAddAttribute(ElementTags.LEFT, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.RIGHT, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.TOP, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.BOTTOM, Boolean.TRUE.toString());

    actionContext.setAction(SinkActionContext.VERBATIM);
}