projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2003/10/16 05:39:20
[org.ibex.core.git]
/
src
/
org
/
xwt
/
Platform.java
diff --git
a/src/org/xwt/Platform.java
b/src/org/xwt/Platform.java
index
9216dcb
..
aa8be35
100644
(file)
--- a/
src/org/xwt/Platform.java
+++ b/
src/org/xwt/Platform.java
@@
-124,7
+124,14
@@
public class Platform {
/** creates and returns a picture */
public static Picture createPicture(int[] data, int w, int h) { return platform._createPicture(data, w, h); }
/** creates and returns a picture */
public static Picture createPicture(int[] data, int w, int h) { return platform._createPicture(data, w, h); }
+ public static Picture createAlphaOnlyPicture(byte[] data, int w, int h) { return platform._createAlphaOnlyPicture(data, w, h); }
+
protected Picture _createPicture(int[] b, int w, int h) { return null; }
protected Picture _createPicture(int[] b, int w, int h) { return null; }
+ protected Picture _createAlphaOnlyPicture(byte[] b, int w, int h) {
+ int[] b2 = new int[b.length];
+ for(int i=0;i<b.length;i++) b2[i] = (b[i]&0xff) << 24;
+ return _createPicture(b2,w,h);
+ }
/** creates a socket object */
public static Socket getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException {
/** creates a socket object */
public static Socket getSocket(String host, int port, boolean ssl, boolean negotiate) throws IOException {
@@
-232,7
+239,9
@@
public class Platform {
/** default implementation is Eric Albert's BrowserLauncher.java */
protected void _newBrowserWindow(String url) {
try {
/** default implementation is Eric Albert's BrowserLauncher.java */
protected void _newBrowserWindow(String url) {
try {
- edu.stanford.ejalbert.BrowserLauncher.openURL(url);
+ Class c = Class.forName("edu.stanford.ejalbert.BrowserLauncher");
+ Method m = c.getMethod("openURL", new Class[] { String.class });
+ m.invoke(null, new String[] { url });
} catch (Exception e) {
Log.log(this, e);
}
} catch (Exception e) {
Log.log(this, e);
}
@@
-310,7
+319,9
@@
public class Platform {
return cachedProxyInfo;
}
return cachedProxyInfo;
}
-
+
+ public static void running() { platform._running(); }
+ public void _running() { new Semaphore().block(); }
}
}