From: Jeremias Maerki Date: Fri, 3 Apr 2009 10:14:20 +0000 (+0000) Subject: Removed AbstractRenderer.getMimeType() as per Vincent's suggestion. X-Git-Tag: fop-1_0~264 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4d9f95a6afdf8c1d0710d2c854fb63a4ead2b0fb;p=xmlgraphics-fop.git 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 --- 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();