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

10
LINES

< > BotCompany Repo | #1015605 // textComponent_substringRect

JavaX fragment (include)

static Rect textComponent_substringRect(final JTextComponent tc, final int startIndex, final int endIndex) {
  ret swing(func -> Rect {
    mergeRects(toRect(tc.modelToView(startIndex)), toRect(tc.modelToView(endIndex)))
  });
}

static Rect textComponent_substringRect(final JTextComponent tc, IntRange charRange) {
  ret charRange == null ? null
    : textComponent_substringRect(tc, charRange.start, charRange.end);
}

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: #1015605
Snippet name: textComponent_substringRect
Eternal ID of this version: #1015605/7
Text MD5: 8e59f7db9852c395b8ba2eedeb3c1045
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-19 19:39:03
Source code size: 431 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 371 / 418
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)