aboutsummaryrefslogtreecommitdiffstats
path: root/examples/embedding
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-11-12 15:58:07 +0000
committerJeremias Maerki <jeremias@apache.org>2005-11-12 15:58:07 +0000
commitb4af2746c8d5d3c356ef5c0efc146e5f6c27687a (patch)
tree274bb5a0785ab0cfee6ee96a3925c9270de48a9a /examples/embedding
parent67cf81215052e47ab2028c67dc5611a8e942fa5a (diff)
downloadxmlgraphics-fop-b4af2746c8d5d3c356ef5c0efc146e5f6c27687a.tar.gz
xmlgraphics-fop-b4af2746c8d5d3c356ef5c0efc146e5f6c27687a.zip
Deprecated constructors Fop(int) and Fop(int, FOUserAgent).
Deprecated Fop.getVersion() in favor for Version.getVersion(). Changed every place the newly deprecated methods were called. Ant task and TestConverter changed to fully use MIME types. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332791 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'examples/embedding')
-rw-r--r--examples/embedding/java/embedding/ExampleAWTViewer.java3
-rw-r--r--examples/embedding/java/embedding/ExampleDOM2PDF.java3
-rw-r--r--examples/embedding/java/embedding/ExampleFO2OldStylePrint.java3
-rw-r--r--examples/embedding/java/embedding/ExampleFO2PDF.java3
-rw-r--r--examples/embedding/java/embedding/ExampleFO2PDFUsingSAXParser.java3
-rw-r--r--examples/embedding/java/embedding/ExampleFO2RTF.java3
-rw-r--r--examples/embedding/java/embedding/ExampleObj2PDF.java4
-rw-r--r--examples/embedding/java/embedding/ExampleXML2PDF.java5
8 files changed, 18 insertions, 9 deletions
diff --git a/examples/embedding/java/embedding/ExampleAWTViewer.java b/examples/embedding/java/embedding/ExampleAWTViewer.java
index 7d050c449..2e25f6985 100644
--- a/examples/embedding/java/embedding/ExampleAWTViewer.java
+++ b/examples/embedding/java/embedding/ExampleAWTViewer.java
@@ -37,6 +37,7 @@ import org.apache.avalon.framework.ExceptionUtil;
//FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.MimeConstants;
import org.apache.fop.fo.Constants;
/**
@@ -48,7 +49,7 @@ public class ExampleAWTViewer {
throws IOException, FOPException, TransformerException {
//Setup FOP
- Fop fop = new Fop(Constants.RENDER_AWT);
+ Fop fop = new Fop(MimeConstants.MIME_FOP_AWT_PREVIEW);
try {
diff --git a/examples/embedding/java/embedding/ExampleDOM2PDF.java b/examples/embedding/java/embedding/ExampleDOM2PDF.java
index 006178bbf..b46912a61 100644
--- a/examples/embedding/java/embedding/ExampleDOM2PDF.java
+++ b/examples/embedding/java/embedding/ExampleDOM2PDF.java
@@ -41,6 +41,7 @@ import org.w3c.dom.Text;
// FOP
import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.MimeConstants;
/**
@@ -62,7 +63,7 @@ public class ExampleDOM2PDF {
public void convertDOM2PDF(Document xslfoDoc, File pdf) {
try {
// Construct fop with desired output format
- Fop fop = new Fop(Fop.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
// Setup output
OutputStream out = new java.io.FileOutputStream(pdf);
diff --git a/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java b/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java
index c901abcb9..cc8e2bd91 100644
--- a/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java
+++ b/examples/embedding/java/embedding/ExampleFO2OldStylePrint.java
@@ -36,6 +36,7 @@ import javax.xml.transform.sax.SAXResult;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.MimeConstants;
import org.apache.fop.render.print.PrintRenderer;
/**
@@ -63,7 +64,7 @@ public class ExampleFO2OldStylePrint {
userAgent.setRendererOverride(renderer);
// Construct fop with desired output format
- Fop fop = new Fop(Fop.RENDER_PRINT, userAgent);
+ Fop fop = new Fop(MimeConstants.MIME_FOP_PRINT, userAgent);
//Note: the first parameter here has no effect if we use
//FOUserAgent.setRendererOverride()
diff --git a/examples/embedding/java/embedding/ExampleFO2PDF.java b/examples/embedding/java/embedding/ExampleFO2PDF.java
index f67652fce..32d4de3aa 100644
--- a/examples/embedding/java/embedding/ExampleFO2PDF.java
+++ b/examples/embedding/java/embedding/ExampleFO2PDF.java
@@ -38,6 +38,7 @@ import javax.xml.transform.sax.SAXResult;
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FormattingResults;
+import org.apache.fop.apps.MimeConstants;
import org.apache.fop.apps.PageSequenceResults;
/**
@@ -58,7 +59,7 @@ public class ExampleFO2PDF {
try {
// Construct fop with desired output format
- Fop fop = new Fop(Fop.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
// Setup output stream. Note: Using BufferedOutputStream
// for performance reasons (helpful with FileOutputStreams).
diff --git a/examples/embedding/java/embedding/ExampleFO2PDFUsingSAXParser.java b/examples/embedding/java/embedding/ExampleFO2PDFUsingSAXParser.java
index 612f78974..38d1ff6c4 100644
--- a/examples/embedding/java/embedding/ExampleFO2PDFUsingSAXParser.java
+++ b/examples/embedding/java/embedding/ExampleFO2PDFUsingSAXParser.java
@@ -38,6 +38,7 @@ import org.xml.sax.SAXException;
// FOP
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.MimeConstants;
/**
* This class demonstrates the conversion of an FO file to PDF using FOP.
@@ -64,7 +65,7 @@ public class ExampleFO2PDFUsingSAXParser {
try {
// Construct fop and setup output format
- Fop fop = new Fop(Fop.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
// Setup output stream. Note: Using BufferedOutputStream
// for performance reasons (helpful with FileOutputStreams).
diff --git a/examples/embedding/java/embedding/ExampleFO2RTF.java b/examples/embedding/java/embedding/ExampleFO2RTF.java
index c76353f47..8c85f8a4f 100644
--- a/examples/embedding/java/embedding/ExampleFO2RTF.java
+++ b/examples/embedding/java/embedding/ExampleFO2RTF.java
@@ -36,6 +36,7 @@ import javax.xml.transform.sax.SAXResult;
// FOP
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.MimeConstants;
/**
* This class demonstrates the conversion of an FO file to RTF using FOP.
@@ -58,7 +59,7 @@ public class ExampleFO2RTF {
try {
// Construct fop with desired output format
- Fop fop = new Fop(Fop.RENDER_RTF);
+ Fop fop = new Fop(MimeConstants.MIME_RTF);
// Setup output stream. Note: Using BufferedOutputStream
// for performance reasons (helpful with FileOutputStreams).
diff --git a/examples/embedding/java/embedding/ExampleObj2PDF.java b/examples/embedding/java/embedding/ExampleObj2PDF.java
index 0bde8d4e5..99039642c 100644
--- a/examples/embedding/java/embedding/ExampleObj2PDF.java
+++ b/examples/embedding/java/embedding/ExampleObj2PDF.java
@@ -35,6 +35,8 @@ import javax.xml.transform.sax.SAXResult;
// FOP
import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FOPException;
+import org.apache.fop.apps.MimeConstants;
+
import embedding.model.ProjectTeam;
/**
@@ -56,7 +58,7 @@ public class ExampleObj2PDF {
throws IOException, FOPException, TransformerException {
// Construct fop with desired output format
- Fop fop = new Fop(Fop.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
// Setup output
OutputStream out = new java.io.FileOutputStream(pdf);
diff --git a/examples/embedding/java/embedding/ExampleXML2PDF.java b/examples/embedding/java/embedding/ExampleXML2PDF.java
index c1493a23c..c554dacee 100644
--- a/examples/embedding/java/embedding/ExampleXML2PDF.java
+++ b/examples/embedding/java/embedding/ExampleXML2PDF.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@ import javax.xml.transform.sax.SAXResult;
//FOP
import org.apache.fop.apps.Fop;
+import org.apache.fop.apps.MimeConstants;
/**
* This class demonstrates the conversion of an XML file to PDF using
@@ -65,7 +66,7 @@ public class ExampleXML2PDF {
System.out.println("Transforming...");
// Construct fop with desired output format
- Fop fop = new Fop(Fop.RENDER_PDF);
+ Fop fop = new Fop(MimeConstants.MIME_PDF);
// Setup output
OutputStream out = new java.io.FileOutputStream(pdffile);