summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMehdi Houshmand <mehdi@apache.org>2012-01-30 09:49:22 +0000
committerMehdi Houshmand <mehdi@apache.org>2012-01-30 09:49:22 +0000
commitc5c6ddef0cb6c90ea71e306f63474fd67ed46f6a (patch)
treeb9a6f738110a23fd12e15e19eed2b75ef55e61db /examples
parentf02df0822b06b0d4a3fad950f4dd335515ebe563 (diff)
downloadxmlgraphics-fop-c5c6ddef0cb6c90ea71e306f63474fd67ed46f6a.tar.gz
xmlgraphics-fop-c5c6ddef0cb6c90ea71e306f63474fd67ed46f6a.zip
Bugzilla#52513: Moved FOUserAgent to the constructor of the Renderers
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1237582 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'examples')
-rw-r--r--examples/embedding/java/embedding/ExampleFO2JPSPrint.java3
-rw-r--r--examples/embedding/java/embedding/atxml/ExampleConcat.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/examples/embedding/java/embedding/ExampleFO2JPSPrint.java b/examples/embedding/java/embedding/ExampleFO2JPSPrint.java
index 4f18b71ab..1e0ec4853 100644
--- a/examples/embedding/java/embedding/ExampleFO2JPSPrint.java
+++ b/examples/embedding/java/embedding/ExampleFO2JPSPrint.java
@@ -85,8 +85,7 @@ public class ExampleFO2JPSPrint {
//Set up a custom user agent so we can supply our own renderer instance
FOUserAgent userAgent = fopFactory.newFOUserAgent();
- PageableRenderer renderer = new PageableRenderer();
- renderer.setUserAgent(userAgent);
+ PageableRenderer renderer = new PageableRenderer(userAgent);
userAgent.setRendererOverride(renderer);
// Construct FOP with desired output format
diff --git a/examples/embedding/java/embedding/atxml/ExampleConcat.java b/examples/embedding/java/embedding/atxml/ExampleConcat.java
index adec1b08c..289f7d074 100644
--- a/examples/embedding/java/embedding/atxml/ExampleConcat.java
+++ b/examples/embedding/java/embedding/atxml/ExampleConcat.java
@@ -93,8 +93,7 @@ public class ExampleConcat {
userAgent, MimeConstants.MIME_PDF);
//Create the XMLRenderer to create the area tree XML
- XMLRenderer xmlRenderer = new XMLRenderer();
- xmlRenderer.setUserAgent(userAgent);
+ XMLRenderer xmlRenderer = new XMLRenderer(userAgent);
//Tell the XMLRenderer to mimic the target renderer
xmlRenderer.mimicRenderer(targetRenderer);