aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2006-03-05 19:50:28 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2006-03-05 19:50:28 +0000
commitf255053959e93876cb9345d905c0b1846c84959d (patch)
treed9e613d9b37ec3e5c15de0e8c80ea96960e1a12c /src/java/org/apache/fop/render
parent4be7cccf6d6b5f230ed0177db194aa114b865d90 (diff)
downloadxmlgraphics-fop-f255053959e93876cb9345d905c0b1846c84959d.tar.gz
xmlgraphics-fop-f255053959e93876cb9345d905c0b1846c84959d.zip
Add dynamic lookup of the RendererMakers to RendererFactory (as suggested by Nils Meier; proposed patch slightly altered to make use of org.apache.fop.util.Service instead of sun.misc.Service)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@383384 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render')
-rw-r--r--src/java/org/apache/fop/render/RendererFactory.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/render/RendererFactory.java b/src/java/org/apache/fop/render/RendererFactory.java
index c6ed0f641..264d34edf 100644
--- a/src/java/org/apache/fop/render/RendererFactory.java
+++ b/src/java/org/apache/fop/render/RendererFactory.java
@@ -62,15 +62,12 @@ public class RendererFactory {
}
private void registerStandardRenderers() {
- addRendererMaker(new org.apache.fop.render.pdf.PDFRendererMaker());
- addRendererMaker(new org.apache.fop.render.ps.PSRendererMaker());
- addRendererMaker(new org.apache.fop.render.txt.TXTRendererMaker());
- addRendererMaker(new org.apache.fop.render.bitmap.PNGRendererMaker());
- addRendererMaker(new org.apache.fop.render.bitmap.TIFFRendererMaker());
- addRendererMaker(new org.apache.fop.render.bitmap.TIFFRendererMaker());
- addRendererMaker(new org.apache.fop.render.xml.XMLRendererMaker());
- addRendererMaker(new org.apache.fop.render.awt.AWTRendererMaker());
- addRendererMaker(new org.apache.fop.render.print.PrintRendererMaker());
+ Iterator rendererMakers = Service.providers(AbstractRendererMaker.class);
+ if (rendererMakers != null) {
+ while (rendererMakers.hasNext()) {
+ addRendererMaker((String) rendererMakers.next());
+ }
+ }
}
private void registerStandardEventHandlers() {