/[svn]/jsampler/trunk/src/org/jsampler/task/LaunchBackend.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/task/LaunchBackend.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1866 by iliev, Wed Oct 8 22:38:15 2008 UTC revision 1867 by iliev, Mon Mar 16 22:12:32 2009 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2009 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 22  Line 22 
22    
23  package org.jsampler.task;  package org.jsampler.task;
24    
 import java.util.logging.Level;  
   
25  import javax.swing.SwingUtilities;  import javax.swing.SwingUtilities;
26    
27  import org.jsampler.CC;  import org.jsampler.CC;
 import org.jsampler.HF;  
28    
29  import static org.jsampler.JSI18n.i18n;  import static org.jsampler.JSI18n.i18n;
30    
# Line 45  public class LaunchBackend extends Enhan Line 42  public class LaunchBackend extends Enhan
42           */           */
43          public          public
44          LaunchBackend(int delay, Object monitor) {          LaunchBackend(int delay, Object monitor) {
45                    setSilent(true);
46                  setTitle("LaunchBackend_task");                  setTitle("LaunchBackend_task");
47                  setDescription(i18n.getMessage("LaunchBackend.desc"));                  setDescription(i18n.getMessage("LaunchBackend.desc"));
48                  this.delay = delay;                  this.delay = delay;
# Line 54  public class LaunchBackend extends Enhan Line 52  public class LaunchBackend extends Enhan
52          /** The entry point of the task. */          /** The entry point of the task. */
53          @Override          @Override
54          public void          public void
55          run() {          exec() throws Exception {
56                  try {                  synchronized(monitor) { monitor.wait(delay * 1000); }
57                          synchronized(monitor) { monitor.wait(delay * 1000); }                  
58                                            SwingUtilities.invokeLater(new Runnable() {
59                          SwingUtilities.invokeLater(new Runnable() {                          public void
60                                  public void                          run() { CC.reconnect(); }
61                                  run() { CC.reconnect(); }                  });
                         });  
                 } catch(Exception x) {  
                         CC.getLogger().log(Level.FINE, HF.getErrorMessage(x), x);  
                 }  
62          }          }
63  }  }

Legend:
Removed from v.1866  
changed lines
  Added in v.1867

  ViewVC Help
Powered by ViewVC