X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FPlatform.java;h=164077916bc2d301fa8dbbcde5ea582d921e9f27;hb=67eeff476179a91ae930ea89cbecde22132ca532;hp=f8937cadc4204307bfd7dfa9082a969e06103fce;hpb=9d07963a45f2147a62d8897e9c4245c224d98ccb;p=org.ibex.core.git diff --git a/src/org/xwt/Platform.java b/src/org/xwt/Platform.java index f8937ca..1640779 100644 --- a/src/org/xwt/Platform.java +++ b/src/org/xwt/Platform.java @@ -226,8 +226,7 @@ public class Platform { /** displays a platform-specific "open file" dialog and returns the chosen filename, or null if the user hit cancel */ protected String _fileDialog(String suggestedFileName, boolean write) { return null; } - public static String fileDialog(String suggestedFileName, boolean write) { - // FIXME: put self in background + public static void fileDialog(String suggestedFileName, boolean write) throws JS.Exn { return platform._fileDialog(suggestedFileName, write); } @@ -276,19 +275,6 @@ public class Platform { Surface ret = platform._createSurface(b, framed); ret.setInvisible(false); - Object titlebar = b.get("titlebar", true); - if (titlebar != null) ret.setTitleBarText(titlebar.toString()); - - Object icon = b.get("icon", true); - if (icon != null && icon instanceof Res) { - /* - FIXME - Picture pic = Picture.fromRes((Res)icon); - if (pic != null) ret.setIcon(pic); - else if (Log.on) Log.log(Platform.class, "unable to load icon " + icon); - */ - } - ret.setLimits(b.minwidth, b.minheight, b.maxwidth, b.maxheight); if (refreshable) { @@ -322,21 +308,6 @@ public class Platform { protected Scheduler _getScheduler() { return new Scheduler(); } public static Scheduler getScheduler() { return platform._getScheduler(); } - /** read an input stream into a byte array and invoke callback when ready */ - protected void _inputStreamToByteArray(final InputStream is, final Callback c) { - new java.lang.Thread() { - public void run() { - try { - final byte[] b = InputStreamToByteArray.convert(is); - Scheduler.add(new Scheduler.Task() { public void perform() { c.call(b); }}); - } catch (IOException e) { - Log.log(Platform.class, e); - } - } - }.start(); - } - public static void inputStreamToByteArray(InputStream is, Callback c) { platform._inputStreamToByteArray(is, c); } - public static void running() { platform._running(); } public void _running() { new Semaphore().block(); } }