Skip to content

Commit f318328

Browse files
committed
adds JSUtilI.java interface
1 parent d6af498 commit f318328

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

sources/net.sf.j2s.java.core/src/swingjs/JSFrameViewer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public Graphics getGraphics(int wNew, int hNew, RootPaneContainer window) {
209209
private HTML5Canvas newCanvas(int width, int height, RootPaneContainer window) {
210210
if (isApplet) {
211211
// applets create their own canvas
212-
HTML5Canvas c = html5Applet._getHtml5Canvas();
212+
HTML5Canvas c = (HTML5Canvas) html5Applet._getHtml5Canvas();
213213
if (c != null) {
214214
return canvas = c;
215215
}

sources/net.sf.j2s.java.core/src/swingjs/JSUtil.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static Object removeCachedFileData(String path) {
105105
@SuppressWarnings("unused")
106106
private static Object getFileContents(Object uriOrJSFile, boolean asBytes) {
107107
if (uriOrJSFile instanceof File) {
108-
byte[] bytes = /** @j2sNative uriOrJSFile.秘bytes || */
108+
byte[] bytes = /** @j2sNative uriOrJSFile.秘bytes || */
109109
null;
110110
if (bytes != null)
111111
return bytes;
@@ -731,12 +731,12 @@ public static Color getColorFromName(String c) {
731731
}
732732

733733
public static byte[] getFileBytes(File f) {
734-
return f.秘bytes;
734+
return f.秘bytes;
735735
}
736736

737737
@Override
738738
public byte[] getBytes(File f) {
739-
return f.秘bytes;
739+
return f.秘bytes;
740740
}
741741

742742
@Override
@@ -768,19 +768,19 @@ public static HTML5Applet getHTML5Applet(Component c) {
768768
public static boolean setFileBytesStatic(File f, Object isOrBytes) {
769769
// Used in JalviewJS
770770
if (isOrBytes instanceof InputStream) {
771-
f.秘bytes = /**
771+
f.秘bytes = /**
772772
* @j2sNative (isOrBytes.$in.$in || isOrBytes.$in).buf ||
773773
*/
774774
null;
775775
} else if (isOrBytes instanceof byte[]) {
776-
f.秘bytes = /**
776+
f.秘bytes = /**
777777
* @j2sNative isOrBytes ||
778778
*/
779779
null;
780780
} else {
781-
f.秘bytes = null;
781+
f.秘bytes = null;
782782
}
783-
return (f.秘bytes != null);
783+
return (f.秘bytes != null);
784784
}
785785

786786
@Override

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSAppletUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void adjustCanvasForMenuBar() {
5656
}
5757

5858
public HTML5Canvas getCanvas() {
59-
return c.getAppContext().getThreadGroup().秘html5Applet._getHtml5Canvas();
59+
return (HTML5Canvas) c.getAppContext().getThreadGroup().秘html5Applet._getHtml5Canvas();
6060
}
6161

6262

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSComponentUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1876,7 +1876,7 @@ protected DOMNode setHTMLElementCUI() {
18761876
if (jc.getFrameViewer().isApplet) {
18771877
// If the applet's root pane, we insert it into the applet's
18781878
// content
1879-
DOMNode cdiv = swingjs.JSToolkit.getHTML5Applet(jc)._getContentLayer();
1879+
DOMNode cdiv = (DOMNode) swingjs.JSToolkit.getHTML5Applet(jc)._getContentLayer();
18801880
DOMNode.appendChildSafely(cdiv, outerNode);
18811881
}
18821882
}

0 commit comments

Comments
 (0)