aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/render/AbstractRenderer.java31
-rw-r--r--src/java/org/apache/fop/render/PrintRenderer.java10
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRenderer.java8
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java22
-rw-r--r--src/java/org/apache/fop/render/ps/PSRenderer.java10
-rw-r--r--src/java/org/apache/fop/render/svg/SVGRenderer.java6
-rw-r--r--src/java/org/apache/fop/render/txt/TXTRenderer.java9
-rw-r--r--src/java/org/apache/fop/render/xml/XMLRenderer.java6
8 files changed, 28 insertions, 74 deletions
diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java
index ff6e516ed..3e27bd5d6 100644
--- a/src/java/org/apache/fop/render/AbstractRenderer.java
+++ b/src/java/org/apache/fop/render/AbstractRenderer.java
@@ -53,13 +53,13 @@ package org.apache.fop.render;
// Java
import java.awt.geom.Rectangle2D;
import java.io.IOException;
+import java.io.OutputStream;
import java.util.Map;
import java.util.List;
import java.util.Iterator;
// FOP
import org.apache.fop.apps.FOPException;
-import org.apache.fop.fo.FOUserAgent;
import org.apache.fop.area.Area;
import org.apache.fop.area.BeforeFloat;
import org.apache.fop.area.Block;
@@ -87,6 +87,8 @@ import org.apache.fop.area.inline.Space;
import org.apache.fop.area.inline.Viewport;
import org.apache.fop.area.inline.Word;
import org.apache.fop.area.inline.Character;
+import org.apache.fop.fo.FOUserAgent;
+import org.apache.fop.layout.FontInfo;
// Avalon
import org.apache.avalon.framework.logger.AbstractLogEnabled;
@@ -108,6 +110,16 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
protected FOUserAgent userAgent;
/**
+ * producer (usually "FOP")
+ */
+ protected String producer = "FOP";
+
+ /**
+ * creator of document
+ */
+ protected String creator = null;
+
+ /**
* renderer configuration
*/
protected Map options;
@@ -146,14 +158,19 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
}
/** @see org.apache.fop.render.Renderer */
- public void setProducer(String producer) {
+ public void setProducer(String inProducer) {
+ producer = inProducer;
}
/** @see org.apache.fop.render.Renderer */
- public void setCreator(String creator) {
+ public void setCreator(String inCreator) {
+ creator = inCreator;
}
/** @see org.apache.fop.render.Renderer */
+ public abstract void setupFontInfo(FontInfo fontInfo);
+
+ /** @see org.apache.fop.render.Renderer */
public void setUserAgent(FOUserAgent agent) {
userAgent = agent;
}
@@ -163,6 +180,14 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
options = opt;
}
+ /** @see org.apache.fop.render.Renderer */
+ public void startRenderer(OutputStream outputStream)
+ throws IOException { }
+
+ /** @see org.apache.fop.render.Renderer */
+ public void stopRenderer()
+ throws IOException { }
+
/**
* Check if this renderer supports out of order rendering. If this renderer
* supports out of order rendering then it means that the pages that are
diff --git a/src/java/org/apache/fop/render/PrintRenderer.java b/src/java/org/apache/fop/render/PrintRenderer.java
index ad21c38be..bd4cfedc5 100644
--- a/src/java/org/apache/fop/render/PrintRenderer.java
+++ b/src/java/org/apache/fop/render/PrintRenderer.java
@@ -56,8 +56,6 @@ import org.apache.fop.layout.FontInfo;
// Java
import java.util.List;
-import java.io.IOException;
-import java.io.OutputStream;
/** Abstract base class of "Print" type renderers. */
public abstract class PrintRenderer extends AbstractRenderer {
@@ -78,12 +76,4 @@ public abstract class PrintRenderer extends AbstractRenderer {
FontSetup.setup(fontInfo, fontList);
}
- /** @see org.apache.fop.render.Renderer */
- public void startRenderer(OutputStream outputStream)
- throws IOException { }
-
- /** @see org.apache.fop.render.Renderer */
- public void stopRenderer()
- throws IOException { }
-
}
diff --git a/src/java/org/apache/fop/render/pcl/PCLRenderer.java b/src/java/org/apache/fop/render/pcl/PCLRenderer.java
index fe738e6d8..a717469cd 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRenderer.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRenderer.java
@@ -91,14 +91,6 @@ public class PCLRenderer extends PrintRenderer {
public PCLRenderer() {
}
- /**
- * set the PCL document's producer
- *
- * @param producer string indicating application producing PCL
- */
- public void setProducer(String producer) {
- }
-
public void setFont(String name, float size) {
int fontcode = 0;
if (name.length() > 1 && name.charAt(0) == 'F') {
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index 9fa035d52..3fd9a224c 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -161,10 +161,6 @@ public class PDFRenderer extends PrintRenderer {
/** Page viewport references */
protected Map pvReferences = new java.util.HashMap();
- private String producer = "FOP";
-
- private String creator = null;
-
/**
* The output stream to write the document to
*/
@@ -256,24 +252,6 @@ public class PDFRenderer extends PrintRenderer {
}
/**
- * Set the document creator.
- *
- * @param creator string indicating application that is creating the document
- */
- public void setCreator(String creator) {
- this.creator = creator;
- }
-
- /**
- * Set the PDF document's producer.
- *
- * @param producer string indicating application producing PDF
- */
- public void setProducer(String producer) {
- this.producer = producer;
- }
-
- /**
* @see org.apache.fop.render.Renderer#setUserAgent(FOUserAgent)
*/
public void setUserAgent(FOUserAgent agent) {
diff --git a/src/java/org/apache/fop/render/ps/PSRenderer.java b/src/java/org/apache/fop/render/ps/PSRenderer.java
index 968c51445..191f46ee3 100644
--- a/src/java/org/apache/fop/render/ps/PSRenderer.java
+++ b/src/java/org/apache/fop/render/ps/PSRenderer.java
@@ -107,7 +107,6 @@ public class PSRenderer extends AbstractRenderer {
public static final String MIME_TYPE = "application/postscript";
/** The application producing the PostScript */
- protected String producer;
private int currentPageNumber = 0;
private boolean enableComments = true;
@@ -134,15 +133,6 @@ public class PSRenderer extends AbstractRenderer {
}
/**
- * Set the document's producer
- *
- * @param producer string indicating application producing the PostScript
- */
- public void setProducer(String producer) {
- this.producer = producer;
- }
-
- /**
* @see org.apache.fop.render.Renderer#setUserAgent(FOUserAgent)
*/
public void setUserAgent(FOUserAgent agent) {
diff --git a/src/java/org/apache/fop/render/svg/SVGRenderer.java b/src/java/org/apache/fop/render/svg/SVGRenderer.java
index 598a6b0ee..9936087c5 100644
--- a/src/java/org/apache/fop/render/svg/SVGRenderer.java
+++ b/src/java/org/apache/fop/render/svg/SVGRenderer.java
@@ -175,12 +175,6 @@ public class SVGRenderer extends AbstractRenderer implements XMLHandler {
}
/**
- * @see org.apache.fop.render.Renderer#setProducer(String)
- */
- public void setProducer(String producer) {
- }
-
- /**
* @see org.apache.fop.render.Renderer#startRenderer(OutputStream)
*/
public void startRenderer(OutputStream outputStream)
diff --git a/src/java/org/apache/fop/render/txt/TXTRenderer.java b/src/java/org/apache/fop/render/txt/TXTRenderer.java
index df610d994..2da63fb1a 100644
--- a/src/java/org/apache/fop/render/txt/TXTRenderer.java
+++ b/src/java/org/apache/fop/render/txt/TXTRenderer.java
@@ -104,15 +104,6 @@ public class TXTRenderer extends PrintRenderer {
private boolean suppressGraphics = false;
private boolean firstPage = false;
- /**
- * Set the TXT document's producer
- *
- * @param producer string indicating application producing PDF
- */
- public void setProducer(String producer) {
- }
-
-
private void addStr(int row, int col, String str, boolean ischar) {
if (debug) {
getLogger().debug("TXTRenderer.addStr(" + row + ", " + col
diff --git a/src/java/org/apache/fop/render/xml/XMLRenderer.java b/src/java/org/apache/fop/render/xml/XMLRenderer.java
index a2ca49b3c..238dda6c1 100644
--- a/src/java/org/apache/fop/render/xml/XMLRenderer.java
+++ b/src/java/org/apache/fop/render/xml/XMLRenderer.java
@@ -109,12 +109,6 @@ public class XMLRenderer extends AbstractRenderer {
private RendererContext context;
/**
- * @see org.apache.fop.render.Renderer#setProducer(String)
- */
- public void setProducer(String producer) {
- }
-
- /**
* indentation to use for pretty-printing the XML
*/
protected int indent = 0;