Search Results

Search found 5 results on 1 pages for 'insertnickhere'.

Page 1/1 | 1 

  • Implementing java FixedTreadPool status listener

    - by InsertNickHere
    Hi there, it's about an application which is supposed to process (VAD, Loudness, Clipping) a lot of soundfiles (e.g. 100k). At this time, I create as many worker threads (callables) as I can put into memory, and then run all with a threadPool.invokeAll(), write results to file system, unload processed files and continue at step 1. Due to the fact it's an app with a GUI, i don't want to user to feel like the app "is not responding" while processing all soundfiles. (which it does at this time cause invokeAll is blocking). Im not sure what is a "good" way to fix this. It shall not be possible for the user to do other things while processing, but I'd like to show a progress bar like "10 of 100000 soundfiles are done". So how do I get there? Do I have to create a "watcher thread", so that every worker hold a callback on it? I'm quite new to multi threading, and don't get the idea of such a mechanisem.. If you need to know: I'm using SWT/JFace. Regards, InsertNickHere

    Read the article

  • Java swt treeview popup menu

    - by InsertNickHere
    Hiho, currently I have a working popup menu which appears when I click on a treeview item. But I want to show different popups for different tree view entries. I don't get a idea how to do so... Here is my code for creating the menu: MenuManager menuMgr = new MenuManager("#PopupMenu"); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { @Override public void menuAboutToShow(IMenuManager manager) { Action action = new Action() { public void run() { // So something } }; action.setText("Set as working file"); manager.add(action); } }); Menu menu = menuMgr.createContextMenu(getTree()); getTree().setMenu(menu);

    Read the article

  • Swt file dialog too much files selected?

    - by InsertNickHere
    Hi there, the swt file dialog will give me an empty result array if I select too much files (approx. 2500files). The listing shows you how I use this dialog. If i select too many sound files, the syso will show 0. Debugging tells me, that the files array is empty in this case. Is there any way to get this work? FileDialog fileDialog = new FileDialog(mainView.getShell(), SWT.MULTI); fileDialog.setText("Choose sound files"); fileDialog.setFilterExtensions(new String[] { new String("*.wav") }); Vector<String> result = new Vector<String>(); fileDialog.open(); String[] files = fileDialog.getFileNames(); for (int i = 0, n = files.length; i < n; i++) { if( !files[i].contains(".wav")) { System.out.println(files[i]); } StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(fileDialog.getFilterPath()); if (stringBuffer.charAt(stringBuffer.length() - 1) != File.separatorChar) { stringBuffer.append(File.separatorChar); } stringBuffer.append(files[i]); stringBuffer.append(""); String finalName = stringBuffer.toString(); if( !finalName.contains(".wav")) { System.out.println(finalName); } result.add(finalName); } System.out.println(result.size()) ;

    Read the article

  • Java Sound Clip Looping Frame Position

    - by InsertNickHere
    Hi, I have a little problem with a loopting clip: If you have a soundfile e.g. 20000 samples long, the frame position will not reset after looping, so I get values that are "out of bounds" of the original soundfile. As I want to draw a position marker on my waveform, I'm a bit confused how to achive. At this time I just get myClip.getLongFramePosition() but this does not work as described above. Does anyone have an idea how to fix that? Is there a possibility to count how often a clip was looped before? Regards

    Read the article

  • How to dynamicly build up a gui

    - by InsertNickHere
    Hi there, for the app i am creating i need a lot "option menus". E.g. for the sound file trimming part it would be something like "leadingSilence" / Integer "trailingSilence" / Integer "hold" / Integer. Overall, there are a lot of options of different types (int, float, string), and im thinking about if it is a better way to manualy create a window for each option set, or to dynamicly create them. last one would be quite easy if all types were similar (so i would just add eg spinButtons) I guess but its not. At this time i mange the options with the standard .properties of jave, and there is no need to change. My question is: is there a lib which provides such functionality, or is there a "standard way" to do this? How much work would it be? How to dynamicly create the selection listeners? In could i'd love to have something like: OptionWindow trimmingOptionWindow = createWindowFromOptionSet(OptionManager.getOptions("trimming") ); trimmingOptionWindow.open(); I hope its clear what I mean :)

    Read the article

1