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)

1  
static JButton imageSelectionDepend(final ImageSurface is, final JButton b) {
2  
  final Runnable prev = is.onSelectionChange;
3  
  is.onSelectionChange = r {
4  
    b.setEnabled(is.selection != null);
5  
    pcallF(prev);
6  
  };
7  
  b.setEnabled(is.selection != null);
8  
  ret b;
9  
}

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: 567 / 564
Referenced in: [show references]