From 7aad4783bf2f145514152f8d7f60a0dc410b7303 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Thu, 15 Apr 2004 08:04:24 +0000 Subject: [PATCH] Removed InputHandler references to maintain compatibility with AWTRenderer git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197505 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/render/awt/viewer/PreviewDialog.java | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java b/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java index bd77bbe7b..2c4e70f24 100644 --- a/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java +++ b/src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java @@ -49,7 +49,6 @@ import java.awt.print.PrinterException; //FOP import org.apache.fop.apps.Fop; -import org.apache.fop.apps.InputHandler; import org.apache.fop.apps.FOPException; import org.apache.fop.render.awt.AWTRenderer; @@ -66,8 +65,6 @@ public class PreviewDialog extends JFrame { protected Translator translator; /** The AWT renderer */ protected AWTRenderer renderer; - /** The InputHandler associated with this window */ - protected InputHandler inputHandler; /** The Fop used for refreshing/reloading the view */ protected Fop fop; @@ -83,9 +80,8 @@ public class PreviewDialog extends JFrame { * Creates a new PreviewDialog that uses the given renderer. * @param aRenderer the to use renderer */ - public PreviewDialog(AWTRenderer aRenderer, InputHandler handler) { + public PreviewDialog(AWTRenderer aRenderer) { renderer = aRenderer; - inputHandler = handler; translator = renderer.getTranslator(); //Commands aka Actions @@ -219,14 +215,13 @@ public class PreviewDialog extends JFrame { } }); // inputHandler must be set to allow reloading - if (inputHandler != null) { menu.add(new Command(translator.getString("Menu.Reload")) { public void doit() { reload(); } }); - } - menu.addSeparator(); + + menu.addSeparator(); menu.add(new Command(translator.getString("Menu.Exit")) { public void doit() { dispose(); @@ -394,13 +389,9 @@ public class PreviewDialog extends JFrame { infoStatus.setText(""); currentPage = 0; - try { + // TODO work out how to reload setStatus(translator.getString("Status.Build.FO.tree")); - fop.render(inputHandler); setStatus(translator.getString("Status.Show")); - } catch (FOPException e) { - reportException(e); - } } } -- 2.39.5