summaryrefslogtreecommitdiff
path: root/NET/worlds/console/BlockingDialog.java
diff options
context:
space:
mode:
Diffstat (limited to 'NET/worlds/console/BlockingDialog.java')
-rw-r--r--NET/worlds/console/BlockingDialog.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/NET/worlds/console/BlockingDialog.java b/NET/worlds/console/BlockingDialog.java
new file mode 100644
index 0000000..7de11dd
--- /dev/null
+++ b/NET/worlds/console/BlockingDialog.java
@@ -0,0 +1,68 @@
+/* */ 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
+ */ \ No newline at end of file