Skip to content

Commit bbcd940

Browse files
committed
___j2sflags.htm and dev/j2sflags.xlsx
1 parent 4251028 commit bbcd940

File tree

5 files changed

+96
-3
lines changed

5 files changed

+96
-3
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head><title>URL command line flags for SwingJS</title></head> <title>URL command line flags for SwingJS</title>
4+
<body><h3>URL command-line arguments for SwingJS</h3> URL command-line arguments for SwingJS
5+
"<br>To enable these flags, simply add them after # or ? on your page." "To enable these flags, simply add them after # or ? on your page."
6+
<br>The test is very simple -- just a case-sensitive string check. The test is very simple -- just a case-sensitive string check.
7+
<br>Separate them with &amp; For example: Separate them with &amp; For example:
8+
<br><a href=test_Test_Class.html?j2sverbose;j2snozcore;j2strace=applet>test_Test_Class.html?j2sverbose;j2snozcore;j2strace=applet</a> <a href=test_Test_Class.html?j2sverbose;j2snozcore;j2strace=applet>test_Test_Class.html?j2sverbose;j2snozcore;j2strace=applet</a>
9+
<br><table width=800 border=1>
10+
"<tr><th colspan=""2""></th></tr>"
11+
"<tr><td>j2sargs=a|b|c</td><td>arguments to be passed on to application.main(); use ""|"" to separate arguments.</td></tr>" j2sargs=a|b|c "arguments to be passed on to application.main(); use ""|"" to separate arguments."
12+
<tr><td>j2sdebugclip</td><td>shows all show/restore and clip operations in JSGraphics2D</td></tr> j2sdebugclip shows all show/restore and clip operations in JSGraphics2D
13+
<tr><td>j2sdebugcode</td><td>same as j2snocore?</td></tr> j2sdebugcode same as j2snocore?
14+
<tr><td>j2sdebugcore</td><td>same as j2snozcore?</td></tr> j2sdebugcore same as j2snozcore?
15+
<tr><td>j2sdebugpaint</td><td>report repaint manager information</td></tr> j2sdebugpaint report repaint manager information
16+
<tr><td>j2sevents</td><td>report ComponentEvent instances</td></tr> j2sevents report ComponentEvent instances
17+
<tr><td>j2sfilter=xxx</td><td>remove messages with the specified text from System.out</td></tr> j2sfilter=xxx remove messages with the specified text from System.out
18+
<tr><td>j2slang=EN_us</td><td>preferred language; application should check</td></tr> j2slang=EN_us preferred language; application should check
19+
<tr><td>j2smouse</td><td>report mouse events other than mousemove</td></tr> j2smouse report mouse events other than mousemove
20+
"<tr><td>j2smousemove</td><td>report all mouse events, including mousemove</td></tr>" j2smousemove "report all mouse events, including mousemove"
21+
<tr><td>j2snocore</td><td>do not load core files (from j2s/core/)</td></tr> j2snocore do not load core files (from j2s/core/)
22+
<tr><td>j2snoeval</td><td>use new Function() instead of eval(); breaks debugging</td></tr> j2snoeval use new Function() instead of eval(); breaks debugging
23+
"<tr><td>j2snooutput</td><td>no System.out, only System.err message</td></tr>" j2snooutput "no System.out, only System.err message"
24+
"<tr><td>j2snozcore</td><td>use the uncompressed j2s/core/xxxcore.js files, not the compressed core.z.js files</td></tr>" j2snozcore "use the uncompressed j2s/core/xxxcore.js files, not the compressed core.z.js files"
25+
"<tr><td>j2sprofile</td><td>track object creation; use J2S.getProfile() when you want a report, after that J2S.getProfile() or J2S.getProfile(nsec) to restart profiling anytime.</td></tr>" j2sprofile "track object creation; use J2S.getProfile() when you want a report, after that J2S.getProfile() or J2S.getProfile(nsec) to restart profiling anytime."
26+
<tr><td>j2sstrict</td><td>strict mode -- experimental</td></tr> j2sstrict strict mode -- experimental
27+
<tr><td>j2strace</td><td>look only for these</td></tr> j2strace look only for these
28+
<tr><td>j2sverbose</td><td>file loading reports</td></tr> j2sverbose file loading reports
29+
</table>
30+
</body>
31+
</html>
13.2 KB
Binary file not shown.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>SwingJS test Test_Class</title><meta charset="utf-8" />
5+
<script src="swingjs/swingjs2.js"></script>
6+
<script>
7+
if (!self.SwingJS)alert('swingjs2.js was not found. It needs to be in swingjs folder in the same directory as ' + document.location.href)
8+
Info = {
9+
code: null,
10+
main: "test.Test_Class",
11+
core: "swingjs",
12+
width: 850,
13+
height: 550,
14+
readyFunction: null,
15+
serverURL: 'https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php',
16+
j2sPath: 'swingjs/j2s',
17+
console:'sysoutdiv',
18+
allowjavascript: true
19+
}
20+
</script>
21+
</head>
22+
<body>
23+
<script>
24+
SwingJS.getApplet('testApplet', Info)
25+
getClassList = function(){J2S._saveFile('_j2sclasslist.txt', Clazz.ClassFilesLoaded.sort().join('\n'))}
26+
</script>
27+
<div style="position:absolute;left:900px;top:30px;width:600px;height:300px;">
28+
<div id="sysoutdiv" contentEditable="true" style="border:1px solid green;width:100%;height:95%;overflow:auto"></div>
29+
This is System.out. <a href="javascript:testApplet._clearConsole()">clear it</a> <br>Add ?j2snocore to URL to see full class list; ?j2sdebug to use uncompressed j2s/core files <br><a href="javascript:getClassList()">get _j2sClassList.txt</a>
30+
</div>
31+
</body>
32+
</html>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head><title>URL command line flags for SwingJS</title></head>
4+
<body><h3>URL command-line arguments for SwingJS</h3>
5+
<br>To enable these flags, simply add them after # or ? on your page.
6+
<br>The test is very simple -- just a case-sensitive string check.
7+
<br>Separate them with &amp; For example:
8+
<br><a href="test_Test_Class.html?j2sverbose&j2snozcore&j2strace=applet">test_Test_Class.html?j2sverbose&j2snozcore&j2strace=applet</a>
9+
<br><br><table width=800 border=1 cellpadding=5>
10+
<tr><th colspan="2"></th></tr>
11+
<tr><td>j2sargs=a|b|c</td><td>arguments to be passed on to application.main(); use "|" to separate arguments.</td></tr>
12+
<tr><td>j2sdebugclip</td><td>shows all show/restore and clip operations in JSGraphics2D</td></tr>
13+
<tr><td>j2sdebugcode</td><td>same as j2snocore?</td></tr>
14+
<tr><td>j2sdebugcore</td><td>same as j2snozcore?</td></tr>
15+
<tr><td>j2sdebugpaint</td><td>report repaint manager information</td></tr>
16+
<tr><td>j2sevents</td><td>report ComponentEvent instances</td></tr>
17+
<tr><td>j2sfilter=xxx</td><td>remove messages with the specified text from System.out</td></tr>
18+
<tr><td>j2slang=EN_us</td><td>preferred language; application should check</td></tr>
19+
<tr><td>j2smouse</td><td>report mouse events other than mousemove</td></tr>
20+
<tr><td>j2smousemove</td><td>report all mouse events, including mousemove</td></tr>
21+
<tr><td>j2snocore</td><td>do not load core files (from j2s/core/)</td></tr>
22+
<tr><td>j2snoeval</td><td>use new Function() instead of eval(); breaks debugging, experimental</td></tr>
23+
<tr><td>j2snooutput</td><td>report only System.err message, not System.out </td></tr>
24+
<tr><td>j2snozcore</td><td>use the uncompressed j2s/core/xxxcore.js files, not the compressed core.z.js files</td></tr>
25+
<tr><td>j2sprofile</td><td>track object creation; use J2S.getProfile() when you want a report, after that J2S.getProfile() or J2S.getProfile(nsec) to restart profiling anytime.</td></tr>
26+
<tr><td>j2sstrict</td><td>strict mode -- experimental</td></tr>
27+
<tr><td>j2strace=xxx or j2strace="xxx"</td><td>throw up an alert in the browser and a debugger statement in the developer whenever the specified text is found in System.out or System.err; if quotes are used, this must be an exact match to the entire output text (particularly useful when the message is something like "0", which otherwise would be next to impossible to find.</td></tr>
28+
<tr><td>j2sverbose</td><td>report all files loaded using AJAX</td></tr>
29+
</table>
30+
</body>
31+
</html>

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,7 +2381,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
23812381
if (J2S._strict)
23822382
System.err.println("j2sstrict - 'use strict' will be used - this is experimental");
23832383
if (J2S._startProfiling)
2384-
Clazz.startProfiling();
2384+
J2S.getProfile();
23852385
if (applet._noMonitor)
23862386
Clazz._LoaderProgressMonitor.showStatus = function() {
23872387
}
@@ -2688,8 +2688,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
26882688
}
26892689
J2S._registerApplet(applet._id, applet);
26902690
if (!applet.__Info.args || applet.__Info.args == "?") {
2691-
if (J2S._appArgs)
2692-
applet.__Info.args = decodeURIComponent(J2S.appArgs);
2691+
applet.__Info.args = (J2S._appArgs ? decodeURIComponent(J2S.appArgs).split("|") : []);
26932692
}
26942693
var isApp = applet._isApp = !!applet.__Info.main;
26952694
try {

0 commit comments

Comments
 (0)