Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

46
LINES

< > BotCompany Repo | #1031416 // Local Gazelle [for users]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 1951K of libraries. Click here for Pure Java version (9682L/68K).

!7

static MapSO _renameClasses = litmap("GazelleBEA" := "GazelleBEAForUsers");

mainPackage gazelle
mainClassName main

module GazelleBEAForUsers > GazelleBEA {
  transient O eleu;
  switchable S gazelleImage = #1102967;
  transient S myURL;
  
  start {
    dm_requireInBackground("#1031417/Eleu3", eleu -> { this.eleu = eleu; grabURL(); });
    /*dm_startThread(r {
      dm_require("#1031421/HolePuncher");
    });*/
    dm_onFieldChange gazelleImage(r dm_revisualize);
    dm_doEveryAndNow(10.0, r grabURL);
  }
  
  void init :: after {
    set !alwaysRedirectToHttps;
  }

  visual dm_visualizeWithEnabled(jtabs(
    "Main" := jCenterIn3x3Grid(
      centerAndSouthWithMargin(openButton(), setFont(sansSerif(20), dm_centeredLabel myURL()))),
    "Log" := makePrintLogPanel()
  ));

  // API
  
  void grabURL q {
    _setField(myURL := myURL());
  }

  JButton openButton() {
    ret setToolTip("Open your local Gazelle installation through your browser", jImageButton(gazelleImage,
      r { openInPlatformBrowser(myURL()) }));
  }

  S myURL() { ret "http://localhost:" + dm_get httpPort(eleu); }
}

!include early #1031418 // Gazelle BEA

Author comment

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: 281 / 3453
Version history: 39 change(s)
Referenced in: [show references]