static void inputMultiLineText(fS msg, fO action) {
inputMultiLineText(msg, "", action);
}
// action: voidfunc(S)
static void inputMultiLineText(fS msg, final S defaultText, fO action) {
fO threadInfo = _threadInfo();
awt {
final JTextArea ta = wordWrapTypeWriterTextArea(defaultText);
S title = joinStrings(" | ", msg, programName());
JComponent form = showFormTitled2(title,
unnull(msg), ta,
r {
vmBus_send('inputtingText_OK, threadInfo, msg, ta);
callF_thread(action, getText(ta))
});
renameSubmitButton(form, "OK");
vmBus_send('inputtingText, threadInfo, msg, ta);
}
}Began life as a copy of #1014599
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: | #1019977 |
| Snippet name: | inputMultiLineText - show input form for multi-line text. calls action in new thread |
| Eternal ID of this version: | #1019977/3 |
| Text MD5: | f7f862757a0d89e8fe98ec14c42ff9f6 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-02 21:22:00 |
| Source code size: | 654 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 898 / 883 |
| Version history: | 2 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |