Example usage for com.lowagie.text.pdf PdfName K

List of usage examples for com.lowagie.text.pdf PdfName K

Introduction

In this page you can find the example usage for com.lowagie.text.pdf PdfName K.

Prototype

PdfName K

To view the source code for com.lowagie.text.pdf PdfName K.

Click Source Link

Document

A name

Usage

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

protected void createStartTags(JRPrintElement element) {
    if (element.hasProperties()) {
        String prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_TABLE);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            createTableStartTag();/*  w  w w  . j a v a2 s  .com*/
        }

        prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_TR);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            createTrStartTag();
        }

        prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_TH);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            createThStartTag(element);
        }

        prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_TD);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            createTdStartTag(element);
        }

        prop = element.getPropertiesMap().getProperty(JRCellContents.PROPERTY_TYPE);
        if (prop != null && (JRCellContents.TYPE_CROSSTAB_HEADER.equals(prop)
                || JRCellContents.TYPE_COLUMN_HEADER.equals(prop)
                || JRCellContents.TYPE_ROW_HEADER.equals(prop))) {
            createThStartTag(element);
        }
        if (prop != null && (JRCellContents.TYPE_DATA.equals(prop))) {
            createTdStartTag(element);
        }

        prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_H1);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            PdfStructureElement headingTag = new PdfStructureElement(tagStack.peek(), new PdfName("H1"));
            pdfContentByte.beginMarkedContentSequence(headingTag);
            headingTag.put(PdfName.K, new PdfArray());
            tagStack.push(headingTag);
            isTagEmpty = true;
        }

        prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_H2);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            PdfStructureElement headingTag = new PdfStructureElement(tagStack.peek(), new PdfName("H2"));
            pdfContentByte.beginMarkedContentSequence(headingTag);
            headingTag.put(PdfName.K, new PdfArray());
            tagStack.push(headingTag);
            isTagEmpty = true;
        }

        prop = element.getPropertiesMap().getProperty(PROPERTY_TAG_H3);
        if (prop != null && (TAG_START.equals(prop) || TAG_FULL.equals(prop))) {
            PdfStructureElement headingTag = new PdfStructureElement(tagStack.peek(), new PdfName("H3"));
            pdfContentByte.beginMarkedContentSequence(headingTag);
            headingTag.put(PdfName.K, new PdfArray());
            tagStack.push(headingTag);
            isTagEmpty = true;
        }
    }
}

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

protected void createTableStartTag() {
    PdfStructureElement tableTag = new PdfStructureElement(allTag, new PdfName("Table"));
    pdfContentByte.beginMarkedContentSequence(tableTag);
    tableTag.put(PdfName.K, new PdfArray());
    tagStack.push(tableTag);//from   w  w w .  j  ava 2 s .  c om
}

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

protected void createTrStartTag() {
    PdfStructureElement tableRowTag = new PdfStructureElement(tagStack.peek(), new PdfName("TR"));
    pdfContentByte.beginMarkedContentSequence(tableRowTag);
    tableRowTag.put(PdfName.K, new PdfArray());
    tagStack.push(tableRowTag);//from w  w w. jav  a  2 s  .c o  m
}

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

protected void createThStartTag(JRPrintElement element) {
    PdfStructureElement tableHeaderTag = new PdfStructureElement(tagStack.peek(), new PdfName("TH"));
    pdfContentByte.beginMarkedContentSequence(tableHeaderTag);
    tableHeaderTag.put(PdfName.K, new PdfArray());
    tagStack.push(tableHeaderTag);//www .j a  v  a2 s  .com
    isTagEmpty = true;

    createSpanTags(element, tableHeaderTag);
}

From source file:net.sf.jasperreports.engine.export.JRPdfExporterTagHelper.java

License:Open Source License

protected void createTdStartTag(JRPrintElement element) {
    PdfStructureElement tableCellTag = new PdfStructureElement(tagStack.peek(), new PdfName("TD"));
    pdfContentByte.beginMarkedContentSequence(tableCellTag);
    tableCellTag.put(PdfName.K, new PdfArray());
    tagStack.push(tableCellTag);/*from w  w  w  .  ja  v a2 s.  c o  m*/
    isTagEmpty = true;

    createSpanTags(element, tableCellTag);
}