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

Diff of /jsampler/trunk/src/org/jsampler/view/classic/A4n.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 57  import static org.jsampler.view.classic. Line 57  import static org.jsampler.view.classic.
57   * @author Grigor Iliev   * @author Grigor Iliev
58   */   */
59  public class A4n {  public class A4n {
60            private static boolean
61            verifyConnection() {
62                    if(!CC.getClient().isConnected()) {
63                            HF.showErrorMessage(i18n.getError("notConnected"));
64                            return false;
65                    }
66                    
67                    return true;
68            }
69            
70          public final static Action connect = new Connect();          public final static Action connect = new Connect();
71                                    
72          private static class Connect extends AbstractAction {          private static class Connect extends AbstractAction {
# Line 88  public class A4n { Line 98  public class A4n {
98                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
99                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
100                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
101                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
102                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
103                            }
104                  }                  }
105                                    
106                  public void                  public void
# Line 113  public class A4n { Line 125  public class A4n {
125                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
126                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
127                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
128                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
129                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
130                            }
131                  }                  }
132                                    
133                  public void                  public void
# Line 151  public class A4n { Line 165  public class A4n {
165                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
166                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
167                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
168                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
169                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
170                            }
171                  }                  }
172                                    
173                  public void                  public void
174                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) {
175                            if(!verifyConnection()) return;
176                          new NewMidiDeviceDlg(CC.getMainFrame()).setVisible(true);                          new NewMidiDeviceDlg(CC.getMainFrame()).setVisible(true);
177                  }                  }
178          }          }
# Line 176  public class A4n { Line 193  public class A4n {
193                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
194                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
195                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
196                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
197                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
198                            }
199                  }                  }
200                                    
201                  public void                  public void
202                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) {
203                            if(!verifyConnection()) return;
204                          new NewAudioDeviceDlg(CC.getMainFrame()).setVisible(true);                          new NewAudioDeviceDlg(CC.getMainFrame()).setVisible(true);
205                  }                  }
206          }          }
# Line 202  public class A4n { Line 222  public class A4n {
222                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
223                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
224                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
225                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
226                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
227                            }
228                  }                  }
229                                    
230                  public void                  public void
# Line 239  public class A4n { Line 261  public class A4n {
261                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
262                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
263                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
264                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
265                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
266                            }
267                  }                  }
268                                    
269                  public void                  public void
270                  actionPerformed(ActionEvent e) { CC.getSamplerModel().createChannel(); }                  actionPerformed(ActionEvent e) {
271                            if(!verifyConnection()) return;
272                            CC.getSamplerModel().createChannel();
273                    }
274          }          }
275                    
276          private static class NewChannelWizard extends AbstractAction {          private static class NewChannelWizard extends AbstractAction {
# Line 255  public class A4n { Line 282  public class A4n {
282                                    
283                  public void                  public void
284                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) {
285                          JOptionPane.showMessageDialog (                          new org.jsampler.view.classic.NewChannelWizard().showWizard();
                                 CC.getMainFrame(), "Not implemented yet",  
                                 "",  
                                 JOptionPane.INFORMATION_MESSAGE  
                         );  
                         //new org.jsampler.view.classic.NewChannelWizard().showWizard();  
286                  }                  }
287          }          }
288                    
# Line 278  public class A4n { Line 300  public class A4n {
300                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
301                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
302                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
303                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
304                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
305                            }
306                                                    
307                          setEnabled(false);                          setEnabled(false);
308                  }                  }
# Line 330  public class A4n { Line 354  public class A4n {
354                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
355                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
356                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
357                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
358                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
359                            }
360                                                    
361                          setEnabled(false);                          setEnabled(false);
362                  }                  }
# Line 356  public class A4n { Line 382  public class A4n {
382                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
383                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
384                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
385                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
386                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
387                            }
388                                                    
389                          setEnabled(false);                          setEnabled(false);
390                  }                  }
# Line 464  public class A4n { Line 492  public class A4n {
492                                  ImageIcon icon = new ImageIcon(url);                                  ImageIcon icon = new ImageIcon(url);
493                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)
494                                          putValue(Action.SMALL_ICON, icon);                                          putValue(Action.SMALL_ICON, icon);
495                          } catch(Exception x) { CC.getLogger().log(Level.INFO, x.getMessage(), x); }                          } catch(Exception x) {
496                                    CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
497                            }
498                                                    
499                          setEnabled(false);                          setEnabled(false);
500                  }                  }
# Line 527  public class A4n { Line 557  public class A4n {
557                                  if(ii.getImageLoadStatus() == MediaTracker.COMPLETE)                                  if(ii.getImageLoadStatus() == MediaTracker.COMPLETE)
558                                          putValue(Action.SMALL_ICON, ii);                                          putValue(Action.SMALL_ICON, ii);
559                          } catch(Exception x) {                          } catch(Exception x) {
560                                  CC.getLogger().log(Level.INFO, x.getMessage(), x);                                  CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);
561                          }*/                          }*/
562                  }                  }
563                                    

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

  ViewVC Help
Powered by ViewVC