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

42
LINES

< > BotCompany Repo | #1010640 // Web Analysis v1 [dev.]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (15201L/109K).

!7

static Canvas canvas;
static CirclesAndLines cal;
sbool commentLayout;

p-subst {
  Pair<CirclesAndLines, Canvas> p = showWeb(randomWeb(), 800, 600);
  cal = p.a;
  canvas = p.b;
  doFrameTitle();
  addButtonsToWindow2(canvas, "Comment", f comment, "Next", r {
    CirclesAndLines newCAL = webToCAL(randomWeb());
    canvas = showCAL_2(cal, newCAL, canvas);
    doFrameTitle();
  });
  focusButton(canvas, "Next");
}

svoid doFrameTitle {
  frameTitle(canvas, joinNempties(" - ", cal.globalID, quoteIfNempty(cal.title)));
}

svoid comment {
  if (commentLayout) ret;
  set commentLayout;
  cal.scale = 0.5;
  
  JFrame f = getFrame(canvas);
  Container cp = f.getContentPane();
  
  new JPanel newCP;
  newCP.setLayout(null);
  newCP.add(cp);
  
  f.setContentPane(newCP);
  revalidate(f);
  
  animateBounds((JComponent) cp,
    rect(0, 0, newCP.getWidth(), newCP.getHeight()),
    rect(100, 100, 200, 200), 0.4);
}

Author comment

Began life as a copy of #1010628

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, imzmzdywqqli, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

-
Snippet ID: #1010640
Snippet name: Web Analysis v1 [dev.]
Eternal ID of this version: #1010640/16
Text MD5: 89bbe077d7f008d07a9ab815cb4cba8a
Transpilation MD5: 30d9438e8e3d91ab354b1d03fc8f1fbf
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-24 03:14:16
Source code size: 961 bytes / 42 lines
Pitched / IR pitched: No / No
Views / Downloads: 606 / 1382
Version history: 15 change(s)
Referenced in: