Libraryless. Click here for Pure Java version (5456L/39K).
1 | static JComponent ffmpegVersionPanel() { |
2 | JLabel lblVersion = jlabel(); |
3 | Runnable update = callAndReturn(r { |
4 | setText(lblVersion, or2(ffmpegVersion(), "Error: FFMPEG not found!")) |
5 | }); |
6 | bindAutoCloseableToComponent(() -> vmBus_onMessage ffmpegLocationChanged(update), lblVersion); |
7 | ret centerAndEastWithMargin( |
8 | withLabel("FFMPEG version:", lblVersion), |
9 | jbutton("Browse for FFMPEG...", r { |
10 | File f = showFileChooser(); |
11 | if (f == null) ret; |
12 | if (!(fileExists(f) && swic(fileName(f), "ffmpeg"))) |
13 | ret with infoBox("Not a suitable ffmpeg executable"); |
14 | setFFMpegLocation(f); |
15 | })); |
16 | } |
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: | #1024645 |
Snippet name: | ffmpegVersionPanel |
Eternal ID of this version: | #1024645/5 |
Text MD5: | 69f0a852defd27bc07b2acf95f4fe086 |
Transpilation MD5: | f9f1ea2afc630230afcb228513928676 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-21 18:24:18 |
Source code size: | 639 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 238 / 354 |
Version history: | 4 change(s) |
Referenced in: | [show references] |