Package org.jfree.report.structure

Examples of org.jfree.report.structure.Element


            {
                // Now this is very bad. It means that there is no style defined with the given name.
                return;
            }

            final Element tableColumnProperties = style.getTableColumnProperties();
            String widthStr = (String) tableColumnProperties.getAttribute("column-width");
            widthStr = widthStr.substring(0, widthStr.indexOf(getUnitsOfMeasure(widthStr)));
            final float val = Float.parseFloat(widthStr) * CELL_WIDTH_FACTOR;
            addColumnWidthToRowBoundaryMarker((long) val);
            ColumnBoundary currentRowBoundary = new ColumnBoundary(getCurrentRowBoundaryMarker());
            final List columnBoundaryList_ = getColumnBoundaryList();
View Full Code Here


            final OfficeStyle tableStyle = new OfficeStyle();
            tableStyle.setStyleFamily(OfficeToken.TABLE);
            tableStyle.setStyleName("Initial_Table");
            tableStyle.setAttribute(OfficeNamespaces.STYLE_NS, "master-page-name", masterPageName);
            final Element tableProperties = produceFirstChild(tableStyle, OfficeNamespaces.STYLE_NS, "table-properties");
            tableProperties.setAttribute(OfficeNamespaces.FO_NS, OfficeToken.BACKGROUND_COLOR,TRANSPARENT);
            commonStyles.addStyle(tableStyle);
        }
        return "Initial_Table";
    }
View Full Code Here

                        if (style == null)
                        {
                            style = deriveStyle(OfficeToken.PARAGRAPH, styleName);
                            // Lets set the 'keep-together' flag..

                            Element paragraphProps = style.getParagraphProperties();
                            if (paragraphProps == null)
                            {
                                paragraphProps = new Section();
                                paragraphProps.setNamespace(OfficeNamespaces.STYLE_NS);
                                paragraphProps.setType(PARAGRAPH_PROPERTIES);
                                style.addNode(paragraphProps);
                            }
                            paragraphProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_TOGETHER, ALWAYS);

                            // We prevent pagebreaks within the two adjacent rows (this one and the next one) if
                            // either a group-wide keep-together is defined or if we haven't reached the end of the
                            // current section yet.
                            if ((keepTogetherState == PageContext.KEEP_TOGETHER_GROUP || expectedTableRowCount > 0) && isParentKeepTogether())
                            {
                                paragraphProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_WITH_NEXT, ALWAYS);
                            }
                        }

                        attrs.setAttribute(OfficeNamespaces.TEXT_NS, OfficeToken.STYLE_NAME, style.getStyleName());
                    }
                }
            }

            if (ObjectUtilities.equal(OfficeNamespaces.DRAWING_NS, namespace) && ObjectUtilities.equal(OfficeToken.FRAME, elementType))
            {
                final String styleName = (String) attrs.getAttribute(OfficeNamespaces.DRAWING_NS, OfficeToken.STYLE_NAME);
                final OfficeStyle predefAutoStyle = getPredefinedStylesCollection().getAutomaticStyles().getStyle(OfficeToken.GRAPHIC, styleName);
                if (predefAutoStyle != null)
                {
                    // special ole handling
                    final Element graphicProperties = predefAutoStyle.getGraphicProperties();
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, VERTICAL_POS, "from-top");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, HORIZONTAL_POS, "from-left");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "vertical-rel", "paragraph-content");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "horizontal-rel", "paragraph");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "flow-with-text", "false");
                    graphicProperties.setAttribute(OfficeNamespaces.DRAWING_NS, "ole-draw-aspect", "1");

                // attrs.setAttribute(OfficeNamespaces.DRAWING_NS, OfficeToken.STYLE_NAME, predefAutoStyle.getStyleName());
                }
            }
