| 262 | } |
| 263 | |
| 264 | public void waitForClose() throws InterruptedException |
| 265 | { |
| 266 | final Object lock = new Object(); |
| 267 | Thread t = new Thread() { |
| 268 | @Override |
| 269 | public void run() { |
| 270 | synchronized (lock) { |
| 271 | while ( viewFrame.isVisible() ) { |
| 272 | try { |
| 273 | lock.wait(); |
| 274 | } |
| 275 | catch (InterruptedException e) { |
| 276 | } |
| 277 | } |
| 278 | } |
| 279 | } |
| 280 | }; |
| 281 | t.start(); |
| 282 | viewFrame.addWindowListener(new WindowAdapter() { |
| 283 | @Override |
| 284 | public void windowClosing(WindowEvent arg0) { |
| 285 | synchronized (lock) { |
| 286 | viewFrame.setVisible(false); |
| 287 | lock.notify(); |
| 288 | } |
| 289 | } |
| 290 | }); |
| 291 | t.join(); |
| 292 | } |
| 293 | |
| 294 | private void updateCurrentST(STViewFrame m) { |
| 295 | // System.out.println("updateCurrentST(): currentScope.st="+currentScope.st); |