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).

1  
!7
2  
3  
import static x30_pkg.x30_util.VF1;
4  
5  
sclass QARETA > DynPrintLog {
6  
  transient JLabel internalTrayIcon;
7  
  transient TrayIcon externalTrayIcon;
8  
  
9  
  start {
10  
    internalTrayIcon = dm_get(dm_requireQuickAudioRecord(), 'trayIcon);
11  
    ownResource(tempTrayIcon(externalTrayIcon = installTrayIcon(#1101416, getToolTip(internalTrayIcon))));
12  
    externalTrayIcon.addMouseListener(new MouseAdapter {
13  
      public void mousePressed(MouseEvent e) {
14  
        if (e.getButton() == MouseEvent.BUTTON1) {
15  
          print("Starting recording");
16  
          externalTrayIcon.setImage(loadImage2(#1101417));
17  
          dm_call(dm_requireQuickAudioRecord(), 'startRecording);
18  
        }
19  
      }
20  
      
21  
      public void mouseReleased(MouseEvent e) {
22  
        if (e.getButton() == MouseEvent.BUTTON1) {
23  
          print("Stopping recording");
24  
          externalTrayIcon.setImage(loadImage2(#1101416));
25  
          dm_call(dm_requireQuickAudioRecord(), 'stopRecording);
26  
        }
27  
      }
28  
    });
29  
  }
30  
}

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: 267 / 3600
Version history: 7 change(s)
Referenced in: [show references]