--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
/* $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;
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;
}
/**
- * 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) {
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");
}
/* 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);
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" +
}
/**
- * 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;
+ }
}
-/*-- $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;
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());
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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);
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
+++ /dev/null
-/*-- $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);
- }
-}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
-/*-- $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;
--- /dev/null
+/*-- $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";
+ }
+
+}
+++ /dev/null
-/*-- $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);
- }
-}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
--- /dev/null
+/*-- $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";
+ }
+
+}
-/*
- ============================================================================
- 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
* 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 {
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);
+ }
}