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

12
LINES

< > BotCompany Repo | #1035951 // JThumbnailButton

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

Transpiled version (12193L) is out of date.

sclass JThumbnailButton > JToggleButton {
  ThumbnailCache thumbnailCache;
  gettable File imageFile;
  
  *(ThumbnailCache *thumbnailCache, File *imageFile) {
    toolTip(this, fileInfo(imageFile));
    setButtonImage(this, whiteImage(thumbnailCache.thumbnailSize()));
    thumbnailCache.get(imageFile, img -> {
      setButtonImage(this, centerImageOnBackground(Color.gray, thumbnailCache.thumbnailSize(), img));
    });
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1035951
Snippet name: JThumbnailButton
Eternal ID of this version: #1035951/6
Text MD5: 94445e561d979460427850de8a3fcf91
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-08-17 19:45:42
Source code size: 439 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 61 / 103
Version history: 5 change(s)
Referenced in: [show references]