Package org.jfree.layouting.input.style.values

Examples of org.jfree.layouting.input.style.values.CSSNumericValue


    final String masterPageName;
    if (currentMasterPage == null ||
        masterPageFactory.containsMasterPage("Standard", activePageHeader, activePageFooter) == false)
    {

      final CSSNumericValue headerSize = context.getAllHeaderSize();
      final CSSNumericValue footerSize = context.getAllFooterSize();


      currentMasterPage = masterPageFactory.createMasterPage("Standard", activePageHeader, activePageFooter);

//      Log.debug("Created a new master-page: " + currentMasterPage.getStyleName());
View Full Code Here


      throws IOException, ReportProcessingException
  {
    firstCellSeen = false;
    expectedTableRowCount -= 1;
    final String rowStyle = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, "style-name");
    final CSSNumericValue rowHeight = computeRowHeight(rowStyle);
    // Log.debug("Adding row-Style: " + rowStyle + " " + rowHeight);
    sectionHeight.add(rowHeight);

//    if (expectedTableRowCount > 0)
//    {
View Full Code Here

    {
      finishBuffering();
      return;
    }

    final CSSNumericValue result = sectionHeight.getResult();
    if (role == OfficeDocumentReportTarget.ROLE_PAGE_HEADER)
    {
      final PageContext pageContext = getCurrentContext();
      pageContext.setHeader(applyColumnsToPageBand(finishBuffering(), pageContext.getActiveColumns()).getXmlBuffer(), result);
    }
View Full Code Here

    final OfficeMasterPage masterPage;
    if (masterPageFactory.containsMasterPage("Standard", null, null) == false)
    {
      masterPage = masterPageFactory.createMasterPage("Standard", null, null);

      final CSSNumericValue zeroLength = CSSNumericValue.createValue(CSSNumericType.CM, 0);
      final String pageLayoutTemplate = masterPage.getPageLayout();
      if (pageLayoutTemplate == null)
      {
        // there is no pagelayout. Create one ..
        final String derivedLayout = masterPageFactory.createPageStyle
View Full Code Here

        if (image != null)
        {
            final ImageElementContext imageContext = (ImageElementContext) attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, "image-context");

            // When scaling, we have to create an image-style.
            final CSSNumericValue width = image.getWidth(); // always in 100th of a mm

            final CSSNumericValue height = image.getHeight(); // always in 100th of a mm

            LOGGER.debug("Image " + imageData + " Width: " + width + ", Height: " + height);
            if (width == null || height == null)
            {
                return;
            }

            CSSNumericValue imageAreaWidthVal;
            CSSNumericValue imageAreaHeightVal;
            String styleName = null;
            if (imageContext != null)
            {
                imageAreaWidthVal = computeImageWidth(imageContext);
                imageAreaHeightVal = computeImageHeight(imageContext);

                if (imageAreaWidthVal == null || imageAreaHeightVal == null)
                {
                    LOGGER.debug("Image data returned from context is invalid. Maybe this is not an image?");
                    return;
                }
                else
                {
                    // compute the clip-area ..
                    final CSSNumericValue normalizedImageWidth =
                            CSSValueResolverUtility.convertLength(width, imageAreaWidthVal.getType());
                    final CSSNumericValue normalizedImageHeight =
                            CSSValueResolverUtility.convertLength(height, imageAreaHeightVal.getType());

                    final boolean scale = OfficeToken.TRUE.equals(attrs.getAttribute(JFreeReportInfo.REPORT_NAMESPACE, OfficeToken.SCALE));
                    if (!scale && normalizedImageWidth.getValue() > 0 && normalizedImageHeight.getValue() > 0)
                    {
                        final double clipWidth = normalizedImageWidth.getValue() - imageAreaWidthVal.getValue();
                        final double clipHeight = normalizedImageHeight.getValue() - imageAreaHeightVal.getValue();
                        if (clipWidth > 0 && clipHeight > 0)
                        {
                            final OfficeStyle imageStyle = deriveStyle(OfficeToken.GRAPHIC, OfficeToken.GRAPHICS);
                            final Element graphProperties = produceFirstChild(imageStyle, OfficeNamespaces.STYLE_NS, OfficeToken.GRAPHIC_PROPERTIES);
                            final StringBuffer buffer = new StringBuffer();
View Full Code Here

        final LengthCalculator calculator = new LengthCalculator();
        final String[] strings = imageElementContext.getColStyles();
        for (int i = 0; i < strings.length; i++)
        {
            final String styleName = strings[i];
            final CSSNumericValue value = computeColumnWidth(styleName);
            if (value != null)
            {
                calculator.add(value);
            }
        }
View Full Code Here

        final LengthCalculator calculator = new LengthCalculator();
        final String[] strings = imageElementContext.getRowStyles();
        for (int i = 0; i < strings.length; i++)
        {
            final String styleName = strings[i];
            final CSSNumericValue value = computeRowHeight(styleName);
            if (value != null)
            {
                calculator.add(value);
            }
        }
View Full Code Here

                    len.add((CSSNumericValue) rowHeights.get(i));
                // val += ((CSSNumericValue)rowHeights.get(i)).getValue();
                }

                rowHeights.clear();
                final CSSNumericValue currentRowHeight = len.getResult();
                rowHeights.add(currentRowHeight);
                attrs.setAttribute(OfficeNamespaces.DRAWING_NS, "z-index", String.valueOf(shapes.size()));
                final String y = (String) attrs.getAttribute(OfficeNamespaces.SVG_NS, "y");
                if (y != null)
                {
                    len.add(parseLength(y));
                    final CSSNumericValue currentY = len.getResult();
                    attrs.setAttribute(OfficeNamespaces.SVG_NS, "y", currentY.getValue() + currentY.getType().getType());
                }
                shapes.add(attrs);
            }
            return;
        }
View Full Code Here

        final OfficeMasterPage masterPage;
        if (!masterPageFactory.containsMasterPage("Standard", null, null))
        {
            masterPage = masterPageFactory.createMasterPage("Standard", null, null);

            final CSSNumericValue zeroLength = CSSNumericValue.createValue(CSSNumericType.CM, 0);
            final String pageLayoutTemplate = masterPage.getPageLayout();
            if (pageLayoutTemplate == null)
            {
                // there is no pagelayout. Create one ..
                final String derivedLayout = masterPageFactory.createPageStyle(getGlobalStylesCollection().getAutomaticStyles(), zeroLength, zeroLength);
View Full Code Here

        final String masterPageName;
        if (currentMasterPage == null ||
                !masterPageFactory.containsMasterPage(STANDARD, activePageHeader, activePageFooter))
        {

            final CSSNumericValue headerSize = context.getAllHeaderSize();
            final CSSNumericValue footerSize = context.getAllFooterSize();


            currentMasterPage = masterPageFactory.createMasterPage(STANDARD, activePageHeader, activePageFooter);

//      LOGGER.debug("Created a new master-page: " + currentMasterPage.getStyleName());
View Full Code Here

TOP

Related Classes of org.jfree.layouting.input.style.values.CSSNumericValue

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.