diff options
author | Keiron Liddle <keiron@apache.org> | 2001-07-13 12:36:18 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2001-07-13 12:36:18 +0000 |
commit | dc22b820449a8d0593ce49c870059c28a3baff1b (patch) | |
tree | 0ab57deaa85d0c3609e4d5767314a63c86fdd851 /src | |
parent | 23bd7aff7e6c87e8014c43da759a4808f15e7184 (diff) | |
download | xmlgraphics-fop-dc22b820449a8d0593ce49c870059c28a3baff1b.tar.gz xmlgraphics-fop-dc22b820449a8d0593ce49c870059c28a3baff1b.zip |
added all remaining elements
currently are indicated as not implemented.
removed old elements
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194353 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
24 files changed, 744 insertions, 601 deletions
diff --git a/src/org/apache/fop/fo/ColorProfile.java b/src/org/apache/fop/fo/ColorProfile.java new file mode 100644 index 000000000..2b2a35db5 --- /dev/null +++ b/src/org/apache/fop/fo/ColorProfile.java @@ -0,0 +1,40 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + * The fo:root formatting object. Contains page masters, root extensions, + * page-sequences. + */ +public class ColorProfile extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new ColorProfile(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new ColorProfile.Maker(); + } + + protected ColorProfile(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:color-profile"; + } + +} diff --git a/src/org/apache/fop/fo/Declarations.java b/src/org/apache/fop/fo/Declarations.java new file mode 100644 index 000000000..fa35e3ed5 --- /dev/null +++ b/src/org/apache/fop/fo/Declarations.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class Declarations extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new Declarations(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new Declarations.Maker(); + } + + protected Declarations(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:declarations"; + } + +} diff --git a/src/org/apache/fop/fo/FOTreeBuilder.java b/src/org/apache/fop/fo/FOTreeBuilder.java index f9260583b..cf0b1dfe2 100644 --- a/src/org/apache/fop/fo/FOTreeBuilder.java +++ b/src/org/apache/fop/fo/FOTreeBuilder.java @@ -1,7 +1,7 @@ /* $Id$ * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. - * For details on use and redistribution please refer to the - * LICENSE file included with these sources." + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ package org.apache.fop.fo; @@ -52,81 +52,30 @@ public class FOTreeBuilder extends DefaultHandler implements TreeBuilder { protected FObj rootFObj = null; public BufferManager bufferManager; - - /** + + /** * set of names of formatting objects encountered but unknown */ protected Hashtable unknownFOs = new Hashtable(); - // namespace implementation ideas pinched from John Cowan - // protected static class NSMap { - // String prefix; - // String uri; - // int level; - - // NSMap(String prefix, String uri, int level) { - // this.prefix = prefix; - // this.uri = uri; - // this.level = level; - // } - // } - - // protected int level = 0; - // protected Stack namespaceStack = new Stack(); - - // { - // namespaceStack.push(new NSMap("xml", - // "http://www.w3.org/XML/1998/namespace", - // -1)); - // namespaceStack.push(new NSMap("", "", -1)); - // } - - // protected String findURI(String prefix) { - // for (int i = namespaceStack.size() - 1; i >= 0; i--) { - // NSMap nsMap = (NSMap) (namespaceStack.elementAt(i)); - // if (prefix.equals(nsMap.prefix)) return nsMap.uri; - // } - // return null; - // } - - // protected String mapName(String name) - // throws SAXException { - // int colon = name.indexOf(':'); - // String prefix = ""; - // String localPart = name; - // if (colon != -1) { - // prefix = name.substring(0, colon); - // localPart = name.substring(colon + 1); - // } - // String uri = findURI(prefix); - // if (uri == null) { - // if (prefix.equals("")) { - // return name; - // } else { - // throw new SAXException(new FOPException("Unknown namespace prefix " + prefix)); - // } - // } - // return uri + "^" + localPart; - // } - /** * add a mapping from element name to maker. * * @param namespaceURI namespace URI of formatting object element * @param localName local name of formatting object element * @param maker Maker for class representing formatting object - */ + */ public void addMapping(String namespaceURI, String localName, FObj.Maker maker) { this.fobjTable.put(namespaceURI + "^" + localName, maker); } /** - * add a mapping from element name to maker. - * - * @param namespaceURI namespace URI of formatting object element - * @param localName local name of formatting object element - * @param maker Maker for class representing formatting object + * add a mapping from element name to maker. + * + * @param namespaceURI namespace URI of formatting object element + * @param localName local name of formatting object element + * @param maker Maker for class representing formatting object */ public void addPropertyList(String namespaceURI, Hashtable list) { PropertyListBuilder plb; @@ -142,11 +91,11 @@ public class FOTreeBuilder extends DefaultHandler implements TreeBuilder { } /** - * add a mapping from element name to maker. - * - * @param namespaceURI namespace URI of formatting object element - * @param localName local name of formatting object element - * @param maker Maker for class representing formatting object + * add a mapping from element name to maker. + * + * @param namespaceURI namespace URI of formatting object element + * @param localName local name of formatting object element + * @param maker Maker for class representing formatting object */ public void addElementPropertyList(String namespaceURI, String localName, Hashtable list) { @@ -171,15 +120,11 @@ public class FOTreeBuilder extends DefaultHandler implements TreeBuilder { public void endElement(String uri, String localName, String rawName) { currentFObj.end(); currentFObj = (FObj) currentFObj.getParent(); - // level--; - // while (((NSMap) namespaceStack.peek()).level > level) { - // namespaceStack.pop(); - // } } /** SAX Handler for the start of the document */ public void startDocument() { - rootFObj = null; // allows FOTreeBuilder to be reused + rootFObj = null; // allows FOTreeBuilder to be reused MessageHandler.logln("building formatting object tree"); } @@ -192,21 +137,6 @@ public class FOTreeBuilder extends DefaultHandler implements TreeBuilder { /* the maker for the formatting object started */ FObj.Maker fobjMaker; - // level++; - // int length = attlist.getLength(); - // for (int i = 0; i < length; i++) { - // String att = attlist.getQName(i); - // if (att.equals("xmlns")) { - // namespaceStack.push( new NSMap("", - // attlist.getValue(i), - // level)); - // } else if (att.startsWith("xmlns:")) { - // String value = attlist.getValue(i); - // namespaceStack.push(new NSMap(att.substring(6), value, - // level)); - // } - // } - //String fullName = mapName(rawName); String fullName = uri + "^" + localName; fobjMaker = (FObj.Maker) fobjTable.get(fullName); @@ -238,7 +168,7 @@ public class FOTreeBuilder extends DefaultHandler implements TreeBuilder { if (rootFObj == null) { rootFObj = fobj; - rootFObj.setBufferManager(this.bufferManager); + rootFObj.setBufferManager(this.bufferManager); if (!fobj.getName().equals("fo:root")) { throw new SAXException( new FOPException("Root element must" + @@ -252,28 +182,26 @@ public class FOTreeBuilder extends DefaultHandler implements TreeBuilder { } /** - * format this formatting object tree - * - * @param areaTree the area tree to format into - */ + * format this formatting object tree + * + * @param areaTree the area tree to format into + */ public void format(AreaTree areaTree) throws FOPException { MessageHandler.logln("formatting FOs into areas"); - this.bufferManager.readComplete(); + this.bufferManager.readComplete(); ((Root) this.rootFObj).format(areaTree); } - public void reset() - { - currentFObj = null; - rootFObj = null; + public void reset() { + currentFObj = null; + rootFObj = null; } - - public boolean hasData() - { - return (rootFObj != null); + + public boolean hasData() { + return (rootFObj != null); } public void setBufferManager(BufferManager bufferManager) { - this.bufferManager = bufferManager; - } + this.bufferManager = bufferManager; + } } diff --git a/src/org/apache/fop/fo/FObjMixed.java b/src/org/apache/fop/fo/FObjMixed.java index 35f412736..3b40d1310 100644 --- a/src/org/apache/fop/fo/FObjMixed.java +++ b/src/org/apache/fop/fo/FObjMixed.java @@ -1,52 +1,7 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - +/* $Id$ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ package org.apache.fop.fo; diff --git a/src/org/apache/fop/fo/StandardElementMapping.java b/src/org/apache/fop/fo/StandardElementMapping.java index 7dd2cb62f..201a2bf77 100644 --- a/src/org/apache/fop/fo/StandardElementMapping.java +++ b/src/org/apache/fop/fo/StandardElementMapping.java @@ -19,60 +19,88 @@ public class StandardElementMapping implements ElementMapping { String uri = "http://www.w3.org/1999/XSL/Format"; + // Declarations and Pagination and Layout Formatting Objects builder.addMapping(uri, "root", Root.maker()); + builder.addMapping(uri, "declarations", Declarations.maker()); + builder.addMapping(uri, "color-profile", ColorProfile.maker()); + builder.addMapping(uri, "page-sequence", PageSequence.maker()); builder.addMapping(uri, "layout-master-set", LayoutMasterSet.maker()); - builder.addMapping(uri, "simple-page-master", - SimplePageMaster.maker()); - builder.addMapping(uri, "region-body", RegionBody.maker()); - builder.addMapping(uri, "region-before", RegionBefore.maker()); - builder.addMapping(uri, "region-after", RegionAfter.maker()); - builder.addMapping(uri, "region-start", RegionStart.maker()); - builder.addMapping(uri, "region-end", RegionEnd.maker()); - builder.addMapping(uri, "page-sequence", PageSequence.maker()); builder.addMapping(uri, "page-sequence-master", PageSequenceMaster.maker()); builder.addMapping(uri, "single-page-master-reference", SinglePageMasterReference.maker()); builder.addMapping(uri, "repeatable-page-master-reference", RepeatablePageMasterReference.maker()); - builder.addMapping(uri, "conditional-page-master-reference", - ConditionalPageMasterReference.maker()); builder.addMapping(uri, "repeatable-page-master-alternatives", RepeatablePageMasterAlternatives.maker()); + builder.addMapping(uri, "conditional-page-master-reference", + ConditionalPageMasterReference.maker()); + builder.addMapping(uri, "simple-page-master", + SimplePageMaster.maker()); + builder.addMapping(uri, "region-body", RegionBody.maker()); + builder.addMapping(uri, "region-before", RegionBefore.maker()); + builder.addMapping(uri, "region-after", RegionAfter.maker()); + builder.addMapping(uri, "region-start", RegionStart.maker()); + builder.addMapping(uri, "region-end", RegionEnd.maker()); builder.addMapping(uri, "flow", Flow.maker()); builder.addMapping(uri, "static-content", StaticContent.maker()); + builder.addMapping(uri, "title", Title.maker()); + + // Block-level Formatting Objects builder.addMapping(uri, "block", Block.maker()); builder.addMapping(uri, "block-container", BlockContainer.maker()); - builder.addMapping(uri, "list-block", ListBlock.maker()); - builder.addMapping(uri, "list-item", ListItem.maker()); - builder.addMapping(uri, "list-item-label", ListItemLabel.maker()); - builder.addMapping(uri, "list-item-body", ListItemBody.maker()); + + // Inline-level Formatting Objects + builder.addMapping(uri, "bidi-override", BidiOverride.maker()); + builder.addMapping(uri, "character", + org.apache.fop.fo.flow.Character.maker()); + builder.addMapping(uri, "initial-property-set", InitialPropertySet.maker()); + builder.addMapping(uri, "external-graphic", + ExternalGraphic.maker()); + builder.addMapping(uri, "instream-foreign-object", + InstreamForeignObject.maker()); + builder.addMapping(uri, "inline", Inline.maker()); + builder.addMapping(uri, "inline-container", InlineContainer.maker()); + builder.addMapping(uri, "leader", Leader.maker()); builder.addMapping(uri, "page-number", PageNumber.maker()); builder.addMapping(uri, "page-number-citation", PageNumberCitation.maker()); - builder.addMapping(uri, "display-sequence", - DisplaySequence.maker()); - builder.addMapping(uri, "inline", Inline.maker()); - builder.addMapping(uri, "external-graphic", - ExternalGraphic.maker()); + + // Formatting Objects for Tables + builder.addMapping(uri, "table-and-caption", TableAndCaption.maker()); builder.addMapping(uri, "table", Table.maker()); builder.addMapping(uri, "table-column", TableColumn.maker()); + builder.addMapping(uri, "table-caption", TableCaption.maker()); builder.addMapping(uri, "table-header", TableHeader.maker()); - builder.addMapping(uri, "table-body", TableBody.maker()); builder.addMapping(uri, "table-footer", TableFooter.maker()); + builder.addMapping(uri, "table-body", TableBody.maker()); builder.addMapping(uri, "table-row", TableRow.maker()); builder.addMapping(uri, "table-cell", TableCell.maker()); + + // Formatting Objects for Lists + builder.addMapping(uri, "list-block", ListBlock.maker()); + builder.addMapping(uri, "list-item", ListItem.maker()); + builder.addMapping(uri, "list-item-body", ListItemBody.maker()); + builder.addMapping(uri, "list-item-label", ListItemLabel.maker()); + + // Dynamic Effects: Link and Multi Formatting Objects builder.addMapping(uri, "basic-link", BasicLink.maker()); - builder.addMapping(uri, "instream-foreign-object", - InstreamForeignObject.maker()); - builder.addMapping(uri, "leader", Leader.maker()); - builder.addMapping(uri, "character", - org.apache.fop.fo.flow.Character.maker()); + builder.addMapping(uri, "multi-switch", MultiSwitch.maker()); + builder.addMapping(uri, "multi-case", MultiCase.maker()); + builder.addMapping(uri, "multi-toggle", MultiToggle.maker()); + builder.addMapping(uri, "multi-properties", MultiProperties.maker()); + builder.addMapping(uri, "multi-property-set", MultiPropertySet.maker()); + + // Out-of-Line Formatting Objects + builder.addMapping(uri, "float", org.apache.fop.fo.flow.Float.maker()); builder.addMapping(uri, "footnote", Footnote.maker()); builder.addMapping(uri, "footnote-body", FootnoteBody.maker()); - builder.addMapping(uri, "wrapper", Wrapper.maker()); + // Other Formatting Objects + builder.addMapping(uri, "wrapper", Wrapper.maker()); + builder.addMapping(uri, "marker", Marker.maker()); + builder.addMapping(uri, "retrieve-marker", RetrieveMarker.maker()); builder.addPropertyList(uri, FOPropertyMapping.getGenericMappings()); diff --git a/src/org/apache/fop/fo/Title.java b/src/org/apache/fop/fo/Title.java new file mode 100644 index 000000000..f14bb8412 --- /dev/null +++ b/src/org/apache/fop/fo/Title.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class Title extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new Title(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new Title.Maker(); + } + + protected Title(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:title"; + } + +} diff --git a/src/org/apache/fop/fo/ToBeImplementedElement.java b/src/org/apache/fop/fo/ToBeImplementedElement.java new file mode 100644 index 000000000..53aa8040a --- /dev/null +++ b/src/org/apache/fop/fo/ToBeImplementedElement.java @@ -0,0 +1,31 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.Area; +import org.apache.fop.apps.FOPException; + +/** + */ +public class ToBeImplementedElement extends FObj { + + protected ToBeImplementedElement(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + } + + public Status layout(Area area) throws FOPException { + MessageHandler.logln("This element \"" + this.name + "\" is not yet implemented."); + return new Status(Status.OK); + } + +} diff --git a/src/org/apache/fop/fo/flow/BidiOverride.java b/src/org/apache/fop/fo/flow/BidiOverride.java new file mode 100644 index 000000000..5fd7227e0 --- /dev/null +++ b/src/org/apache/fop/fo/flow/BidiOverride.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class BidiOverride extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new BidiOverride(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new BidiOverride.Maker(); + } + + protected BidiOverride(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:bidi-override"; + } + +} diff --git a/src/org/apache/fop/fo/flow/DisplaySequence.java b/src/org/apache/fop/fo/flow/DisplaySequence.java deleted file mode 100644 index 79adfd79d..000000000 --- a/src/org/apache/fop/fo/flow/DisplaySequence.java +++ /dev/null @@ -1,99 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ - -package org.apache.fop.fo.flow; - -// FOP -import org.apache.fop.fo.*; -import org.apache.fop.layout.Area; -import org.apache.fop.apps.FOPException; - -// Java -import java.util.Enumeration; - -public class DisplaySequence extends FObj { - - public static class Maker extends FObj.Maker { - public FObj make(FObj parent, PropertyList propertyList) - throws FOPException { - return new DisplaySequence(parent, propertyList); - } - } - - public static FObj.Maker maker() { - return new DisplaySequence.Maker(); - } - - public DisplaySequence(FObj parent, PropertyList propertyList) { - super(parent, propertyList); - this.name = "fo:display-sequence"; - } - - public Status layout(Area area) throws FOPException { - if (this.marker == START) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); - this.marker = 0; - } - // this is such common code, perhaps it should be in the super class - int numChildren = this.children.size(); - for (int i = this.marker; i < numChildren; i++) { - FObj fo = (FObj) children.elementAt(i); - Status status; - if ((status = fo.layout(area)).isIncomplete()) { - this.marker = i; - } - return status; - } - return new Status(Status.OK); - } -} diff --git a/src/org/apache/fop/fo/flow/Float.java b/src/org/apache/fop/fo/flow/Float.java new file mode 100644 index 000000000..00f769dc4 --- /dev/null +++ b/src/org/apache/fop/fo/flow/Float.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class Float extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new Float(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new Float.Maker(); + } + + protected Float(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:float"; + } + +} diff --git a/src/org/apache/fop/fo/flow/InitialPropertySet.java b/src/org/apache/fop/fo/flow/InitialPropertySet.java new file mode 100644 index 000000000..26ae86e1c --- /dev/null +++ b/src/org/apache/fop/fo/flow/InitialPropertySet.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class InitialPropertySet extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new InitialPropertySet(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new InitialPropertySet.Maker(); + } + + protected InitialPropertySet(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:initial-property-set"; + } + +} diff --git a/src/org/apache/fop/fo/flow/Inline.java b/src/org/apache/fop/fo/flow/Inline.java index 598d4dbe4..2730640ef 100644 --- a/src/org/apache/fop/fo/flow/Inline.java +++ b/src/org/apache/fop/fo/flow/Inline.java @@ -1,52 +1,7 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - +/* $Id$ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ package org.apache.fop.fo.flow; diff --git a/src/org/apache/fop/fo/flow/InlineContainer.java b/src/org/apache/fop/fo/flow/InlineContainer.java new file mode 100644 index 000000000..3a05b85a5 --- /dev/null +++ b/src/org/apache/fop/fo/flow/InlineContainer.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class InlineContainer extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new InlineContainer(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new InlineContainer.Maker(); + } + + protected InlineContainer(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:inline-container"; + } + +} diff --git a/src/org/apache/fop/fo/flow/InlineGraphic.java b/src/org/apache/fop/fo/flow/InlineGraphic.java deleted file mode 100644 index 68913fd1f..000000000 --- a/src/org/apache/fop/fo/flow/InlineGraphic.java +++ /dev/null @@ -1,206 +0,0 @@ -/*-- $Id$ -- - - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - - */ -/* Modified by Eric SCHAEFFER */ - -package org.apache.fop.fo.flow; - -// FOP -import org.apache.fop.fo.*; -import org.apache.fop.messaging.MessageHandler; -import org.apache.fop.fo.properties.*; -import org.apache.fop.layout.Area; -import org.apache.fop.layout.BlockArea; -import org.apache.fop.layout.FontState; -import org.apache.fop.apps.FOPException; -import org.apache.fop.image.*; - -// Java -import java.util.Enumeration; -import java.util.Hashtable; -import java.net.URL; -import java.net.MalformedURLException; - -public class InlineGraphic extends FObj { - - public static class Maker extends FObj.Maker { - public FObj make(FObj parent, PropertyList propertyList) - throws FOPException { - return new InlineGraphic(parent, propertyList); - } - } - - public static FObj.Maker maker() { - return new InlineGraphic.Maker(); - } - - int align; - int startIndent; - int endIndent; - int spaceBefore; - int spaceAfter; - String href; - int height; - int width; - String id; - - ImageArea imageArea; - - public InlineGraphic(FObj parent, PropertyList propertyList) { - super(parent, propertyList); - this.name = "fo:inline-graphic"; - } - - public Status layout(Area area) throws FOPException { - - if (this.marker == START) { - // FIXME - this.align = this.properties.get("text-align").getEnum(); - - this.startIndent = - this.properties.get("start-indent").getLength().mvalue(); - this.endIndent = - this.properties.get("end-indent").getLength().mvalue(); - - this.spaceBefore = - this.properties.get("space-before.optimum").getLength().mvalue(); - this.spaceAfter = - this.properties.get("space-after.optimum").getLength().mvalue(); - - this.href = this.properties.get("href").getString(); - - this.width = - this.properties.get("width").getLength().mvalue(); - - this.height = - this.properties.get("height").getLength().mvalue(); - this.id = this.properties.get("id").getString(); - - area.getIDReferences().createID(id); - - if (area instanceof BlockArea) { - area.end(); - } - - if (this.isInTableCell) { - startIndent += forcedStartOffset; - endIndent = area.getAllocationWidth() - forcedWidth - - forcedStartOffset; - } - - this.marker = 0; - } - - try { - FopImage img = FopImageFactory.Make(href); - // if width / height needs to be computed - if ((width == 0) || (height == 0)) { - // aspect ratio - double imgWidth = img.getWidth(); - double imgHeight = img.getHeight(); - if ((width == 0) && (height == 0)) { - width = (int) ((imgWidth * 1000d) / 2d); - height = (int) ((imgHeight * 1000d) / 2d); - } else if (height == 0) { - height = (int) ((imgHeight * ((double) width)) / imgWidth); - } else if (width == 0) { - width = (int) ((imgWidth * ((double) height)) / imgHeight); - } -//MessageHandler.errorln("DisplayGraphic: imgW=" + imgWidth + " imgH=" + imgHeight + " w=" + width + " h=" + height); - } - - if (area.spaceLeft() < (height + spaceBefore)) { - return new Status(Status.AREA_FULL_NONE); - } - - this.imageArea = new ImageArea( - propMgr.getFontState(area.getFontInfo()), - img, - area.getAllocationWidth(), - width, - height, - startIndent, - endIndent, - align - ); - - if ((spaceBefore != 0) && (this.marker == 0)) { - area.addDisplaySpace(spaceBefore); - } - - if (marker == 0) { - // configure id - area.getIDReferences().configureID(id,area); - } - - imageArea.start(); - imageArea.end(); - area.addChild(imageArea); - area.increaseHeight(imageArea.getHeight()); - - if (spaceAfter != 0) { - area.addDisplaySpace(spaceAfter); - } - - } catch (MalformedURLException urlex) { - // bad URL -MessageHandler.errorln("Error while creating area : " + urlex.getMessage()); - } catch (FopImageException imgex) { - // image error -MessageHandler.errorln("Error while creating area : " + imgex.getMessage()); - } - - if (area instanceof BlockArea) { - area.start(); - } - - return new Status(Status.OK); - } -} diff --git a/src/org/apache/fop/fo/flow/Marker.java b/src/org/apache/fop/fo/flow/Marker.java new file mode 100644 index 000000000..fc86e16be --- /dev/null +++ b/src/org/apache/fop/fo/flow/Marker.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class Marker extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new Marker(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new Marker.Maker(); + } + + protected Marker(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:marker"; + } + +} diff --git a/src/org/apache/fop/fo/flow/MultiCase.java b/src/org/apache/fop/fo/flow/MultiCase.java new file mode 100644 index 000000000..ff7c9ae38 --- /dev/null +++ b/src/org/apache/fop/fo/flow/MultiCase.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class MultiCase extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new MultiCase(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new MultiCase.Maker(); + } + + protected MultiCase(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:multi-case"; + } + +} diff --git a/src/org/apache/fop/fo/flow/MultiProperties.java b/src/org/apache/fop/fo/flow/MultiProperties.java new file mode 100644 index 000000000..d2dcf3fb5 --- /dev/null +++ b/src/org/apache/fop/fo/flow/MultiProperties.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class MultiProperties extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new MultiProperties(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new MultiProperties.Maker(); + } + + protected MultiProperties(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:multi-properties"; + } + +} diff --git a/src/org/apache/fop/fo/flow/MultiPropertySet.java b/src/org/apache/fop/fo/flow/MultiPropertySet.java new file mode 100644 index 000000000..88a2baa6a --- /dev/null +++ b/src/org/apache/fop/fo/flow/MultiPropertySet.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class MultiPropertySet extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new MultiPropertySet(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new MultiPropertySet.Maker(); + } + + protected MultiPropertySet(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:multi-property-set"; + } + +} diff --git a/src/org/apache/fop/fo/flow/MultiSwitch.java b/src/org/apache/fop/fo/flow/MultiSwitch.java new file mode 100644 index 000000000..3252739ae --- /dev/null +++ b/src/org/apache/fop/fo/flow/MultiSwitch.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class MultiSwitch extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new MultiSwitch(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new MultiSwitch.Maker(); + } + + protected MultiSwitch(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:multi-switch"; + } + +} diff --git a/src/org/apache/fop/fo/flow/MultiToggle.java b/src/org/apache/fop/fo/flow/MultiToggle.java new file mode 100644 index 000000000..f8d8c32d5 --- /dev/null +++ b/src/org/apache/fop/fo/flow/MultiToggle.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class MultiToggle extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new MultiToggle(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new MultiToggle.Maker(); + } + + protected MultiToggle(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:multi-toggle"; + } + +} diff --git a/src/org/apache/fop/fo/flow/RetrieveMarker.java b/src/org/apache/fop/fo/flow/RetrieveMarker.java new file mode 100644 index 000000000..9f1f35369 --- /dev/null +++ b/src/org/apache/fop/fo/flow/RetrieveMarker.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class RetrieveMarker extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new RetrieveMarker(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new RetrieveMarker.Maker(); + } + + protected RetrieveMarker(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:retrieve-marker"; + } + +} diff --git a/src/org/apache/fop/fo/flow/TableAndCaption.java b/src/org/apache/fop/fo/flow/TableAndCaption.java new file mode 100644 index 000000000..d2c97b2df --- /dev/null +++ b/src/org/apache/fop/fo/flow/TableAndCaption.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class TableAndCaption extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new TableAndCaption(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new TableAndCaption.Maker(); + } + + protected TableAndCaption(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:table-and-caption"; + } + +} diff --git a/src/org/apache/fop/fo/flow/TableCaption.java b/src/org/apache/fop/fo/flow/TableCaption.java new file mode 100644 index 000000000..1679c2bc5 --- /dev/null +++ b/src/org/apache/fop/fo/flow/TableCaption.java @@ -0,0 +1,38 @@ +/*-- $Id$ -- + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. + */ + +package org.apache.fop.fo.flow; + +// FOP +import org.apache.fop.fo.*; +import org.apache.fop.messaging.MessageHandler; +import org.apache.fop.fo.flow.*; +import org.apache.fop.fo.properties.*; +import org.apache.fop.layout.AreaTree; +import org.apache.fop.apps.FOPException; + +/** + */ +public class TableCaption extends ToBeImplementedElement { + + public static class Maker extends FObj.Maker { + public FObj make(FObj parent, + PropertyList propertyList) throws FOPException { + return new TableCaption(parent, propertyList); + } + } + + public static FObj.Maker maker() { + return new TableCaption.Maker(); + } + + protected TableCaption(FObj parent, + PropertyList propertyList) throws FOPException { + super(parent, propertyList); + this.name = "fo:table-caption"; + } + +} diff --git a/src/org/apache/fop/fo/flow/Wrapper.java b/src/org/apache/fop/fo/flow/Wrapper.java index 47eb05032..3081f8f66 100644 --- a/src/org/apache/fop/fo/flow/Wrapper.java +++ b/src/org/apache/fop/fo/flow/Wrapper.java @@ -1,54 +1,9 @@ -/* - ============================================================================ - The Apache Software License, Version 1.1 - ============================================================================ - - Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - - Redistribution and use in source and binary forms, with or without modifica- - tion, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. The end-user documentation included with the redistribution, if any, must - include the following acknowledgment: "This product includes software - developed by the Apache Software Foundation (http://www.apache.org/)." - Alternately, this acknowledgment may appear in the software itself, if - and wherever such third-party acknowledgments normally appear. - - 4. The names "FOP" and "Apache Software Foundation" must not be used to - endorse or promote products derived from this software without prior - written permission. For written permission, please contact - apache@apache.org. - - 5. Products derived from this software may not be called "Apache", nor may - "Apache" appear in their name, without prior written permission of the - Apache Software Foundation. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - This software consists of voluntary contributions made by many individuals - on behalf of the Apache Software Foundation and was originally created by - James Tauber <jtauber@jtauber.com>. For more information on the Apache - Software Foundation, please see <http://www.apache.org/>. - +/* $Id$ + * Copyright (C) 2001 The Apache Software Foundation. All rights reserved. + * For details on use and redistribution please refer to the + * LICENSE file included with these sources. */ - package org.apache.fop.fo.flow; // FOP @@ -61,8 +16,10 @@ import org.apache.fop.layout.*; * Implementation for fo:wrapper formatting object. * The wrapper object serves as * a property holder for it's children objects. + * + * Content: (#PCDATA|%inline;|%block;)* + * Properties: id */ - public class Wrapper extends FObjMixed { public static class Maker extends FObj.Maker { @@ -82,26 +39,10 @@ public class Wrapper extends FObjMixed { super(parent, propertyList); // check that this occurs inside an fo:flow } - - - public Status layout(Area area) - throws FOPException - { - int numChildren = this.children.size(); - for (int i=((marker != START)?marker:0) ; i < numChildren; i++) { - FONode child= (FONode)children.elementAt(i); - if ((child instanceof FObj)) { - Status status = ((FObj)child).layout(area); - if (status.isIncomplete()) { - this.marker = i; - return status; - } - } - } - return new Status(Status.OK); - - } - + protected void addCharacters(char data[], int start, int length) { + FOText ft = new FOText(data,start,length, this); + children.addElement(ft); + } } |