From: Peter Bernard West Date: Thu, 15 Apr 2004 08:04:24 +0000 (+0000) Subject: Removed InputHandler references to maintain compatibility with AWTRenderer X-Git-Tag: Defoe_export~236 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7aad4783bf2f145514152f8d7f60a0dc410b7303;p=xmlgraphics-fop.git 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 --- 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); - } } }