// updateFrequency = check file every x seconds static JTable showFileAsTable(File file, double updateFrequency, O dataMakingFunction) { ret showFileAsTable(null, file, updateFrequency, dataMakingFunction); } static JTable showFileAsTable(final JTable _table, File file, double updateFrequency, O dataMakingFunction) { class X { JTable table = _table; *() { Runnable load = r { O data = map(func(S s) { joinLines(" / ", s) }, loadLogicList()); if (table != null) dataToTable_uneditable(table, data); else table = showTable(tableWithToolTips(), data); }; long lastMod = logicListFile().lastModified(); call(load); awt_onFileChange(5, table, logicListFile(), lastMod, load); } } ret new X().table; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004416 |
Snippet name: | showFileAsTable (and update when file changes) |
Eternal ID of this version: | #1004416/1 |
Text MD5: | 2c4f3bcb93f505f2514bc2a9c343f8da |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-17 20:46:34 |
Source code size: | 816 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 674 / 655 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |