Libraryless. Click here for Pure Java version (2126L/14K).
1 | static <A extends JComponent> A bindAutoCloseableToComponent(IF0<AutoCloseable> f, A component) { |
2 | new Var<AutoCloseable> var; |
3 | ret bindToComponent(component, r { |
4 | var.set(callF(f)); |
5 | }, r { |
6 | close(getAndClearVar(var)) |
7 | }); |
8 | } |
Began life as a copy of #1003557
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024646 |
Snippet name: | bindAutoCloseableToComponent |
Eternal ID of this version: | #1024646/1 |
Text MD5: | ad20c6c0fdf62b1813cb7e9c89a0a52a |
Transpilation MD5: | 55f8cae79ccebb4f414924de8ca9baac |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-21 15:40:43 |
Source code size: | 242 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 186 / 268 |
Referenced in: | [show references] |