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

9
LINES

< > BotCompany Repo | #1015159 // trimHStackFromLeft

JavaX fragment (include)

svoid trimHStackFromLeft(final DynamicHStack stack, final int n) {
  swing {
    L<Component> l = stack.components();
    l = takeFirst(l(l)-n, l);
    for (Component c : l)
      stack.remove(c);
    if (nempty(l)) stack.revalidate();
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015159
Snippet name: trimHStackFromLeft
Eternal ID of this version: #1015159/1
Text MD5: e79ae2e4e51d2135124786eebf9d9e9a
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-10 13:00:02
Source code size: 249 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 361 / 404
Referenced in: [show references]