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

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


        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


            {
                outputStream.close();
                storage.closeOutputRepository();
            }

            final CSSNumericValue widthVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getWidth() / 100.0);
            final CSSNumericValue heightVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getHeight() / 100.0);
            final OfficeImage officeImage = new OfficeImage("Pictures/" + name, widthVal, heightVal);
            imageCache.put(imageKey, officeImage);
            return officeImage;
        }
        catch (IOException e)
View Full Code Here

                }
                final byte[] data = bout.toByteArray();
                final Dimension dims = imageService.getImageSize(data);
                final String mimeType = imageService.getMimeType(data);

                final CSSNumericValue widthVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getWidth() / 100.0);
                final CSSNumericValue heightVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getHeight() / 100.0);

                final String filename = copyToOutputRepository(mimeType, data);
                final OfficeImage officeImage = new OfficeImage(filename, widthVal, heightVal);
                imageCache.put(source, officeImage);
                return officeImage;
View Full Code Here

            }
            final byte[] data = bout.toByteArray();

            final Dimension dims = imageService.getImageSize(data);
            final String mimeType = imageService.getMimeType(data);
            final CSSNumericValue widthVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getWidth() / 100.0);
            final CSSNumericValue heightVal = CSSNumericValue.createValue(CSSNumericType.MM, dims.getHeight() / 100.0);

            if (preserveIRI)
            {
                final OfficeImage retval = new OfficeImage(urlString, widthVal, heightVal);
                imageCache.put(uri, retval);
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

            throws IOException, ReportProcessingException
    {
        firstCellSeen = false;
        expectedTableRowCount -= 1;
        final String rowStyle = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME);
        final CSSNumericValue rowHeight = computeRowHeight(rowStyle);
        // LOGGER.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 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.