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

43
LINES

< > BotCompany Repo | #1009748 // Item Pages [OK]

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

Download Jar. Uses 4489K of libraries. Click here for Pure Java version (9785L/69K).

1  
!7
2  
3  
concept ItemPage {
4  
  S globalID = aGlobalID();
5  
  S title, imageID;
6  
  long created = now(), occurred;
7  
  L<S> paragraphs = listInConcept(this);
8  
}
9  
10  
static JTextPane textPane;
11  
12  
p-subst {
13  
  setConsoleInputFontSize(20);
14  
  centerConsoleInput();
15  
  centerBottomConsole();
16  
  db();
17  
  bot("Show Item Page.");
18  
  focusConsole();
19  
}
20  
21  
static bool showItemPage(S _word) {
22  
  final new ItemPage p;
23  
  fS word = trim(_word);
24  
  fS text = word + "\n\n";
25  
  cset(p, title := word);
26  
  fS shorter = deUserSaid(word);
27  
  swing {
28  
    JFrame f = getFrame(textPane);
29  
    frameToFront(showFrame(shorter, textPane = jcenteredtextpane(text, style_bold(style_fontSize(24))), f));
30  
    textPane.setEditable(false);
31  
    focusConsole();
32  
    thread {
33  
      BufferedImage img = quickVisualize(shorter);
34  
      addImageToTextPane(textPane, img);
35  
      cset(p, imageID := "quickvis/" + urlencode(quickVisualize_preprocess(shorter)) + "/" + md5OfBufferedImage(img));
36  
    }
37  
  }
38  
  true;
39  
}
40  
41  
answer {
42  
  if (showItemPage(s)) ret "OK";
43  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009748
Snippet name: Item Pages [OK]
Eternal ID of this version: #1009748/10
Text MD5: 9587350651375cf4e2268b6af12c99df
Transpilation MD5: 7a7dd9ee5177a21a08dbd48e69a353eb
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-08-16 19:44:54
Source code size: 1030 bytes / 43 lines
Pitched / IR pitched: No / No
Views / Downloads: 438 / 1159
Version history: 9 change(s)
Referenced in: [show references]