keiron      02/02/20 02:29:40

  Modified:    src/org/apache/fop/apps AWTStarter.java
               src/org/apache/fop/viewer PreviewDialog.java
  Log:
  exit for closing window is only called for the AWTStarter, command line
  and not on the window
  
  Revision  Changes    Path
  1.12      +8 -1      xml-fop/src/org/apache/fop/apps/AWTStarter.java
  
  Index: AWTStarter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/AWTStarter.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AWTStarter.java   22 Nov 2001 07:11:38 -0000      1.11
  +++ AWTStarter.java   20 Feb 2002 10:29:40 -0000      1.12
  @@ -1,5 +1,5 @@
   /*
  - * $Id: AWTStarter.java,v 1.11 2001/11/22 07:11:38 keiron Exp $
  + * $Id: AWTStarter.java,v 1.12 2002/02/20 10:29:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -19,6 +19,8 @@
   
   import javax.swing.UIManager;
   import java.awt.*;
  +import java.awt.event.WindowAdapter;
  +import java.awt.event.WindowEvent;
   
   // SAX
   import org.xml.sax.XMLReader;
  @@ -130,6 +132,11 @@
               Translator res) {
           PreviewDialog frame = new PreviewDialog(renderer, res);
           frame.validate();
  +        frame.addWindowListener(new WindowAdapter() {
  +            public void windowClosed(WindowEvent we) {
  +                System.exit(0);
  +            }
  +        });
   
           // center window
           Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
  
  
  
  1.11      +1 -5      xml-fop/src/org/apache/fop/viewer/PreviewDialog.java
  
  Index: PreviewDialog.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/viewer/PreviewDialog.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- PreviewDialog.java        22 Nov 2001 07:11:41 -0000      1.10
  +++ PreviewDialog.java        20 Feb 2002 10:29:40 -0000      1.11
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PreviewDialog.java,v 1.10 2001/11/22 07:11:41 keiron Exp $
  + * $Id: PreviewDialog.java,v 1.11 2002/02/20 10:29:40 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -622,10 +622,6 @@
                   }
               }
           }*/
  -    }
  -
  -    public void dispose() {
  -        System.exit(0);
       }
   
   }    // class PreviewDialog
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to