View Full Code Here

                final OfficeStyle style = deriveStyle(OfficeToken.PARAGRAPH, TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT);
                style.setAttribute(OfficeNamespaces.STYLE_NS, "master-page-name", masterPageName);
                if (breakDefinition.isResetPageNumber())
                {
                    final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                    paragraphProps.setAttribute(OfficeNamespaces.STYLE_NS, "page-number", "1");
                }
                if (isColumnBreakPending())
                {
                    final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                    paragraphProps.setAttribute(OfficeNamespaces.FO_NS, "break-before", "column");
                    setColumnBreakPending(false);
                }
                xmlWriter.writeTag(OfficeNamespaces.TEXT_NS, OfficeToken.P, OfficeToken.STYLE_NAME, style.getStyleName(), XmlWriterSupport.OPEN);

                masterPageName = null;
            //breakDefinition = null;
            }
            else if (isColumnBreakPending())
            {
                setColumnBreakPending(false);

                final OfficeStyle style = deriveStyle(OfficeToken.PARAGRAPH, TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT);
                final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                paragraphProps.setAttribute(OfficeNamespaces.STYLE_NS, "page-number", "1");

                xmlWriter.writeTag(OfficeNamespaces.TEXT_NS, OfficeToken.P, OfficeToken.STYLE_NAME, style.getStyleName(), XmlWriterSupport.OPEN);
            }
            else
            {
                // Write a paragraph without adding the pagebreak. We can reuse the global style, but we have to make
                // sure that the style is part of the current 'auto-style' collection.
//        LOGGER.debug("Variables-Section " + variables);

                StyleUtilities.copyStyle(OfficeToken.PARAGRAPH,
                        TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT, getStylesCollection(),
                        getGlobalStylesCollection(), getPredefinedStylesCollection());
                xmlWriter.writeTag(OfficeNamespaces.TEXT_NS, OfficeToken.P, OfficeToken.STYLE_NAME,
                        TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT, XmlWriterSupport.OPEN);
            }
            xmlWriter.writeText(variables);
            xmlWriter.writeCloseTag();
            variables = null;
        }

        final boolean keepWithNext = isKeepTableWithNext();
        final boolean localKeepTogether = OfficeToken.TRUE.equals(attrs.getAttribute(OfficeNamespaces.OOREPORT_NS, KEEP_TOGETHER));
        final boolean tableMergeActive = isTableMergeActive();
        if (tableMergeActive)
        {
            this.sectionKeepTogether = localKeepTogether;
        }
        else
        {
            this.sectionKeepTogether = false;

        }

        // Check, whether we have a reason to derive a style...
        if (masterPageName != null ||
                (!tableMergeActive && (localKeepTogether || keepWithNext)) || isColumnBreakPending())
        {
            final String styleName = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);
            final OfficeStyle style = deriveStyle("table", styleName);

            if (masterPageName != null)
            {
//        LOGGER.debug("Starting a new MasterPage: " + masterPageName);
                // Patch the current styles.
                // This usually only happens on Table-Styles or Paragraph-Styles
                style.setAttribute(OfficeNamespaces.STYLE_NS, "master-page-name", masterPageName);
                if (breakDefinition.isResetPageNumber())
                {
                    final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                    paragraphProps.setAttribute(OfficeNamespaces.STYLE_NS, "page-number", "1");
                }
            }
            if (isColumnBreakPending())
            {
                final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                paragraphProps.setAttribute(OfficeNamespaces.FO_NS, "break-before", "column");
                setColumnBreakPending(false);
            }

            // Inhibit breaks inside the table only if it has been defined and if we do not create one single
            // big detail section. In that case, this flag would be invalid and would cause layout-errors.
            if (!tableMergeActive)
            {
                if (localKeepTogether)
                {
                    final Element tableProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, TABLE_PROPERTIES);
                    tableProps.setAttribute(OfficeNamespaces.STYLE_NS, MAY_BREAK_BETWEEN_ROWS, OfficeToken.FALSE);
                }
            }
            else
            {
                if (detailBandProcessingState == DETAIL_SECTION_WAIT)
                {
                    detailBandProcessingState = DETAIL_SECTION_FIRST_STARTED;
                }
                else if (detailBandProcessingState == DETAIL_SECTION_FIRST_PRINTED)
                {
                    detailBandProcessingState = DETAIL_SECTION_OTHER_STARTED;
                }
            }
            if (keepWithNext)
            {
                boolean addKeepWithNext = true;
                if (currentRole == ROLE_GROUP_FOOTER)
                {
                    addKeepWithNext = isParentKeepTogether();
                }

                final Element tableProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, TABLE_PROPERTIES);
                tableProps.setAttribute(OfficeNamespaces.STYLE_NS, MAY_BREAK_BETWEEN_ROWS, OfficeToken.FALSE);
                if (addKeepWithNext)
                {
                    tableProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_WITH_NEXT, ALWAYS);
                    // A keep-with-next does not work, if the may-break-betweek rows is not set to false ..
                }
            }
            attrs.setAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME, style.getStyleName());
        // no need to copy the styles, this was done while deriving the
        // style ..
        }
        else
        {
            // Check, whether we may be able to skip the table.
            if (tableMergeActive)
            {
                if (detailBandProcessingState == DETAIL_SECTION_OTHER_PRINTED)
                {
                    // Skip the whole thing ..
                    return;
                }
                else if (detailBandProcessingState == DETAIL_SECTION_WAIT)
                {
                    if (keepWithNext)
                    {
                        final String styleName = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);

                        final OfficeStyle style = deriveStyle(OfficeToken.TABLE, styleName);
                        final Element tableProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, TABLE_PROPERTIES);
                        // A keep-with-next does not work, if the may-break-betweek rows is not set to false ..
                        tableProps.setAttribute(OfficeNamespaces.STYLE_NS, MAY_BREAK_BETWEEN_ROWS, OfficeToken.FALSE);
                        final String hasGroupFooter = (String) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "has-group-footer");
                        if (hasGroupFooter != null && hasGroupFooter.equals(OfficeToken.TRUE))
                        {
                            tableProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_WITH_NEXT, ALWAYS);
                        }

                        attrs.setAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME, style.getStyleName());
                    }
                    detailBandProcessingState = DETAIL_SECTION_FIRST_STARTED;
