/* */ package NET.worlds.console; /* */ /* */ import java.awt.Dialog; /* */ import java.awt.Frame; /* */ import java.awt.event.ActionEvent; /* */ import java.awt.event.ActionListener; /* */ import java.awt.event.WindowAdapter; /* */ import java.awt.event.WindowEvent; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class BlockingDialog /* */ extends Dialog /* */ implements ActionListener /* */ { /* */ private static final long serialVersionUID = 8379457384966170912L; /* 29 */ boolean stillWaiting = true; /* */ /* */ public BlockingDialog(Frame parent, String title, boolean modal) { /* 32 */ super(parent, title, modal); /* 33 */ addWindowListener(new WindowAdapter() /* */ { /* */ public void windowClosing(WindowEvent e) { /* 36 */ BlockingDialog.this.finish(); /* */ } /* */ }); /* */ } /* */ /* */ public void actionPerformed(ActionEvent e) { /* 42 */ finish(); /* */ } /* */ /* */ public void finish() { /* 46 */ responded(); /* 47 */ setVisible(false); /* */ } /* */ /* */ public synchronized void waitForResponse() { /* */ try { /* 52 */ while (this.stillWaiting) { /* 53 */ wait(); /* */ } /* */ } catch (Exception localException) {} /* */ } /* */ /* */ public synchronized void responded() { /* 59 */ this.stillWaiting = false; /* 60 */ notifyAll(); /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BlockingDialog.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */