Example usage for com.lowagie.text ElementTags NUMBERED

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

Introduction

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

Prototype

String NUMBERED

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

Click Source Link

Document

attribute of list tag

Usage

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

License:Apache License

/** {@inheritDoc} */
public void list() {
    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.LIST);
    writeAddAttribute(ElementTags.NUMBERED, Boolean.FALSE.toString());
    writeAddAttribute(ElementTags.SYMBOLINDENT, "15");

    actionContext.setAction(SinkActionContext.LIST);
}

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

License:Apache License

/** {@inheritDoc} */
public void numberedList(int numbering) {
    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.LIST);
    writeAddAttribute(ElementTags.NUMBERED, Boolean.TRUE.toString());
    writeAddAttribute(ElementTags.SYMBOLINDENT, "20");

    switch (numbering) {
    case Sink.NUMBERING_UPPER_ALPHA:
        writeAddAttribute(ElementTags.LETTERED, Boolean.TRUE.toString());
        writeAddAttribute(ElementTags.FIRST, 'A');
        break;/*  www . jav a 2s. c om*/

    case Sink.NUMBERING_LOWER_ALPHA:
        writeAddAttribute(ElementTags.LETTERED, Boolean.TRUE.toString());
        writeAddAttribute(ElementTags.FIRST, 'a');
        break;

    // TODO Doesn't work
    case Sink.NUMBERING_UPPER_ROMAN:
        writeAddAttribute(ElementTags.LETTERED, Boolean.TRUE.toString());
        writeAddAttribute(ElementTags.FIRST, 'I');
        break;

    case Sink.NUMBERING_LOWER_ROMAN:
        writeAddAttribute(ElementTags.LETTERED, Boolean.TRUE.toString());
        writeAddAttribute(ElementTags.FIRST, 'i');
        break;

    case Sink.NUMBERING_DECIMAL:
    default:
        writeAddAttribute(ElementTags.LETTERED, Boolean.FALSE.toString());
    }

    actionContext.setAction(SinkActionContext.NUMBERED_LIST);
}