From 4d9f95a6afdf8c1d0710d2c854fb63a4ead2b0fb Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 3 Apr 2009 10:14:20 +0000 Subject: [PATCH] Removed AbstractRenderer.getMimeType() as per Vincent's suggestion. Moved getMimeType() implementation from PrintRenderer to PageableRenderer. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@761596 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/AbstractRenderer.java | 9 --------- .../org/apache/fop/render/print/PageableRenderer.java | 6 ++++++ src/java/org/apache/fop/render/print/PrintRenderer.java | 6 ------ 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java index 0c324a0be..ed7682221 100644 --- a/src/java/org/apache/fop/render/AbstractRenderer.java +++ b/src/java/org/apache/fop/render/AbstractRenderer.java @@ -827,15 +827,6 @@ public abstract class AbstractRenderer } } - /** - * Get the MIME type of the renderer. - * - * @return The MIME type of the renderer - */ - public String getMimeType() { - return null; - } - /** * Converts a millipoint-based transformation matrix to points. * @param at a millipoint-based transformation matrix diff --git a/src/java/org/apache/fop/render/print/PageableRenderer.java b/src/java/org/apache/fop/render/print/PageableRenderer.java index 01a60646b..89ab98071 100644 --- a/src/java/org/apache/fop/render/print/PageableRenderer.java +++ b/src/java/org/apache/fop/render/print/PageableRenderer.java @@ -29,6 +29,7 @@ import java.util.Map; import org.apache.fop.apps.FOPException; import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.apps.MimeConstants; import org.apache.fop.area.PageViewport; import org.apache.fop.render.java2d.Java2DRenderer; @@ -75,6 +76,11 @@ public class PageableRenderer extends Java2DRenderer implements Pageable { public PageableRenderer() { } + /** {@inheritDoc} */ + public String getMimeType() { + return MimeConstants.MIME_FOP_PRINT; + } + /** {@inheritDoc} */ public void setUserAgent(FOUserAgent agent) { super.setUserAgent(agent); diff --git a/src/java/org/apache/fop/render/print/PrintRenderer.java b/src/java/org/apache/fop/render/print/PrintRenderer.java index 315c12cf1..2eb2b07a2 100644 --- a/src/java/org/apache/fop/render/print/PrintRenderer.java +++ b/src/java/org/apache/fop/render/print/PrintRenderer.java @@ -25,7 +25,6 @@ import java.io.IOException; import java.util.Map; import org.apache.fop.apps.FOUserAgent; -import org.apache.fop.apps.MimeConstants; /** * Renderer that prints through java.awt.PrintJob. @@ -71,11 +70,6 @@ public class PrintRenderer extends PageableRenderer { printerJob.setPageable(this); } - /** {@inheritDoc} */ - public String getMimeType() { - return MimeConstants.MIME_FOP_PRINT; - } - private void initializePrinterJob() { if (this.printerJob == null) { printerJob = PrinterJob.getPrinterJob(); -- 2.39.5