]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed InputHandler references to maintain compatibility with AWTRenderer
authorPeter Bernard West <pbwest@apache.org>
Thu, 15 Apr 2004 08:04:24 +0000 (08:04 +0000)
committerPeter Bernard West <pbwest@apache.org>
Thu, 15 Apr 2004 08:04:24 +0000 (08:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197505 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/render/awt/viewer/PreviewDialog.java

index bd77bbe7bea7245aa50af4c04fbcfbdfd505013b..2c4e70f245e9e66ffc3a8a72d0fc62bb74eedf23 100644 (file)
@@ -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);
-            }
         }
     }