X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FPlatform.java;h=710df27d5a2c76085661f29793834867850755c3;hb=8192dcbd3ba21e385ef2b9fdcb5d9eb98b3a1f25;hp=173ae0cb8e8b68dd09430abc9ea2e6928e38158e;hpb=27d9c4dfdd8cb966bd80c2e4ac5a072d7fb133d0;p=org.ibex.core.git diff --git a/src/org/xwt/Platform.java b/src/org/xwt/Platform.java index 173ae0c..710df27 100644 --- a/src/org/xwt/Platform.java +++ b/src/org/xwt/Platform.java @@ -156,6 +156,11 @@ public class Platform { protected boolean _needsAutoClick() { return false; } + protected void _newBrowserWindow(String url) { + if (Log.on) Log.log(this, "Platform " + platform.getClass().getName() + " cannot open browser windows"); + return; + } + // Static methods -- thunk to the instance ///////////////////////////////////////////////////////////////////////// /** if true, org.xwt.Surface should generate Click messages automatically when a Release happens after a Press and the mouse has not moved much */ @@ -212,6 +217,15 @@ public class Platform { /** creates and returns a picture */ public static Picture createPicture(ImageDecoder i) { return platform._createPicture(i.getData(), i.getWidth(), i.getHeight()); } + /** creates and returns a picture */ + public static void newBrowserWindow(String url) { + if (!(url.startsWith("https://") || url.startsWith("http://") || url.startsWith("ftp://") || url.startsWith("mailto:"))) { + if (Log.on) Log.log(Platform.class, "xwt.newBrowserWindow() only supports http and https urls"); + return; + } + platform._newBrowserWindow(url); + } + /** quits XWT */ public static void exit() { Log.log(Platform.class, "exiting via Platform.exit()");