You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2004/10/10 13:30:24 UTC
cvs commit: xml-fop/src/java/org/apache/fop/render Renderer.java
jeremias 2004/10/10 04:30:24
Modified: src/java/org/apache/fop/render Renderer.java
Log:
Add getMimeType() to the Renderer interface as AbstractRenderer implements this anyway. Renderers such as Java2D/AWT (where a MIME type is not applicable) will return null.
Revision Changes Path
1.16 +7 -0 xml-fop/src/java/org/apache/fop/render/Renderer.java
Index: Renderer.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/Renderer.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Renderer.java 25 Sep 2004 21:55:36 -0000 1.15
+++ Renderer.java 10 Oct 2004 11:30:24 -0000 1.16
@@ -53,6 +53,13 @@
/**
+ * Get the MIME type of the renderer.
+ *
+ * @return The MIME type of the renderer, may return null if not applicable.
+ */
+ String getMimeType();
+
+ /**
* Initiates the rendering phase.
* This must only be called once for a rendering. If
* stopRenderer is called then this may be called again
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org
Re: cvs commit: xml-fop/src/java/org/apache/fop/render Renderer.java
Posted by Glen Mazza <gr...@yahoo.com>.
--- Jeremias Maerki <de...@greenmail.ch> wrote:
>
> On 11.10.2004 01:29:40 Glen Mazza wrote:
> > Jeremias: Why does the FOEventHandler need to
> know the MIME type
> > supported by a Renderer?
>
> The FOEventHandler doesn't need to know the MIME
> type. But maybe the a
> FOP integrator needs it.
>
OK, it may have a use.
Glen
Re: cvs commit: xml-fop/src/java/org/apache/fop/render Renderer.java
Posted by Jeremias Maerki <de...@greenmail.ch>.
On 11.10.2004 01:29:40 Glen Mazza wrote:
> Jeremias: Why does the FOEventHandler need to know the MIME type
> supported by a Renderer?
The FOEventHandler doesn't need to know the MIME type. But maybe the a
FOP integrator needs it.
> It hasn't been requesting it. The "primary
> key" of the Renderer is its constants value in fo.Constants, and the
> FOEventHandler has already chosen the renderer based on this value by
> this time.
Correct. But just after instantiation the MIME type is used to get the
renderer-specific configuration. That's just the way it is now. I
haven't changed that part (just moved it). It simply occured to me that
if every renderer we have is an AbstractRenderer which implements
getMimeType() then the interface can implement it, too. No harm there.
> What additional functionality are you trying to add to the next release
> as a result of this change?
That change really wasn't with anything in the back of my head. Well, I
happen to prefer MIME type to some obscure integer constants even though
they don't apply to the AWT renderer.
Want me to roll back?
Jeremias Maerki
Re: cvs commit: xml-fop/src/java/org/apache/fop/render Renderer.java
Posted by Glen Mazza <gr...@yahoo.com>.
Jeremias: Why does the FOEventHandler need to know the MIME type
supported by a Renderer? It hasn't been requesting it. The "primary
key" of the Renderer is its constants value in fo.Constants, and the
FOEventHandler has already chosen the renderer based on this value by
this time.
What additional functionality are you trying to add to the next release
as a result of this change?
Glen
jeremias@apache.org schrieb:
>jeremias 2004/10/10 04:30:24
>
> Modified: src/java/org/apache/fop/render Renderer.java
> Log:
> Add getMimeType() to the Renderer interface as AbstractRenderer implements this anyway. Renderers such as Java2D/AWT (where a MIME type is not applicable) will return null.
>
> Revision Changes Path
> 1.16 +7 -0 xml-fop/src/java/org/apache/fop/render/Renderer.java
>
> Index: Renderer.java
> ===================================================================
> RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/Renderer.java,v
> retrieving revision 1.15
> retrieving revision 1.16
> diff -u -r1.15 -r1.16
> --- Renderer.java 25 Sep 2004 21:55:36 -0000 1.15
> +++ Renderer.java 10 Oct 2004 11:30:24 -0000 1.16
> @@ -53,6 +53,13 @@
>
>
> /**
> + * Get the MIME type of the renderer.
> + *
> + * @return The MIME type of the renderer, may return null if not applicable.
> + */
> + String getMimeType();
> +
> + /**
> * Initiates the rendering phase.
> * This must only be called once for a rendering. If
> * stopRenderer is called then this may be called again
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-cvs-help@xml.apache.org
>
>
>
>