static void resizeImageButtonToMax(final JButton b, final int max) { swing { BufferedImage img = imageToBufferedImage(((ImageIcon) b.getIcon()).getImage()); if (img == null) ret; BufferedImage img2 = scaleBufferedImageToMaxWidthOrHeight(img, max); if (img2 != img) setButtonImage(img2, b); } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015073 |
Snippet name: | resizeImageButtonToMax |
Eternal ID of this version: | #1015073/2 |
Text MD5: | fa3811b19cf3099501fa9c1c00d9680b |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-07 18:58:33 |
Source code size: | 327 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 335 / 381 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |