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

13
LINES

< > BotCompany Repo | #1018940 // awt_onGlobalFocusChange

JavaX fragment (include)

import java.beans.*;

static AutoCloseable awt_onGlobalFocusChange(final VF1<PropertyChangeEvent> f) {
  final KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
  final PropertyChangeListener listener = new {
    public void propertyChange(PropertyChangeEvent e) {
      if (eq(e.getPropertyName(), "focusOwner"))
        pcallF(f, e);
    }
  };
  fm.addPropertyChangeListener(listener);
  ret autoCloseable { fm.removePropertyChangeListener(listener); };
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018940
Snippet name: awt_onGlobalFocusChange
Eternal ID of this version: #1018940/4
Text MD5: 2895ed4875f9210dcabfdd33f35db0db
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-16 13:42:42
Source code size: 501 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 341 / 383
Version history: 3 change(s)
Referenced in: [show references]