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).

!7

concept ItemPage {
  S globalID = aGlobalID();
  S title, imageID;
  long created = now(), occurred;
  L<S> paragraphs = listInConcept(this);
}

static JTextPane textPane;

p-subst {
  setConsoleInputFontSize(20);
  centerConsoleInput();
  centerBottomConsole();
  db();
  bot("Show Item Page.");
  focusConsole();
}

static bool showItemPage(S _word) {
  final new ItemPage p;
  fS word = trim(_word);
  fS text = word + "\n\n";
  cset(p, title := word);
  fS shorter = deUserSaid(word);
  swing {
    JFrame f = getFrame(textPane);
    frameToFront(showFrame(shorter, textPane = jcenteredtextpane(text, style_bold(style_fontSize(24))), f));
    textPane.setEditable(false);
    focusConsole();
    thread {
      BufferedImage img = quickVisualize(shorter);
      addImageToTextPane(textPane, img);
      cset(p, imageID := "quickvis/" + urlencode(quickVisualize_preprocess(shorter)) + "/" + md5OfBufferedImage(img));
    }
  }
  true;
}

answer {
  if (showItemPage(s)) ret "OK";
}

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: 606 / 1505
Version history: 9 change(s)
Referenced in: [show references]