static <A> DefaultTreeCellRenderer customToStringTreeCellRenderer(final F1<A, S> toString) { ret new DefaultTreeCellRenderer { @Override public Component getTreeCellRendererComponent( JTree tree, O value, bool selected, bool expanded, bool leaf, int row, bool hasFocus) { ret super.getTreeCellRendererComponent(tree, callF(toString, ((DefaultMutableTreeNode) value).getUserObject()), selected, expanded, leaf, row, hasFocus); } }; }
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: | 578 / 620 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1030797 - customToStringListCellRenderer |