Skip to content

Commit 99386f8

Browse files
committed
update j2sApplet.js
?j2sdebugcore == ?j2snozcore ?j2sdebugcode == ?j2snocore
1 parent 739ea06 commit 99386f8

File tree

6 files changed

+17
-25
lines changed

6 files changed

+17
-25
lines changed
-730 Bytes
Binary file not shown.

sources/net.sf.j2s.java.core/src/swingjs/jquery/JQueryUI.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,27 @@ public static void loadJQComboBox() {
3737
String resource = RESOURCE_J2SCOMBOBOX;
3838
if (/** @j2sNative !J2S.__makeComboBox && */true) {
3939
loadResource(resource);
40-
JSUtil.J2S.__makeComboBox();
4140
}
41+
// outside {} in case j2sComboBox.js has been preloaded, overriding the setting here
42+
JSUtil.J2S.__makeComboBox();
4243
}
4344

4445
public static void loadJQMenu() {
4546
String resource = RESOURCE_J2SMENU;
4647
if (/** @j2sNative !J2S.__makeMenu && */true) {
4748
loadResource(resource);
48-
JSUtil.J2S.__makeMenu();
4949
}
50+
// outside {} in case j2sMenu.js has been preloaded, overriding the setting here
51+
JSUtil.J2S.__makeMenu();
5052
}
5153

5254
public static void loadJQSlider() {
5355
String resource = RESOURCE_J2SSLIDER;
5456
if (/** @j2sNative !J2S.__makeSlider && */true) {
5557
loadResource(resource);
56-
JSUtil.J2S.__makeSlider();
5758
}
59+
// outside {} in case j2sSlider.js has been preloaded, overriding the setting here
60+
JSUtil.J2S.__makeSlider();
5861
}
5962

