Download Jar. Libraryless. Click here for Pure Java version (7817L/52K).
1 | !7 |
2 | |
3 | p-type {
|
4 | conceptsToEnglishInfoBox(); |
5 | for i to 10: |
6 | print(random(keys(aiConceptsMap_cached()))); |
7 | } |
8 | |
9 | static Window conceptsToEnglishInfoBox_box; |
10 | |
11 | svoid conceptsToEnglishInfoBox {
|
12 | thread "Info Box" {
|
13 | Window infoBox = null; |
14 | S lastMsg = ""; |
15 | repeat with ms sleep 500 {
|
16 | Component c = componentAtMouse(); |
17 | S word = wordAtMouse(), msg = ""; |
18 | if (possibleGlobalID(word)) {
|
19 | aiConceptsMap_clearCache(60); // clear cache every 60 seconds |
20 | S name = conceptToName(word); |
21 | if (neq(name, word)) |
22 | msg = word + ": " + name; |
23 | } |
24 | if (neq(msg, lastMsg)) {
|
25 | lastMsg = msg; |
26 | disposeWindow(infoBox); |
27 | infoBox = null; |
28 | if (nempty(msg)) {
|
29 | infoBox = infoMessage_noprint(msg); |
30 | if (c instanceof JComponent) |
31 | setToolTipText((JComponent) c, msg); |
32 | } |
33 | } |
34 | } |
35 | } |
36 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1007437 |
| Snippet name: | Test conceptsToEnglishInfoBox |
| Eternal ID of this version: | #1007437/14 |
| Text MD5: | ce9b3cb8bba4b5785f7d7d7ef86927b4 |
| Transpilation MD5: | af0b2fe10275bd5a3cff123599736443 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-03-23 14:23:56 |
| Source code size: | 920 bytes / 36 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1192 / 2347 |
| Version history: | 13 change(s) |
| Referenced in: | [show references] |