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