Libraryless. Click here for Pure Java version (17766L/130K).
1 | !7 |
2 | |
3 | concept Distinction { |
4 | S concept, cases; |
5 | } |
6 | |
7 | module Distinctions > DynCRUD<Distinction> { |
8 | *() { super(Distinction); } |
9 | |
10 | afterVisualize { |
11 | replaceComponent(crud.tableSearcher.tfInput, func(JComponent c) -> JComponent { |
12 | centerAndEastWithMargin(c, jbutton("Add distinction...", rThread { |
13 | define(searchTerm()) |
14 | })) |
15 | }); |
16 | onEnter(crud.tableSearcher.tfInput, rThread { define(searchTerm()) }); |
17 | } |
18 | |
19 | void define(fS term) enter { |
20 | final JTextField tfConcept = jtextfield(or2(term, dm_topInput())), tfCases = jtextfield(); |
21 | showFormTitled("Add Rule", |
22 | "Concept:", tfConcept, |
23 | "Cases (use slashes):", tfCases, |
24 | rThread { |
25 | S concept = gtt(tfConcept), cases = gtt(tfCases); |
26 | uniq_sync(Distinction, +concept, +cases); |
27 | }); |
28 | focus(nempty(term) ? tfCases : tfConcept); |
29 | } |
30 | } |
Began life as a copy of #1019783
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019794 |
Snippet name: | Distinctions [Dyn Module] |
Eternal ID of this version: | #1019794/3 |
Text MD5: | 264a7d24422398cebe8c41d78d54f7c6 |
Transpilation MD5: | be83367e4da06c81d9dfd9c726f38803 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-26 20:58:04 |
Source code size: | 872 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 294 / 2442 |
Version history: | 2 change(s) |
Referenced in: | [show references] |