Libraryless. Click here for Pure Java version (3230L/19K).
1 | static JSplitPane setSplitPaneOnFirstShowing(Component c, double value, int delay default 0) { |
2 | final JSplitPane sp = first(childrenOfType(c, JSplitPane.class)); |
3 | if (sp != null) |
4 | onFirstResize(sp, r { |
5 | ifdef setSplitPaneOnFirstShowing_debug |
6 | printVars setSplitPaneOnFirstShowing(+c, +value, size := c.getSize()); |
7 | endifdef |
8 | if (delay == 0) |
9 | sp.setDividerLocation(value); |
10 | else awtLater(delay, r { |
11 | sp.setDividerLocation(value); |
12 | }); |
13 | }); |
14 | ret sp; |
15 | } |
Began life as a copy of #1007235
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: | #1019419 |
Snippet name: | setSplitPaneOnFirstShowing |
Eternal ID of this version: | #1019419/9 |
Text MD5: | ed556fdb9db319817a23f738b57d62b0 |
Transpilation MD5: | 27df9207cf4b7ae0ff524bd2a711100f |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-03-28 16:01:24 |
Source code size: | 518 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 355 / 458 |
Version history: | 8 change(s) |
Referenced in: | [show references] |