View Full Code Here

    private static void performFontFaceProcessing(final OfficeStyle style,
            final OfficeStylesCollection stylesCollection,
            final OfficeStylesCollection predefCollection)
            throws ReportProcessingException
    {
        final Element textProperties = style.getTextProperties();
        if (textProperties == null)
        {
            return;
        }

        try
        {
            final FontFaceDeclsSection currentFonts = stylesCollection.getFontFaceDecls();
            final FontFaceDeclsSection predefFonts = predefCollection.getFontFaceDecls();

            final String fontName = (String) textProperties.getAttribute(OfficeNamespaces.STYLE_NS, "font-name");
            if (fontName != null && !currentFonts.containsFont(fontName))
            {
                final FontFaceElement element = predefFonts.getFontFace(fontName);
                if (element != null)
                {
                    currentFonts.addFontFace((FontFaceElement) element.clone());
                }
            }

            final String fontNameAsian = (String) textProperties.getAttribute(OfficeNamespaces.STYLE_NS,
                    "font-name-asian");
            if (fontNameAsian != null && !currentFonts.containsFont(fontNameAsian))
            {
                final FontFaceElement element = predefFonts.getFontFace(
                        fontNameAsian);
                if (element != null)
                {
                    currentFonts.addFontFace((FontFaceElement) element.clone());
                }
            }

            final String fontNameComplex = (String) textProperties.getAttribute(OfficeNamespaces.STYLE_NS,
                    "font-name-complex");
            if (fontNameComplex != null && !currentFonts.containsFont(fontNameComplex))
            {
                final FontFaceElement element = predefFonts.getFontFace(
                        fontNameComplex);
View Full Code Here

        for (int i = 0; i < styles.length; i++)
        {
            final OfficeStyle officeStyle = styles[i];
            if (officeStyle.getStyleFamily().equals(styleFamily))
            {
                final Element section = officeStyle.findFirstChild(OfficeNamespaces.STYLE_NS, sectionName);
                if (section != null)
                {
                    int j = 0;
                    for (; j < propertyNamespace.size(); j++)
                    {
                        final String ns = (String) propertyNamespace.get(j);
                        final String prop = (String) propertyName.get(j);
                        final Object obj = section.getAttribute(ns, prop);
                        final Object value = propertyValues.get(j);
                        if (obj == null || value == null)
                        {
                            continue;
                        }
View Full Code Here

        if (style == null)
        {
            return null; // no such style

        }
        final Element section = style.findFirstChild(OfficeNamespaces.STYLE_NS, sectionName);
        if (section != null)
        {
            final Object attribute = section.getAttribute(propertyNamespace, propertyName);
            if (attribute != null)
            {
                return String.valueOf(attribute);
            }
        }
View Full Code Here

                        if (style == null)
                        {
                            style = deriveStyle(OfficeToken.PARAGRAPH, styleName);
                            // Lets set the 'keep-together' flag..

                            Element paragraphProps = style.getParagraphProperties();
                            if (paragraphProps == null)
                            {
                                paragraphProps = new Section();
                                paragraphProps.setNamespace(OfficeNamespaces.STYLE_NS);
                                paragraphProps.setType(PARAGRAPH_PROPERTIES);
                                style.addNode(paragraphProps);
                            }
                            paragraphProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_TOGETHER, ALWAYS);

                            // We prevent pagebreaks within the two adjacent rows (this one and the next one) if
                            // either a group-wide keep-together is defined or if we haven't reached the end of the
                            // current section yet.
                            if ((keepTogetherState == PageContext.KEEP_TOGETHER_GROUP || expectedTableRowCount > 0) && isParentKeepTogether())
                            {
                                paragraphProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_WITH_NEXT, ALWAYS);
                            }
                        }

                        attrs.setAttribute(OfficeNamespaces.TEXT_NS, OfficeToken.STYLE_NAME, style.getStyleName());
                    }
                }
            }

            if (ObjectUtilities.equal(OfficeNamespaces.DRAWING_NS, namespace) && ObjectUtilities.equal(OfficeToken.FRAME, elementType))
            {
                final String styleName = (String) attrs.getAttribute(OfficeNamespaces.DRAWING_NS, OfficeToken.STYLE_NAME);
                final OfficeStyle predefAutoStyle = getPredefinedStylesCollection().getAutomaticStyles().getStyle(OfficeToken.GRAPHIC, styleName);
                if (predefAutoStyle != null)
                {
                    // special ole handling
                    final Element graphicProperties = predefAutoStyle.getGraphicProperties();
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, VERTICAL_POS, "from-top");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, HORIZONTAL_POS, "from-left");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "vertical-rel", "paragraph-content");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "horizontal-rel", "paragraph");
                    graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "flow-with-text", "false");
                    graphicProperties.setAttribute(OfficeNamespaces.DRAWING_NS, "ole-draw-aspect", "1");

                    // attrs.setAttribute(OfficeNamespaces.DRAWING_NS, OfficeToken.STYLE_NAME, predefAutoStyle.getStyleName());
                }
            }
