From b9f0d059ab94b554d1f1cb00371b6f35a880405a Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Tue, 7 May 2002 16:08:56 +0000 Subject: [PATCH] Removed for experimental environment git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@194796 13f79535-47bb-0310-9956-ffa450edef68 --- .../extensions/ExtensionElementMapping.java | 37 ------ .../apache/fop/extensions/ExtensionObj.java | 54 --------- src/org/apache/fop/extensions/Label.java | 40 ------- src/org/apache/fop/extensions/Outline.java | 110 ------------------ 4 files changed, 241 deletions(-) delete mode 100644 src/org/apache/fop/extensions/ExtensionElementMapping.java delete mode 100644 src/org/apache/fop/extensions/ExtensionObj.java delete mode 100644 src/org/apache/fop/extensions/Label.java delete mode 100644 src/org/apache/fop/extensions/Outline.java diff --git a/src/org/apache/fop/extensions/ExtensionElementMapping.java b/src/org/apache/fop/extensions/ExtensionElementMapping.java deleted file mode 100644 index 02e5c4275..000000000 --- a/src/org/apache/fop/extensions/ExtensionElementMapping.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * $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.extensions; - -import org.apache.fop.fo.*; -import org.apache.fop.fo.properties.ExtensionPropertyMapping; -import org.apache.fop.fo.TreeBuilder; - -import java.util.Enumeration; -import java.util.Hashtable; - -public class ExtensionElementMapping implements ElementMapping { - - public static final String URI = "http://xml.apache.org/fop/extensions"; - - public void addToBuilder(TreeBuilder builder) { - builder.addMapping(URI, "outline", Outline.maker()); - builder.addMapping(URI, "label", Label.maker()); - - - builder.addPropertyList(ExtensionElementMapping.URI, - ExtensionPropertyMapping.getGenericMappings()); - /* Add any element mappings */ - for (Enumeration e = ExtensionPropertyMapping.getElementMappings(); - e.hasMoreElements(); ) { - String elem = (String)e.nextElement(); - builder.addElementPropertyList(ExtensionElementMapping.URI, elem, - ExtensionPropertyMapping.getElementMapping(elem)); - } - } - -} diff --git a/src/org/apache/fop/extensions/ExtensionObj.java b/src/org/apache/fop/extensions/ExtensionObj.java deleted file mode 100644 index 9cfc091ef..000000000 --- a/src/org/apache/fop/extensions/ExtensionObj.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $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.extensions; - -import org.apache.fop.fo.*; -import org.apache.fop.layout.*; -import org.apache.fop.apps.FOPException; - -/** - * base class for extension objects - */ -public abstract class ExtensionObj extends FObj { - - /** - * - * @param parent the parent formatting object - * @param propertyList the explicit properties of this object - */ - public ExtensionObj(FObj parent, PropertyList propertyList) { - super(parent, propertyList); - } - - /** - * Called for extensions within a page sequence or flow. These extensions - * are allowed to generate visible areas within the layout. - * - * - * @param area - */ - public Status layout(Area area) throws FOPException { - ExtensionArea extArea = new ExtensionArea(this); - area.addChild(extArea); - return new Status(Status.OK); - } - - - /** - * Called for root extensions. Root extensions aren't allowed to generate - * any visible areas. They are used for extra items that don't show up in - * the page layout itself. For example: pdf outlines - * - * @param areaTree - */ - public void format(AreaTree areaTree) throws FOPException { - ExtensionArea extArea = new ExtensionArea(this); - areaTree.addExtension(this); - } - -} diff --git a/src/org/apache/fop/extensions/Label.java b/src/org/apache/fop/extensions/Label.java deleted file mode 100644 index aa6bf1c31..000000000 --- a/src/org/apache/fop/extensions/Label.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * $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.extensions; - -import org.apache.fop.fo.*; - - -public class Label extends ExtensionObj { - private String _label = ""; - - public static class Maker extends FObj.Maker { - public FObj make(FObj parent, PropertyList propertyList) { - return new Label(parent, propertyList); - } - - } - - public static FObj.Maker maker() { - return new Label.Maker(); - } - - public Label(FObj parent, PropertyList propertyList) { - super(parent, propertyList); - } - - protected void addCharacters(char data[], int start, int end) { - _label += new String(data, start, end - start); - } - - public String toString() { - return _label; - } - - -} diff --git a/src/org/apache/fop/extensions/Outline.java b/src/org/apache/fop/extensions/Outline.java deleted file mode 100644 index 136bc2155..000000000 --- a/src/org/apache/fop/extensions/Outline.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * $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.extensions; - -import org.apache.fop.fo.*; -import org.apache.fop.pdf.PDFGoTo; -import org.apache.fop.pdf.PDFAction; -import org.apache.fop.datatypes.IDReferences; -import org.apache.fop.messaging.MessageHandler; - -import java.util.*; - - -public class Outline extends ExtensionObj { - private Label _label; - private Vector _outlines = new Vector(); - - private String _internalDestination; - private String _externalDestination; - - /** - * The parent outline object if it exists - */ - private Outline _parentOutline; - - /** - * an opaque renderer context object, e.g. PDFOutline for PDFRenderer - */ - private Object _rendererObject; - - - public static class Maker extends FObj.Maker { - public FObj make(FObj parent, PropertyList propertyList) { - return new Outline(parent, propertyList); - } - - } - - public static FObj.Maker maker() { - return new Outline.Maker(); - } - - public Outline(FObj parent, PropertyList propertyList) { - super(parent, propertyList); - - _internalDestination = - this.properties.get("internal-destination").getString(); - _externalDestination = - this.properties.get("external-destination").getString(); - if (_externalDestination != null &&!_externalDestination.equals("")) { - MessageHandler.errorln("WARNING: fox:outline external-destination not supported currently."); - } - - if (_internalDestination == null || _internalDestination.equals("")) { - MessageHandler.errorln("WARNING: fox:outline requires an internal-destination."); - } - - for (FONode node = getParent(); node != null; - node = node.getParent()) { - if (node instanceof Outline) { - _parentOutline = (Outline)node; - break; - } - } - - } - - protected void addChild(FONode obj) { - if (obj instanceof Label) { - _label = (Label)obj; - } else if (obj instanceof Outline) { - _outlines.addElement(obj); - } - super.addChild(obj); - } - - - public void setRendererObject(Object o) { - _rendererObject = o; - } - - public Object getRendererObject() { - return _rendererObject; - } - - public Outline getParentOutline() { - return _parentOutline; - } - - public Label getLabel() { - return _label == null ? new Label(this, this.properties) : _label; - } - - public Vector getOutlines() { - return _outlines; - } - - public String getInternalDestination() { - return _internalDestination; - } - - - -} - -- 2.39.5