Libraryless. Click here for Pure Java version (8623L/60K/204K).
!7 concept Cat { // -egory S a, b; S globalID = aGlobalID(); } static JTable table; p-substance { conceptsAndBot(); table = showConceptsTable(Cat, func(Cat c) { litorderedmap("A" := c.a, "B" := c.b, "Global ID" := c.globalID) }); addToWindow(table, jRightAlignedLine( jbutton("Add...", f newCat))); } // f takes a concept and makes a map for display static <A extends Concept> JTable showConceptsTable(final Class<A> cClass, final O f) { final JTable table = showTable(); awtOnConceptChanges(table, 1000, r { new L<Map> data; for (A c : list(cClass)) addIfNotNull(data, (Map) pcallF(f, c)); dataToTable_uneditable(data, table); }); ret table; } svoid newCat { final new JTextField a; final JTextField b = jTextField("Something else"); Runnable r = r { cnew(Cat, a := getTextTrim(a), b := getTextTrim(b)) }; showFormTitled("New recognition category", "A", a, "B", b, r); }
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: | #1006454 | 
| Snippet name: | Recognition Categories [dev.] | 
| Eternal ID of this version: | #1006454/1 | 
| Text MD5: | 437f72b15911cb24ad91a7dc4adecd04 | 
| Transpilation MD5: | db4b7f48d3cf8bfb5ea2a76df7ab98f2 | 
| Author: | stefan | 
| Category: | javax / ocr | 
| Type: | JavaX source code | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2017-01-17 15:34:00 | 
| Source code size: | 983 bytes / 40 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 860 / 1049 | 
| Referenced in: | [show references] |