File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed
sources/net.sf.j2s.java.core/src/swingjs Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -28,20 +28,12 @@ public void cacheBytes() {
2828 }
2929
3030 public boolean setBytes (Object isOrBytes ) {
31- if (isOrBytes instanceof InputStream ) {
32- 秘bytes = /**
33- * @j2sNative (isOrBytes.$in.$in || isOrBytes.$in).buf ||
34- */
35- null ;
36- } else if (isOrBytes instanceof byte []) {
37- 秘bytes = /**
38- * @j2sNative isOrBytes ||
39- */
40- null ;
41- } else {
42- 秘bytes = null ;
31+ boolean ok = JSUtil .setFileBytesStatic ((File ) this , isOrBytes );
32+ if (ok ) {
33+ String path = getAbsolutePath ();
34+ JSUtil .cacheFileData (path , 秘bytes );
4335 }
44- return 秘bytes != null ;
36+ return ok ;
4537 }
4638
4739
Original file line number Diff line number Diff line change @@ -477,8 +477,7 @@ public static void setIsDispatchThread(boolean b) {
477477 * @return
478478 */
479479 public static HTML5Applet getHTML5Applet (Component c ) {
480- ThreadGroup g = (c == null ? Thread .currentThread ().getThreadGroup () : c .getAppContext ().getThreadGroup ());
481- return ((JSThreadGroup ) g ).getHtmlApplet ();
480+ return JSUtil .getHTML5Applet (c );
482481 }
483482
484483 public static void taintUI (Component c ) {
You can’t perform that action at this time.
0 commit comments