- Timestamp:
- 2008-11-27T00:22:33+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
r1048 r1093 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.AWTEvent; 6 7 import java.awt.Color; 7 8 import java.awt.Dimension; … … 11 12 import java.awt.Insets; 12 13 import java.awt.Toolkit; 14 import java.awt.event.AWTEventListener; 13 15 import java.awt.event.MouseAdapter; 14 16 import java.awt.event.MouseEvent; … … 120 122 } 121 123 }); 124 125 // Hide splashscreen when other window is created 126 Toolkit.getDefaultToolkit().addAWTEventListener(awtListener, AWTEvent.WINDOW_EVENT_MASK); 127 122 128 setVisible(true); 123 129 } 130 131 private AWTEventListener awtListener = new AWTEventListener() { 132 public void eventDispatched(AWTEvent event) { 133 if (event.getSource() != SplashScreen.this) { 134 closeSplash(); 135 } 136 } 137 }; 124 138 125 139 /** … … 142 156 if (!visible) 143 157 return; 158 Toolkit.getDefaultToolkit().removeAWTEventListener(awtListener); 144 159 try { 145 SwingUtilities.invoke AndWait(closerRunner);160 SwingUtilities.invokeLater(closerRunner); 146 161 } catch (Exception e) { 147 162 e.printStackTrace();
Note:
See TracChangeset
for help on using the changeset viewer.