Libraryless. Click here for Pure Java version (9509L/56K).
1 | sclass SurfaceShowingAutoZoomedImage > JVolatileImageSurface { |
2 | gettable BufferedImage image; |
3 | |
4 | *() { this(null); } |
5 | |
6 | *(BufferedImage image) { |
7 | volatileMode(false); // seems it's not even faster |
8 | setImage(image); |
9 | } |
10 | |
11 | void setImage(BufferedImage image) { |
12 | this.image = image; |
13 | setRenderable(new FitImageInComponentRenderable(image) |
14 | .backgroundColor(null)); |
15 | repaint(); |
16 | } |
17 | |
18 | void noImage() { setImage(null); } |
19 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034406 |
Snippet name: | SurfaceShowingAutoZoomedImage |
Eternal ID of this version: | #1034406/5 |
Text MD5: | e1c138558d72813f5cd5d89bfd09d15e |
Transpilation MD5: | 2f7c98189ef552836eb4387941abeadb |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-05 23:52:38 |
Source code size: | 462 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 136 / 238 |
Version history: | 4 change(s) |
Referenced in: | [show references] |