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

12
LINES

< > BotCompany Repo | #1019092 // customToStringTreeCellRenderer

JavaX fragment (include)

1  
static <A> DefaultTreeCellRenderer customToStringTreeCellRenderer(final F1<A, S> toString) {
2  
  ret new DefaultTreeCellRenderer {
3  
    @Override
4  
    public Component getTreeCellRendererComponent(
5  
      JTree tree, O value, bool selected, bool expanded, bool leaf,
6  
      int row, bool hasFocus) {
7  
      ret super.getTreeCellRendererComponent(tree,
8  
        callF(toString, ((DefaultMutableTreeNode) value).getUserObject()),
9  
        selected, expanded, leaf, row, hasFocus);
10  
    }
11  
  };
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019092
Snippet name: customToStringTreeCellRenderer
Eternal ID of this version: #1019092/4
Text MD5: 50326cee47ac58c371cedcafb1eb267a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-23 13:25:09
Source code size: 493 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 354 / 392
Version history: 3 change(s)
Referenced in: [show references]