1 | static new WeakHashMap<JFrame, S> titleStatus_map; |
2 | |
3 | static void titleStatus(Component c, O _status) { |
4 | S status = strOrEmpty(_status); |
5 | JFrame f = getFrame(c); |
6 | if (f == null) ret; |
7 | S sep = " - "; |
8 | S s = titleStatus_map.get(f); |
9 | if (s != null) s = empty(status) ? s : status + sep + s; |
10 | else s = replaceLeader(status, sep, getFrameTitle(f)); |
11 | setFrameTitle(f, s); |
12 | } |
13 | |
14 | static void titleStatus_setBaseTitle(Component c, S title) { |
15 | mapPut(titleStatus_map, getFrame(c), title); |
16 | } |
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: | #1006706 |
Snippet name: | titleStatus - add a leading status to a window's title |
Eternal ID of this version: | #1006706/6 |
Text MD5: | 0fe9e457384485216b8ad64d51dc0121 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-20 16:38:09 |
Source code size: | 499 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 442 / 511 |
Version history: | 5 change(s) |
Referenced in: | [show references] |