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

16
LINES

< > BotCompany Repo | #1024645 // ffmpegVersionPanel

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

Libraryless. Click here for Pure Java version (5456L/39K).

static JComponent ffmpegVersionPanel() {
  JLabel lblVersion = jlabel();
  Runnable update = callAndReturn(r {
    setText(lblVersion, or2(ffmpegVersion(), "Error: FFMPEG not found!"))
  });
  bindAutoCloseableToComponent(() -> vmBus_onMessage ffmpegLocationChanged(update), lblVersion);
  ret centerAndEastWithMargin(
    withLabel("FFMPEG version:", lblVersion),
    jbutton("Browse for FFMPEG...", r {
      File f = showFileChooser();
      if (f == null) ret;
      if (!(fileExists(f) && swic(fileName(f), "ffmpeg")))
        ret with infoBox("Not a suitable ffmpeg executable");
      setFFMpegLocation(f);
    }));
}

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: 239 / 356
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)