Libraryless. Click here for Pure Java version (9374L/65K/225K).
1 | !752 |
2 | |
3 | concepts. |
4 | |
5 | concept Example {
|
6 | BWImage image; |
7 | S imageMD5; |
8 | S text; |
9 | } |
10 | |
11 | p {
|
12 | conceptsAndBot(); |
13 | |
14 | JTable table = showConceptsTable(Example); |
15 | addFrameMenu(table, "Menu", |
16 | jmenuitem("Add example...", "addExample"));
|
17 | addToWindow(table, jbutton("Add example...", "addExample"));
|
18 | } |
19 | |
20 | svoid addExample {
|
21 | final new JTextField tf; |
22 | final new ImageChooser ic; |
23 | showTitledForm("Add Example - " + programTitle(),
|
24 | "Image", ic, |
25 | "Text", tf, |
26 | r {
|
27 | BWImage image = ic.getBWImage(); |
28 | if (image == null) ret; |
29 | Example e = cnew(Example, |
30 | +image, |
31 | imageMD5 := md5OfBWImage(image), |
32 | text := trim(tf.getText())); |
33 | checkMarkAnimation("Example saved! " + e.id + " " + quote(e.text), 2);
|
34 | }); |
35 | } |
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xinetxnxrdbb
No comments. add comment
| Snippet ID: | #1006005 |
| Snippet name: | Learning to read GUI (dev.) |
| Eternal ID of this version: | #1006005/1 |
| Text MD5: | 27b68d176e8e04d9b5d2a5c6c72b53a6 |
| Transpilation MD5: | 6c1190c2986ca2356133354707204aec |
| Author: | stefan |
| Category: | javax / gui / ocr |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-12-15 16:43:26 |
| Source code size: | 779 bytes / 35 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 852 / 1473 |
| Referenced in: | [show references] |