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

9
LINES

< > BotCompany Repo | #1005669 // imageSelectionDepend - enable button when ImageSurface has a selection

JavaX fragment (include)

static JButton imageSelectionDepend(final ImageSurface is, final JButton b) {
  final Runnable prev = is.onSelectionChange;
  is.onSelectionChange = r {
    b.setEnabled(is.selection != null);
    pcallF(prev);
  };
  b.setEnabled(is.selection != null);
  ret b;
}

Author comment

Began life as a copy of #1005360

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1005669
Snippet name: imageSelectionDepend - enable button when ImageSurface has a selection
Eternal ID of this version: #1005669/1
Text MD5: d616d546da45dab975c7005b43fb8ad7
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-02 16:05:45
Source code size: 272 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 568 / 564
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)