View Full Code Here

                final OfficeStyle style = deriveStyle(OfficeToken.PARAGRAPH, TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT);
                style.setAttribute(OfficeNamespaces.STYLE_NS, "master-page-name", masterPageName);
                if (breakDefinition.isResetPageNumber())
                {
                    final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                    paragraphProps.setAttribute(OfficeNamespaces.STYLE_NS, "page-number", "1");
                }
                if (isColumnBreakPending())
                {
                    final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                    paragraphProps.setAttribute(OfficeNamespaces.FO_NS, "break-before", "column");
                    setColumnBreakPending(false);
                }
                xmlWriter.writeTag(OfficeNamespaces.TEXT_NS, OfficeToken.P, OfficeToken.STYLE_NAME, style.getStyleName(), XmlWriterSupport.OPEN);

                masterPageName = null;
                //breakDefinition = null;
            }
            else if (isColumnBreakPending())
            {
                setColumnBreakPending(false);

                final OfficeStyle style = deriveStyle(OfficeToken.PARAGRAPH, TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT);
                final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                paragraphProps.setAttribute(OfficeNamespaces.STYLE_NS, "page-number", "1");

                xmlWriter.writeTag(OfficeNamespaces.TEXT_NS, OfficeToken.P, OfficeToken.STYLE_NAME, style.getStyleName(), XmlWriterSupport.OPEN);
            }
            else
            {
                // Write a paragraph without adding the pagebreak. We can reuse the global style, but we have to make
                // sure that the style is part of the current 'auto-style' collection.
//        LOGGER.debug("Variables-Section " + variables);

                StyleUtilities.copyStyle(OfficeToken.PARAGRAPH,
                        TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT, getStylesCollection(),
                        getGlobalStylesCollection(), getPredefinedStylesCollection());
                xmlWriter.writeTag(OfficeNamespaces.TEXT_NS, OfficeToken.P, OfficeToken.STYLE_NAME,
                        TextRawReportTarget.VARIABLES_HIDDEN_STYLE_WITH_KEEPWNEXT, XmlWriterSupport.OPEN);
            }
            xmlWriter.writeText(variables);
            xmlWriter.writeCloseTag();
            variables = null;
        }

        final boolean keepWithNext = isKeepTableWithNext();
        final boolean localKeepTogether = OfficeToken.TRUE.equals(attrs.getAttribute(OfficeNamespaces.OOREPORT_NS, KEEP_TOGETHER));
        final boolean tableMergeActive = isTableMergeActive();
        this.sectionKeepTogether = tableMergeActive && localKeepTogether;

        // Check, whether we have a reason to derive a style...
        if (masterPageName != null || (!tableMergeActive && (localKeepTogether || keepWithNext)) || isColumnBreakPending())
        {
            final String styleName = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);
            final OfficeStyle style = deriveStyle("table", styleName);

            if (masterPageName != null)
            {
//        LOGGER.debug("Starting a new MasterPage: " + masterPageName);
                // Patch the current styles.
                // This usually only happens on Table-Styles or Paragraph-Styles
                style.setAttribute(OfficeNamespaces.STYLE_NS, "master-page-name", masterPageName);
                if (breakDefinition.isResetPageNumber())
                {
                    final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                    paragraphProps.setAttribute(OfficeNamespaces.STYLE_NS, "page-number", "1");
                }
            }
            if (isColumnBreakPending())
            {
                final Element paragraphProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, PARAGRAPH_PROPERTIES);
                paragraphProps.setAttribute(OfficeNamespaces.FO_NS, "break-before", "column");
                setColumnBreakPending(false);
            }

            // Inhibit breaks inside the table only if it has been defined and if we do not create one single
            // big detail section. In that case, this flag would be invalid and would cause layout-errors.
            if (!tableMergeActive)
            {
                if (localKeepTogether)
                {
                    final Element tableProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, TABLE_PROPERTIES);
                    tableProps.setAttribute(OfficeNamespaces.STYLE_NS, MAY_BREAK_BETWEEN_ROWS, OfficeToken.FALSE);
                }
            }
            else
            {
                if (detailBandProcessingState == DETAIL_SECTION_WAIT)
                {
                    detailBandProcessingState = DETAIL_SECTION_FIRST_STARTED;
                }
                else if (detailBandProcessingState == DETAIL_SECTION_FIRST_PRINTED)
                {
                    detailBandProcessingState = DETAIL_SECTION_OTHER_STARTED;
                }
            }
            if (keepWithNext)
            {
                boolean addKeepWithNext = true;
                if (currentRole == ROLE_GROUP_FOOTER)
                {
                    addKeepWithNext = isParentKeepTogether();
                }

                final Element tableProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, TABLE_PROPERTIES);
                tableProps.setAttribute(OfficeNamespaces.STYLE_NS, MAY_BREAK_BETWEEN_ROWS, OfficeToken.FALSE);
                if (addKeepWithNext)
                {
                    tableProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_WITH_NEXT, ALWAYS);
                    // A keep-with-next does not work, if the may-break-betweek rows is not set to false ..
                }
            }
            attrs.setAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME, style.getStyleName());
            // no need to copy the styles, this was done while deriving the
            // style ..
        }
        else
        {
            // Check, whether we may be able to skip the table.
            if (tableMergeActive)
            {
                if (detailBandProcessingState == DETAIL_SECTION_OTHER_PRINTED)
                {
                    // Skip the whole thing ..
                    return;
                }
                else if (detailBandProcessingState == DETAIL_SECTION_WAIT)
                {
                    if (keepWithNext)
                    {
                        final String styleName = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);

                        final OfficeStyle style = deriveStyle(OfficeToken.TABLE, styleName);
                        final Element tableProps = produceFirstChild(style, OfficeNamespaces.STYLE_NS, TABLE_PROPERTIES);
                        // A keep-with-next does not work, if the may-break-betweek rows is not set to false ..
                        tableProps.setAttribute(OfficeNamespaces.STYLE_NS, MAY_BREAK_BETWEEN_ROWS, OfficeToken.FALSE);
                        final String hasGroupFooter = (String) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "has-group-footer");
                        if (hasGroupFooter != null && hasGroupFooter.equals(OfficeToken.TRUE))
                        {
                            tableProps.setAttribute(OfficeNamespaces.FO_NS, KEEP_WITH_NEXT, ALWAYS);
                        }

                        attrs.setAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME, style.getStyleName());
                    }
                    detailBandProcessingState = DETAIL_SECTION_FIRST_STARTED;
