Example usage for com.lowagie.text ElementTags NUMBERDEPTH

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

Introduction

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

Prototype

String NUMBERDEPTH

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

Click Source Link

Document

attribute of section/chapter tag

Usage

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

License:Apache License

/** {@inheritDoc} */
public void body() {
    if (writeStart) {
        writeStartElement(ElementTags.ITEXT);
        writeAddAttribute(ElementTags.TITLE, header.getTitle());
        writeAddAttribute(ElementTags.AUTHOR, header.getAuthors());
        writeAddAttribute(ElementTags.CREATIONDATE, header.getDate());
        writeAddAttribute(ElementTags.SUBJECT, header.getTitle());
        writeAddAttribute(ElementTags.KEYWORDS, "");
        writeAddAttribute(ElementTags.PRODUCER, "Generated with Doxia by " + System.getProperty("user.name"));
        writeAddAttribute(ElementTags.PAGE_SIZE, ITextUtil.getPageSize(ITextUtil.getDefaultPageSize()));

        writeStartElement(ElementTags.CHAPTER);
        writeAddAttribute(ElementTags.NUMBERDEPTH, numberDepth);
        writeAddAttribute(ElementTags.DEPTH, depth);
        writeAddAttribute(ElementTags.INDENT, "0.0");

        writeStartElement(ElementTags.TITLE);
        writeAddAttribute(ElementTags.LEADING, DEFAULT_CHAPTER_TITLE_LEADING);
        writeAddAttribute(ElementTags.FONT, ITextFont.DEFAULT_FONT_NAME);
        writeAddAttribute(ElementTags.SIZE, ITextFont.getSectionFontSize(0));
        writeAddAttribute(ElementTags.STYLE, ITextFont.BOLD);
        writeAddAttribute(ElementTags.BLUE, ITextFont.DEFAULT_FONT_COLOR_BLUE);
        writeAddAttribute(ElementTags.GREEN, ITextFont.DEFAULT_FONT_COLOR_GREEN);
        writeAddAttribute(ElementTags.RED, ITextFont.DEFAULT_FONT_COLOR_RED);
        writeAddAttribute(ElementTags.ALIGN, ElementTags.ALIGN_CENTER);

        //            startChunk( ITextFont.DEFAULT_FONT_NAME, ITextFont.getSectionFontSize( 0 ),
        //                    ITextFont.BOLD, ITextFont.DEFAULT_FONT_COLOR_BLUE, ITextFont.DEFAULT_FONT_COLOR_GREEN,
        //                    ITextFont.DEFAULT_FONT_COLOR_RED, "top" );

        writeStartElement(ElementTags.CHUNK);
        writeAddAttribute(ElementTags.FONT, ITextFont.DEFAULT_FONT_NAME);
        writeAddAttribute(ElementTags.SIZE, ITextFont.getSectionFontSize(0));
        writeAddAttribute(ElementTags.STYLE, ITextFont.BOLD);
        writeAddAttribute(ElementTags.BLUE, ITextFont.DEFAULT_FONT_COLOR_BLUE);
        writeAddAttribute(ElementTags.GREEN, ITextFont.DEFAULT_FONT_COLOR_GREEN);
        writeAddAttribute(ElementTags.RED, ITextFont.DEFAULT_FONT_COLOR_RED);
        //            writeAddAttribute( ElementTags.LOCALDESTINATION, "top" );

        write(header.getTitle());//from w ww . java  2  s  .  c o  m

        writeEndElement(); // ElementTags.CHUNK

        writeEndElement(); // ElementTags.TITLE
    }

    actionContext.setAction(SinkActionContext.BODY);
}

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

License:Apache License

/** {@inheritDoc} */
public void section1() {
    numberDepth++;//from   www .ja va  2s. c  o  m
    depth = 1;

    writeStartElement(ElementTags.SECTION);
    writeAddAttribute(ElementTags.NUMBERDEPTH, numberDepth);
    writeAddAttribute(ElementTags.DEPTH, depth);
    writeAddAttribute(ElementTags.INDENT, "0.0");

    lineBreak();

    actionContext.setAction(SinkActionContext.SECTION_1);
}

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

License:Apache License

/** {@inheritDoc} */
public void section2() {
    numberDepth++;/*from w  ww  .  j a  va  2 s  .com*/
    depth = 1;

    writeStartElement(ElementTags.SECTION);
    writeAddAttribute(ElementTags.NUMBERDEPTH, numberDepth);
    writeAddAttribute(ElementTags.DEPTH, depth);
    writeAddAttribute(ElementTags.INDENT, "0.0");

    lineBreak();

    actionContext.setAction(SinkActionContext.SECTION_2);
}

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

License:Apache License

/** {@inheritDoc} */
public void section3() {
    numberDepth++;/*from ww w  .  j a v a 2 s.  co m*/
    depth = 1;

    writeStartElement(ElementTags.SECTION);
    writeAddAttribute(ElementTags.NUMBERDEPTH, numberDepth);
    writeAddAttribute(ElementTags.DEPTH, depth);
    writeAddAttribute(ElementTags.INDENT, "0.0");

    lineBreak();

    actionContext.setAction(SinkActionContext.SECTION_3);
}

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

License:Apache License

/** {@inheritDoc} */
public void section4() {
    numberDepth++;/*from w  w  w.  jav  a  2s  .c  om*/
    depth = 1;

    writeStartElement(ElementTags.SECTION);
    writeAddAttribute(ElementTags.NUMBERDEPTH, numberDepth);
    writeAddAttribute(ElementTags.DEPTH, depth);
    writeAddAttribute(ElementTags.INDENT, "0.0");

    lineBreak();

    actionContext.setAction(SinkActionContext.SECTION_4);
}

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

License:Apache License

/** {@inheritDoc} */
public void section5() {
    numberDepth++;//from  w w  w .jav a 2s . com
    depth = 1;

    writeStartElement(ElementTags.SECTION);
    writeAddAttribute(ElementTags.NUMBERDEPTH, numberDepth);
    writeAddAttribute(ElementTags.DEPTH, depth);
    writeAddAttribute(ElementTags.INDENT, "0.0");

    lineBreak();

    actionContext.setAction(SinkActionContext.SECTION_5);
}