Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1010634 // titleStatus2 - add a leading status to a window's title (equally bad logic)

JavaX fragment (include)

1  
please include function titleStatus.
2  
3  
static void titleStatus2(Component c, S status) {
4  
  JFrame f = getFrame(c);
5  
  if (f == null) ret;
6  
  S sep = " - ";
7  
  S s = titleStatus_map.get(f);
8  
  if (s != null) s = empty(status) ? s : status + sep + s;
9  
  else s = replaceLeader2(status, sep, getFrameTitle(f));
10  
  setFrameTitle(f, s);
11  
}

Author comment

Began life as a copy of #1006706

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: #1010634
Snippet name: titleStatus2 - add a leading status to a window's title (equally bad logic)
Eternal ID of this version: #1010634/1
Text MD5: 799d400a207f3e4820e49484e1afb37f
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-24 00:05:04
Source code size: 336 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 467 / 473
Referenced in: [show references]