/[svn]/jsampler/trunk/src/org/jsampler/view/classic/MidiDevicesPage.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/classic/MidiDevicesPage.java

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

revision 841 by iliev, Mon Oct 10 16:03:12 2005 UTC revision 842 by iliev, Thu Mar 16 18:08:34 2006 UTC
# Line 62  import net.sf.juife.JuifeUtils; Line 62  import net.sf.juife.JuifeUtils;
62  import net.sf.juife.NavigationPage;  import net.sf.juife.NavigationPage;
63    
64  import org.jsampler.CC;  import org.jsampler.CC;
65    import org.jsampler.HF;
66  import org.jsampler.MidiDeviceModel;  import org.jsampler.MidiDeviceModel;
67    
68  import org.jsampler.event.MidiDeviceEvent;  import org.jsampler.event.MidiDeviceEvent;
# Line 71  import org.jsampler.event.MidiDeviceList Line 72  import org.jsampler.event.MidiDeviceList
72  import org.jsampler.event.ParameterEvent;  import org.jsampler.event.ParameterEvent;
73  import org.jsampler.event.ParameterListener;  import org.jsampler.event.ParameterListener;
74    
75    import org.jsampler.task.CreateMidiDevice;
76  import org.jsampler.task.DestroyMidiDevice;  import org.jsampler.task.DestroyMidiDevice;
77  import org.jsampler.task.EnableMidiDevice;  import org.jsampler.task.EnableMidiDevice;
78  import org.jsampler.task.SetMidiInputPortCount;  import org.jsampler.task.SetMidiInputPortCount;
# Line 309  public class MidiDevicesPage extends Nav Line 311  public class MidiDevicesPage extends Nav
311                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
312                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
313                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
314                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
315                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
316                            }
317                                                    
318                          setEnabled(false);                          setEnabled(false);
319                  }                  }
320                                    
321                  public void                  public void
322                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) {
323                          JOptionPane.showMessageDialog (                          int i = devicesTable.getSelectedRow();
324                                  CC.getMainFrame(), "Not implemented yet",                          if(i < 0) {
325                                  "",                                  CC.getLogger().info("There's no selected MIDI device to duplicate");
326                                  JOptionPane.INFORMATION_MESSAGE                                  return;
327                          );                          }
328                                                    MidiDeviceModel m;
329                                                    m = ((MidiDevicesTableModel)devicesTable.getModel()).getMidiDeviceModel(i);
330                            String d = m.getDeviceInfo().getDriverName();
331                            Parameter[] pS = m.getDeviceInfo().getAdditionalParameters();
332                            for(Parameter p : pS) System.out.println(p.getName());
333                            CC.getTaskQueue().add(new CreateMidiDevice(d, pS));
334                  }                  }
335          }          }
336                    
# Line 340  public class MidiDevicesPage extends Nav Line 348  public class MidiDevicesPage extends Nav
348                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
349                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
350                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
351                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
352                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
353                            }
354                                                    
355                          setEnabled(false);                          setEnabled(false);
356                  }                  }
# Line 371  public class MidiDevicesPage extends Nav Line 381  public class MidiDevicesPage extends Nav
381                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
382                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
383                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
384                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
385                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
386                            }
387                                                    
388                          setEnabled(false);                          setEnabled(false);
389                  }                  }

Legend:
Removed from v.841  
changed lines
  Added in v.842

  ViewVC Help
Powered by ViewVC