Uses 1951K of libraries. Click here for Pure Java version (9682L/68K).
1 | !7 |
2 | |
3 | static MapSO _renameClasses = litmap("GazelleBEA" := "GazelleBEAForUsers");
|
4 | |
5 | mainPackage gazelle |
6 | mainClassName main |
7 | |
8 | module GazelleBEAForUsers > GazelleBEA {
|
9 | transient O eleu; |
10 | switchable S gazelleImage = #1102967; |
11 | transient S myURL; |
12 | |
13 | start {
|
14 | dm_requireInBackground("#1031417/Eleu3", eleu -> { this.eleu = eleu; grabURL(); });
|
15 | /*dm_startThread(r {
|
16 | dm_require("#1031421/HolePuncher");
|
17 | });*/ |
18 | dm_onFieldChange gazelleImage(r dm_revisualize); |
19 | dm_doEveryAndNow(10.0, r grabURL); |
20 | } |
21 | |
22 | void init :: after {
|
23 | set !alwaysRedirectToHttps; |
24 | } |
25 | |
26 | visual dm_visualizeWithEnabled(jtabs( |
27 | "Main" := jCenterIn3x3Grid( |
28 | centerAndSouthWithMargin(openButton(), setFont(sansSerif(20), dm_centeredLabel myURL()))), |
29 | "Log" := makePrintLogPanel() |
30 | )); |
31 | |
32 | // API |
33 | |
34 | void grabURL q {
|
35 | _setField(myURL := myURL()); |
36 | } |
37 | |
38 | JButton openButton() {
|
39 | ret setToolTip("Open your local Gazelle installation through your browser", jImageButton(gazelleImage,
|
40 | r { openInPlatformBrowser(myURL()) }));
|
41 | } |
42 | |
43 | S myURL() { ret "http://localhost:" + dm_get httpPort(eleu); }
|
44 | } |
45 | |
46 | !include early #1031418 // Gazelle BEA |
Began life as a copy of #1031393
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031416 |
| Snippet name: | Local Gazelle [for users] |
| Eternal ID of this version: | #1031416/40 |
| Text MD5: | ea85db8430fdd63b4f2b8c106f24dfe4 |
| Transpilation MD5: | c18b6168983bb9f3d193163e944d03a3 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-07-01 16:10:13 |
| Source code size: | 1192 bytes / 46 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 532 / 3733 |
| Version history: | 39 change(s) |
| Referenced in: | [show references] |