OmegaT の翻訳状況(Statistics)を Excel で表示します。
Fix #50101
@@ -26,7 +26,7 @@ | ||
26 | 26 | |
27 | 27 | private static final String APP_NAME = "Stats2Excel"; |
28 | 28 | private static final String APP_VERSION = "0.1"; |
29 | - private static final String APP_BUILD = "20131130"; | |
29 | + private static final String APP_BUILD = "20131201"; | |
30 | 30 | private static final String APP_AUTHOR = "Yu Tang"; |
31 | 31 | |
32 | 32 | public static void main(String[] args) { |
@@ -34,6 +34,7 @@ | ||
34 | 34 | |
35 | 35 | private ScheduledExecutorService service = null; |
36 | 36 | private boolean isErrorOnDisplay = false; |
37 | + private boolean isWindowClosing = false; | |
37 | 38 | |
38 | 39 | public SplashStatisticsWindow(STAT_TYPE statType) { |
39 | 40 | super(statType); |
@@ -42,6 +43,7 @@ | ||
42 | 43 | |
43 | 44 | @Override |
44 | 45 | public void windowClosing(WindowEvent e) { |
46 | + isWindowClosing = true; | |
45 | 47 | if (service != null && !service.isShutdown()) { |
46 | 48 | service.shutdown(); |
47 | 49 | service = null; |
@@ -48,6 +50,12 @@ | ||
48 | 50 | } |
49 | 51 | } |
50 | 52 | |
53 | + @Override | |
54 | + public void windowDeactivated(WindowEvent e) { | |
55 | + if (! isWindowClosing) { | |
56 | + dispose(); | |
57 | + } | |
58 | + } | |
51 | 59 | }); |
52 | 60 | setSize(400, 100); |
53 | 61 | } |
@@ -89,7 +97,6 @@ | ||
89 | 97 | if (ExcelModel.activate()) { |
90 | 98 | service.shutdown(); |
91 | 99 | service = null; |
92 | - dispose(); | |
93 | 100 | } |
94 | 101 | } catch (IOException ex) { |
95 | 102 | Log.log(ex); |