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

14
LINES

< > BotCompany Repo | #1025644 // tempOnFrameIconified

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2462L/16K).

static AutoCloseable tempOnFrameIconified(Component c, fO r) {
  ret c == null ? null : swing(() -> {
    JFrame f = getFrame(c);
    if (f == null) null;
    WindowListener l = new WindowAdapter {
      public void windowIconified(WindowEvent e) {
        temp tempRememberListener(f, 'removeWindowListener, this);
        pcallF(r);
      }
    };
    f.addWindowListener(l);
    ret autoCloseable { swing { f.removeWindowListener(l); } };
  });
}

Author comment

Began life as a copy of #1025643

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025644
Snippet name: tempOnFrameIconified
Eternal ID of this version: #1025644/4
Text MD5: fb314b4a94cfe1e7b02011aa6df353a0
Transpilation MD5: b552ca5fba6b438c2da039fd1567ae5b
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-10-11 00:39:34
Source code size: 462 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 216 / 296
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1026810 - tempOnWindowStateChanged