Examples of AFPPageSegmentSetup


Examples of org.apache.fop.render.afp.extensions.AFPPageSegmentElement.AFPPageSegmentSetup

                String name = lastAttributes.getValue("name");
                if (name != null) {
                    returnedObject.setName(name);
                }
            } else if (AFPElementMapping.INCLUDE_PAGE_SEGMENT.equals(localName)) {
                AFPPageSegmentSetup pageSetupExtn = null;

                pageSetupExtn = new AFPPageSegmentSetup(localName);
                this.returnedObject = pageSetupExtn;

                String name = lastAttributes.getValue("name");
                if (name != null) {
                    returnedObject.setName(name);
                }
                String value = lastAttributes.getValue("value");
                if (value != null && pageSetupExtn != null) {
                    pageSetupExtn.setValue(value);
                }

                String resourceSrc = lastAttributes.getValue("resource-file");
                if (resourceSrc != null && pageSetupExtn != null) {
                    pageSetupExtn.setResourceSrc(resourceSrc);
                }

                if (content.length() > 0 && pageSetupExtn != null) {
                    pageSetupExtn.setContent(content.toString());
                    content.setLength(0); //Reset text buffer (see characters())
                }
            } else {
                AFPPageSetup pageSetupExtn = null;
                if (AFPElementMapping.INVOKE_MEDIUM_MAP.equals(localName)) {
                    this.returnedObject = new AFPInvokeMediumMap();
                } else {
                    pageSetupExtn = new AFPPageSetup(localName);
                    this.returnedObject = pageSetupExtn;
                }
                String name = lastAttributes.getValue(AFPPageSetup.ATT_NAME);
                if (name != null) {
                    returnedObject.setName(name);
                }
                String value = lastAttributes.getValue(AFPPageSetup.ATT_VALUE);
                if (value != null && pageSetupExtn != null) {
                    pageSetupExtn.setValue(value);
                }
                String placement = lastAttributes.getValue(AFPPageSetup.ATT_PLACEMENT);
                if (placement != null && placement.length() > 0) {
                    pageSetupExtn.setPlacement(ExtensionPlacement.fromXMLValue(placement));
                }
                if (content.length() > 0 && pageSetupExtn != null) {
                    pageSetupExtn.setContent(content.toString());
                    content.setLength(0); //Reset text buffer (see characters())
                }
            }

        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.