aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-02-20 10:29:40 +0000
committerKeiron Liddle <keiron@apache.org>2002-02-20 10:29:40 +0000
commit5af15a140e00ca7dc05f5e1e77fabdc0f1873b29 (patch)
treec17120c93b16c9580f54d11b17d78fba3cb67ab6 /src/org/apache
parent06edcc8412eaacb01bb7628a128ee382396c0629 (diff)
downloadxmlgraphics-fop-5af15a140e00ca7dc05f5e1e77fabdc0f1873b29.tar.gz
xmlgraphics-fop-5af15a140e00ca7dc05f5e1e77fabdc0f1873b29.zip
exit for closing window is only called for the AWTStarter, command line
and not on the window git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194657 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r--src/org/apache/fop/apps/AWTStarter.java7
-rw-r--r--src/org/apache/fop/viewer/PreviewDialog.java4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/org/apache/fop/apps/AWTStarter.java b/src/org/apache/fop/apps/AWTStarter.java
index 85fcaa9be..20b0d8456 100644
--- a/src/org/apache/fop/apps/AWTStarter.java
+++ b/src/org/apache/fop/apps/AWTStarter.java
@@ -19,6 +19,8 @@ import org.apache.fop.render.awt.*;
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 @@ public class AWTStarter extends CommandLineStarter {
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();
diff --git a/src/org/apache/fop/viewer/PreviewDialog.java b/src/org/apache/fop/viewer/PreviewDialog.java
index 219c25078..401124b6e 100644
--- a/src/org/apache/fop/viewer/PreviewDialog.java
+++ b/src/org/apache/fop/viewer/PreviewDialog.java
@@ -624,9 +624,5 @@ public class PreviewDialog extends JFrame implements ProgressListener {
}*/
}
- public void dispose() {
- System.exit(0);
- }
-
} // class PreviewDialog