Package org.apache.fop.fo.extensions

Examples of org.apache.fop.fo.extensions.ExtensionAttachment


    }
   
    private void wrapAndAddExtensionAttachments(List list) {
        Iterator i = list.iterator();
        while (i.hasNext()) {
            ExtensionAttachment attachment = (ExtensionAttachment)i.next();
            addOffDocumentItem(new OffDocumentExtensionAttachment(attachment));
        }
    }
View Full Code Here


    /** @see org.apache.fop.render.Renderer */
    public void processOffDocumentItem(OffDocumentItem oDI) {
        log.debug("Handling OffDocumentItem: " + oDI.getName());
        if (oDI instanceof OffDocumentExtensionAttachment) {
            ExtensionAttachment attachment = ((OffDocumentExtensionAttachment)oDI).getAttachment();
            if (PSSetupCode.CATEGORY.equals(attachment.getCategory())) {
                PSSetupCode setupCode = (PSSetupCode)attachment;
                if (setupCodeList == null) {
                    setupCodeList = new java.util.ArrayList();
                }
                setupCodeList.add(setupCode);
View Full Code Here

                && page.getExtensionAttachments().size() > 0) {
            List list = new java.util.ArrayList();
            //Extract all PSSetupCode instances from the attachment list on the s-p-m
            Iterator i = page.getExtensionAttachments().iterator();
            while (i.hasNext()) {
                ExtensionAttachment attachment = (ExtensionAttachment)i.next();
                if (PSSetupCode.CATEGORY.equals(attachment.getCategory())) {
                    list.add(attachment);
                }
            }
            writeSetupCodeList(list, "PageSetupCode");
        }
View Full Code Here

         * An example of object handled here are ExtensionAttachments.
         * @param obj the Object to be handled.
         */
        protected void handleExternallyGeneratedObject(Object obj) {
            if (areaStack.size() == 0 && obj instanceof ExtensionAttachment) {
                ExtensionAttachment attachment = (ExtensionAttachment)obj;
                if (this.currentPageViewport == null) {
                    this.treeModel.handleOffDocumentItem(
                            new OffDocumentExtensionAttachment(attachment));
                } else {
                    this.currentPageViewport.addExtensionAttachment(attachment);
View Full Code Here

        if (page.getExtensionAttachments() != null
            && page.getExtensionAttachments().size() > 0) {
            //Extract all AFPPageSetup instances from the attachment list on the s-p-m
            Iterator i = page.getExtensionAttachments().iterator();
            while (i.hasNext()) {
                ExtensionAttachment attachment = (ExtensionAttachment)i.next();
                if (AFPPageSetup.CATEGORY.equals(attachment.getCategory())) {
                    AFPPageSetup aps = (AFPPageSetup)attachment;
                    String element = aps.getElementName();
                    if (AFPElementMapping.INCLUDE_PAGE_OVERLAY.equals(element)) {
                        String overlay = aps.getName();
                        if (overlay != null) {
View Full Code Here

     */
    protected void addChildNode(FONode child) throws FOPException {
        if (canHaveMarkers() && child.getNameId() == FO_MARKER) {
            addMarker((Marker) child);
        } else {
            ExtensionAttachment attachment = child.getExtensionAttachment();
            if (attachment != null) {
                /* This removes the element from the normal children,
                 * so no layout manager is being created for them
                 * as they are only additional information.
                 */
 
View Full Code Here

    public void processOffDocumentItem(OffDocumentItem odi) {
        // render Bookmark-Tree
        if (odi instanceof BookmarkData) {
            renderBookmarkTree((BookmarkData) odi);
        } else if (odi instanceof OffDocumentExtensionAttachment) {
            ExtensionAttachment attachment = ((OffDocumentExtensionAttachment)odi).getAttachment();
            if (XMPMetadata.CATEGORY.equals(attachment.getCategory())) {
                renderXMPMetadata((XMPMetadata)attachment);
            }
        }
    }
View Full Code Here

         * An example of object handled here are ExtensionAttachments.
         * @param obj the Object to be handled.
         */
        protected void handleExternallyGeneratedObject(Object obj) {
            if (areaStack.size() == 0 && obj instanceof ExtensionAttachment) {
                ExtensionAttachment attachment = (ExtensionAttachment)obj;
                if (this.currentPageViewport == null) {
                    this.treeModel.handleOffDocumentItem(
                            new OffDocumentExtensionAttachment(attachment));
                } else {
                    this.currentPageViewport.addExtensionAttachment(attachment);
                }
            } else {
                Object o = areaStack.peek();
                if (o instanceof AreaTreeObject && obj instanceof ExtensionAttachment) {
                    AreaTreeObject ato = (AreaTreeObject)o;
                    ExtensionAttachment attachment = (ExtensionAttachment)obj;
                    ato.addExtensionAttachment(attachment);
                } else {
                log.warn("Don't know how to handle externally generated object: " + obj);
            }
        }
View Full Code Here

    /** {@inheritDoc}*/
    protected void addChildNode(FONode child) throws FOPException {
        if (child.getNameId() == FO_MARKER) {
            addMarker((Marker) child);
        } else {
            ExtensionAttachment attachment = child.getExtensionAttachment();
            if (attachment != null) {
                /* This removes the element from the normal children,
                 * so no layout manager is being created for them
                 * as they are only additional information.
                 */
 
View Full Code Here

    }

    private void wrapAndAddExtensionAttachments(List list) {
        Iterator it = list.iterator();
        while (it.hasNext()) {
            ExtensionAttachment attachment = (ExtensionAttachment) it.next();
            addOffDocumentItem(new OffDocumentExtensionAttachment(attachment));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.extensions.ExtensionAttachment

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.