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

18
LINES

< > BotCompany Repo | #1016706 // dm_setBounds

JavaX fragment (include)

1  
static void dm_setBounds(O module, int x, int y, int w, int h) {
2  
  O stem = dm_getStem(module);
3  
  if (stem == null) ret;
4  
  Component vis = cast call(stem, 'vis);
5  
  JInternalFrame f = getInternalFrame(vis);
6  
  if (f != null)
7  
    setBounds(f, x, y, w, h);
8  
  else
9  
    set(stem, frameRect := quickExport(Rect(x, y, w, h), stem); // TODO: should flush
10  
}
11  
12  
static void dm_setBounds(int x, int y, int w, int h) {
13  
  dm_setBounds(dm_current_generic(), x, y, w, h);
14  
}
15  
16  
static void dm_setBounds(O module, Rect r) {
17  
  if (r != null) dm_setBounds(module, r.x, r.y, r.w, r.h);
18  
}

Author comment

Began life as a copy of #1016705

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: #1016706
Snippet name: dm_setBounds
Eternal ID of this version: #1016706/7
Text MD5: 54fff14b7f24fbdd174349ae3d29ad97
Author: stefan
Category: javax / dynamic modules
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-12 22:57:54
Source code size: 579 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 389 / 436
Version history: 6 change(s)
Referenced in: [show references]