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

16
LINES

< > BotCompany Repo | #1007235 // setSplitPaneLater - set split location of outer-most JSplitPane in next AWT cycle

JavaX fragment (include)

static JSplitPane setSplitPaneLater(final Component c, final double value) {
  ret setSplitPaneLater(c, value, 0);
}

// value = 0 to 1
static JSplitPane setSplitPaneLater(final Component c, final double value, int delay) {
  final JSplitPane sp = first(childrenOfType(c, JSplitPane.class));
  if (sp != null) {
    Runnable r = r { sp.setDividerLocation(value) };
    if (delay > 0)
      awtLater(sp, delay, r);
    else
      SwingUtilities.invokeLater(r);
  }
  ret sp;
}

Author comment

Began life as a copy of #1006638

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1007235
Snippet name: setSplitPaneLater - set split location of outer-most JSplitPane in next AWT cycle
Eternal ID of this version: #1007235/5
Text MD5: 252e46cf4dc8552fcd9a17952632d654
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-17 12:35:11
Source code size: 490 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 572 / 615
Version history: 4 change(s)
Referenced in: [show references]