6063
private static void loadResource(String resourceName) {

sources/net.sf.j2s.java.core/srcjs/README.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ This directory:
66

77
It contains:
88

9-
109
js/*.js a set of files needed for all SwingJS pages
1110

12-
js/make.bat a script that concatenates the *.js files in the right order to make swingjs2.js
11+
js/core/ a folder used by build_core_applet.xml to create Google closure-compiled swingjs/j2s/core files.
1312

14-
It is here as a convenience only; when in site/js, a developer can run this script
15-
to test changes. It is not used by build_core_applet.xml, which uses ANT concat instead.
13+
php/jsmol.php a serverside PHP script that can be run to load resources that cannot be loaded by AJAX directly
1614

17-
js/core/ a folder used by build_core_applet.xml to create Google closure-compiled swingjs/j2s/core files.
18-
15+
DO NOT CHANGE SWINGJS2.JS -- it is recreated by build-SwingJS-site.xml
1916

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// j2sApplet.js BH = Bob Hanson hansonr@stolaf.edu
22

3+
// BH 2024.11.09 makes equivalent J2S._debugCore and J2S._nozcore, as well as J2S._debugCode and J2S._nocore
34
// BH 2024.10.03 adds two-finger tap as "click"; reinstates touch gestures lost when we went to pointerup 2023.11.01
45
// BH 2023.12.14 fixes resizing into application (making it smaller)
56
// BH 2023.12.13 fixes RIGHT-DRAG and SHIFT-LEFT-DRAG modifier
@@ -106,15 +107,14 @@ if (getFlag("j2s")) {
106107
// note: these flag checks are purposely loose. "?j2smouse" will set j2smouse and j2smousemove.
107108
J2S._appArgs = getURIField("j2sargs", null); // to be passed on to application
108109
J2S._debugClip = getFlag("j2sdebugclip"); // shows all show/restore and clip operations in JSGraphics2D
109-
J2S._debugCode = getFlag("j2sdebugcode"); // same as j2snocore?
110-
J2S._debugCore = getFlag("j2sdebugcore"); // same as j2snozcore?
111110
J2S._debugPaint = getFlag("j2sdebugpaint"); // repaint manager information
112111
J2S._headless = getFlag("j2sheadless"); // run headlessly
113112
J2S._lang = getURIField("j2slang", null); // preferred language; application should check
114113
// will alert in system.out.println with a message when events occur
115-
J2S._loadcore = !getFlag("j2snocore"); // no core files
116114
J2S._nooutput = getFlag("j2snooutput"); // no System.out, only System.err message
117-
J2S._nozcore = getFlag("j2snozcore"); // no compressed core.z.js files
115+
J2S._debugCore = J2S._nozcore = getFlag("j2sdebugcore") || getFlag("j2snozcore"); // no compressed core.z.js files
116+
J2S._debugCode = J2S._nocore = getFlag("j2sdebugcode") || getFlag("j2snocore"); // no core files
117+
J2S._loadcore = !J2S._nocore;
118118
J2S._strict = getFlag("j2sstrict"); // strict mode -- experimental
119119
J2S._startProfiling = getFlag("j2sprofile"); // track object creation
120120
J2S._traceEvents = getFlag("j2sevents"); // reports ComponentEvent instances

sources/net.sf.j2s.java.core/srcjs/js/make.bat

Lines changed: 0 additions & 8 deletions
This file was deleted.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10686,6 +10686,7 @@ return jQuery;
1068610686
})(jQuery,document,"click mousemove mouseup touchmove touchend", "outjsmol");
1068710687
// j2sApplet.js BH = Bob Hanson hansonr@stolaf.edu
1068810688

10689+
// BH 2024.11.09 makes equivalent J2S._debugCore and J2S._nozcore, as well as J2S._debugCode and J2S._nocore
1068910690
// BH 2024.10.03 adds two-finger tap as "click"; reinstates touch gestures lost when we went to pointerup 2023.11.01
1069010691
// BH 2023.12.14 fixes resizing into application (making it smaller)
1069110692
// BH 2023.12.13 fixes RIGHT-DRAG and SHIFT-LEFT-DRAG modifier
@@ -10792,15 +10793,14 @@ if (getFlag("j2s")) {
1079210793
// note: these flag checks are purposely loose. "?j2smouse" will set j2smouse and j2smousemove.
1079310794
J2S._appArgs = getURIField("j2sargs", null); // to be passed on to application
1079410795
J2S._debugClip = getFlag("j2sdebugclip"); // shows all show/restore and clip operations in JSGraphics2D
10795-
J2S._debugCode = getFlag("j2sdebugcode"); // same as j2snocore?
10796-
J2S._debugCore = getFlag("j2sdebugcore"); // same as j2snozcore?
1079710796
J2S._debugPaint = getFlag("j2sdebugpaint"); // repaint manager information
1079810797
J2S._headless = getFlag("j2sheadless"); // run headlessly
1079910798
J2S._lang = getURIField("j2slang", null); // preferred language; application should check
1080010799
// will alert in system.out.println with a message when events occur
10801-
J2S._loadcore = !getFlag("j2snocore"); // no core files
1080210800
J2S._nooutput = getFlag("j2snooutput"); // no System.out, only System.err message
10803-
J2S._nozcore = getFlag("j2snozcore"); // no compressed core.z.js files
10801+
J2S._debugCore = J2S._nozcore = getFlag("j2sdebugcore") || getFlag("j2snozcore"); // no compressed core.z.js files
10802+
J2S._debugCode = J2S._nocore = getFlag("j2sdebugcode") || getFlag("j2snocore"); // no core files
10803+
J2S._loadcore = !J2S._nocore;
1080410804
J2S._strict = getFlag("j2sstrict"); // strict mode -- experimental
1080510805
J2S._startProfiling = getFlag("j2sprofile"); // track object creation
1080610806
J2S._traceEvents = getFlag("j2sevents"); // reports ComponentEvent instances

0 commit comments

Comments
 (0)