View Full Code Here

            if (!commonStyles.containsStyle(OfficeToken.GRAPHIC, OfficeToken.GRAPHICS))
            {
                final OfficeStyle graphicsDefaultStyle = new OfficeStyle();
                graphicsDefaultStyle.setStyleFamily(OfficeToken.GRAPHIC);
                graphicsDefaultStyle.setStyleName(OfficeToken.GRAPHICS);
                final Element graphicProperties = produceFirstChild(graphicsDefaultStyle, OfficeNamespaces.STYLE_NS, OfficeToken.GRAPHIC_PROPERTIES);
                graphicProperties.setAttribute(OfficeNamespaces.TEXT_NS, "anchor-type", OfficeToken.PARAGRAPH);
                graphicProperties.setAttribute(OfficeNamespaces.SVG_NS, "x", ZERO_CM);
                graphicProperties.setAttribute(OfficeNamespaces.SVG_NS, "y", ZERO_CM);
                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "wrap", "dynamic");
                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "number-wrapped-paragraphs", "no-limit");
                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "wrap-contour", OfficeToken.FALSE);
                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, VERTICAL_POS, "from-top"); // changed for chart

                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "vertical-rel", OfficeToken.PARAGRAPH);
                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, HORIZONTAL_POS, "from-left"); // changed for chart

                graphicProperties.setAttribute(OfficeNamespaces.STYLE_NS, "horizontal-rel", OfficeToken.PARAGRAPH);
                commonStyles.addStyle(graphicsDefaultStyle);
            }

            // Make sure that later generated styles do not overwrite existing styles.
            fillStyleNameGenerator(predefinedStylesCollection);
View Full Code Here

TOP

Related Classes of org.jfree.report.structure.Element

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.