2002/04/28 04:36:08
[org.ibex.core.git] / src / org / xwt / plat / Java2.java
index 9ae2043..1ff8764 100644 (file)
@@ -177,4 +177,24 @@ public class Java2 extends AWT {
     }
 
     protected String getDescriptiveName() { return "Java 1.2+ JVM"; }
+
+    protected void _newBrowserWindow(String url) {
+        if (Main.applet == null) {
+            if (Log.on) Log.log(this, "Main.applet is null; cannot invoke showDocument()");
+            return;
+        }
+        if (Log.on) Log.log(this, "asking browser to show URL " + url);
+        try {
+            Main.applet.getAppletContext().showDocument(new URL(url), "_blank");
+        } catch (MalformedURLException e) {
+            if (Log.on) Log.log(this, e);
+        }
+    }
+
+    /** used to notify the user of very serious failures; usually used when logging is not working or unavailable */
+    protected void _criticalAbort(String message) {
+        if (Log.on) Log.log(this, message);
+        new Semaphore().block();
+    }
+
 }