diff options
author | Keiron Liddle <keiron@apache.org> | 2001-09-17 13:29:53 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2001-09-17 13:29:53 +0000 |
commit | ab48baaa46dc79d8ed211a4141f4a7fd933fb3c6 (patch) | |
tree | 85ffd8461ea641261917b5626d2ff6bae34b9f69 /src/org/apache/fop/apps | |
parent | f3c3996b7b0e01ac0420b4dec2aeef74e1c56236 (diff) | |
download | xmlgraphics-fop-ab48baaa46dc79d8ed211a4141f4a7fd933fb3c6.tar.gz xmlgraphics-fop-ab48baaa46dc79d8ed211a4141f4a7fd933fb3c6.zip |
fixed a few awt render problems and a bit more render refactoring
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/apps')
-rw-r--r-- | src/org/apache/fop/apps/AWTStarter.java | 9 | ||||
-rw-r--r-- | src/org/apache/fop/apps/CommandLineOptions.java | 5 | ||||
-rw-r--r-- | src/org/apache/fop/apps/Driver.java | 3 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/org/apache/fop/apps/AWTStarter.java b/src/org/apache/fop/apps/AWTStarter.java index 3c2b06b60..27749d9f8 100644 --- a/src/org/apache/fop/apps/AWTStarter.java +++ b/src/org/apache/fop/apps/AWTStarter.java @@ -13,7 +13,6 @@ package org.apache.fop.apps; * Stanislav Gorkhover: Stanislav.Gorkhover@jCatalog.com * Modified to use streaming API by Mark Lillywhite, mark-fop@inomial.com */ -import org.apache.fop.messaging.MessageHandler; import org.apache.fop.viewer.*; import org.apache.fop.render.awt.*; @@ -46,7 +45,6 @@ import java.util.*; /** * initialize AWT previewer */ - public class AWTStarter extends CommandLineStarter { PreviewDialog frame; @@ -90,13 +88,12 @@ public class AWTStarter extends CommandLineStarter { frame = createPreviewDialog(renderer, resource); renderer.setProgressListener(frame); renderer.setComponent(frame); - MessageHandler.setOutputMethod(MessageHandler.EVENT); - MessageHandler.addListener(frame); } public void run() throws FOPException { Driver driver = new Driver(); + driver.setLogger(log); if (errorDump) { driver.setErrorDump(true); } @@ -157,8 +154,8 @@ public class AWTStarter extends CommandLineStarter { URL url = getClass().getResource(path); in = url.openStream(); } catch (Exception ex) { - MessageHandler.logln("Can't find URL to: <" + path + "> " - + ex.getMessage()); + log.error("Can't find URL to: <" + path + "> " + + ex.getMessage(), ex); } return new SecureResourceBundle(in); } diff --git a/src/org/apache/fop/apps/CommandLineOptions.java b/src/org/apache/fop/apps/CommandLineOptions.java index 80d8aa42e..29039d780 100644 --- a/src/org/apache/fop/apps/CommandLineOptions.java +++ b/src/org/apache/fop/apps/CommandLineOptions.java @@ -139,11 +139,13 @@ public class CommandLineOptions { for (int i = 0; i < args.length; i++) { if (args[i].equals("-d") || args[i].equals("--full-error-dump")) { errorDump = new Boolean(true); + log.setPriority(Priority.DEBUG); } else if (args[i].equals("-x") || args[i].equals("--dump-config")) { dumpConfiguration = new Boolean(true); } else if (args[i].equals("-q") || args[i].equals("--quiet")) { quiet = new Boolean(true); + log.setPriority(Priority.ERROR); } else if (args[i].equals("-c")) { if ((i + 1 == args.length) || (args[i + 1].charAt(0) == '-')) { @@ -416,6 +418,7 @@ public class CommandLineOptions { } throw new FOPException("AWTStarter could not be loaded.", e); } + break; case PRINT_OUTPUT: try { starter = ((Starter)Class.forName("org.apache.fop.apps.PrintStarter").getConstructor(new Class[] { @@ -430,7 +433,7 @@ public class CommandLineOptions { throw new FOPException("PrintStarter could not be loaded.", e); } - + break; default: starter = new CommandLineStarter(this); } diff --git a/src/org/apache/fop/apps/Driver.java b/src/org/apache/fop/apps/Driver.java index 88967f79b..8d11fc8cd 100644 --- a/src/org/apache/fop/apps/Driver.java +++ b/src/org/apache/fop/apps/Driver.java @@ -230,6 +230,9 @@ public class Driver implements Loggable { */ public synchronized void reset() { _areaTree = null; + _source = null; + _stream = null; + _reader = null; _treeBuilder.reset(); } |