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

30
LINES

< > BotCompany Repo | #1020146 // Quick Audio Record: External Tray Icon

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14833L/104K).

!7

import static x30_pkg.x30_util.VF1;

sclass QARETA > DynPrintLog {
  transient JLabel internalTrayIcon;
  transient TrayIcon externalTrayIcon;
  
  start {
    internalTrayIcon = dm_get(dm_requireQuickAudioRecord(), 'trayIcon);
    ownResource(tempTrayIcon(externalTrayIcon = installTrayIcon(#1101416, getToolTip(internalTrayIcon))));
    externalTrayIcon.addMouseListener(new MouseAdapter {
      public void mousePressed(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON1) {
          print("Starting recording");
          externalTrayIcon.setImage(loadImage2(#1101417));
          dm_call(dm_requireQuickAudioRecord(), 'startRecording);
        }
      }
      
      public void mouseReleased(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON1) {
          print("Stopping recording");
          externalTrayIcon.setImage(loadImage2(#1101416));
          dm_call(dm_requireQuickAudioRecord(), 'stopRecording);
        }
      }
    });
  }
}

Author comment

Began life as a copy of #1018602

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020146
Snippet name: Quick Audio Record: External Tray Icon
Eternal ID of this version: #1020146/8
Text MD5: f04dc04a7da9cd678f0d02d8a47c957d
Transpilation MD5: 93eb2bf277491d5ef02993711960817c
Author: stefan
Category: javax / audio
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-12 12:22:14
Source code size: 1005 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 397 / 3761
Version history: 7 change(s)
Referenced in: [show references]