Libraryless. Click here for Pure Java version (2654L/17K).
1 | static Pair<JTabbedPane, Int> enclosingTab(Component _c) {
|
2 | ret swing(() -> {
|
3 | Component c = _c; |
4 | while (c != null) {
|
5 | Container p = c.getParent(); |
6 | if (p cast JTabbedPane) |
7 | ret pair(p, p.indexOfComponent(c)); |
8 | c = c.getParent(); |
9 | } |
10 | null; |
11 | }); |
12 | } |
Began life as a copy of #1007191
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1028105 |
| Snippet name: | enclosingTab |
| Eternal ID of this version: | #1028105/1 |
| Text MD5: | 8501053ff6c9ca28aa3e84fa7a8c0fa1 |
| Transpilation MD5: | 89f69cbe8df81505a832d12ada5ea0d0 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-05-19 15:00:43 |
| Source code size: | 293 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 412 / 567 |
| Referenced in: | [show references] |