/[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 910 by iliev, Thu Mar 16 18:08:34 2006 UTC revision 911 by iliev, Mon Aug 7 18:25:58 2006 UTC
# Line 36  import java.util.logging.Level; Line 36  import java.util.logging.Level;
36  import javax.swing.AbstractAction;  import javax.swing.AbstractAction;
37  import javax.swing.Action;  import javax.swing.Action;
38  import javax.swing.ImageIcon;  import javax.swing.ImageIcon;
 import javax.swing.JOptionPane;  
39    
40  import org.jsampler.CC;  import org.jsampler.CC;
41  import org.jsampler.HF;  import org.jsampler.HF;
# Line 77  public class A4n { Line 76  public class A4n {
76                  }                  }
77                                    
78                  public void                  public void
79                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) { CC.reconnect(); }
                         CC.initSamplerModel();  
                 }  
80          }          }
81                    
82          public final static Action samplerInfo = new SamplerInfo();          public final static Action samplerInfo = new SamplerInfo();
# Line 156  public class A4n { Line 153  public class A4n {
153                          super("");                          super("");
154                                                    
155                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttAddMidiDevice"));                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttAddMidiDevice"));
156                                                    putValue(Action.SMALL_ICON, Res.iconNew16);
                         try {  
                                 URL url = ClassLoader.getSystemClassLoader().getResource (  
                                         "org/jsampler/view/classic/res/icons/New16.gif"  
                                 );  
                                   
                                 ImageIcon icon = new ImageIcon(url);  
                                 if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)  
                                         putValue(Action.SMALL_ICON, icon);  
                         } catch(Exception x) {  
                                 CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);  
                         }  
157                  }                  }
158                                    
159                  public void                  public void
# Line 184  public class A4n { Line 170  public class A4n {
170                          super("");                          super("");
171                                                    
172                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttAddAudioDevice"));                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttAddAudioDevice"));
173                                                    putValue(Action.SMALL_ICON, Res.iconNew16);
                         try {  
                                 URL url = ClassLoader.getSystemClassLoader().getResource (  
                                         "org/jsampler/view/classic/res/icons/New16.gif"  
                                 );  
                                   
                                 ImageIcon icon = new ImageIcon(url);  
                                 if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)  
                                         putValue(Action.SMALL_ICON, icon);  
                         } catch(Exception x) {  
                                 CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);  
                         }  
174                  }                  }
175                                    
176                  public void                  public void
# Line 213  public class A4n { Line 188  public class A4n {
188                          super(i18n.getMenuLabel("edit.preferences"));                          super(i18n.getMenuLabel("edit.preferences"));
189                                                    
190                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttPrefs"));                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttPrefs"));
191                                                    putValue(Action.SMALL_ICON, Res.iconPreferences24);
                         try {  
                                 URL url = ClassLoader.getSystemClassLoader().getResource (  
                                         "org/jsampler/view/classic/res/icons/toolbar/Preferences24.gif"  
                                 );  
                                   
                                 ImageIcon icon = new ImageIcon(url);  
                                 if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)  
                                         putValue(Action.SMALL_ICON, icon);  
                         } catch(Exception x) {  
                                 CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);  
                         }  
192                  }                  }
193                                    
194                  public void                  public void
195                  actionPerformed(ActionEvent e) { new PrefsDlg(CC.getMainFrame()).setVisible(true); }                  actionPerformed(ActionEvent e) { new PrefsDlg(CC.getMainFrame()).setVisible(true); }
196          }          }
197            
198    // VIEW
199            
200            
201    
202  // CHANNELS  // CHANNELS
203          public final static Action newChannel = new NewChannel();          public final static Action newChannel = new NewChannel();
# Line 252  public class A4n { Line 220  public class A4n {
220                          super(i18n.getMenuLabel("channels.new"));                          super(i18n.getMenuLabel("channels.new"));
221                                                    
222                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttNewChannel"));                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttNewChannel"));
223                                                    putValue(Action.SMALL_ICON, Res.iconNew24);
                         try {  
                                 URL url = ClassLoader.getSystemClassLoader().getResource (  
                                         "org/jsampler/view/classic/res/icons/toolbar/New24.gif"  
                                 );  
                                   
                                 ImageIcon icon = new ImageIcon(url);  
                                 if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)  
                                         putValue(Action.SMALL_ICON, icon);  
                         } catch(Exception x) {  
                                 CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);  
                         }  
224                  }                  }
225                                    
226                  public void                  public void
# Line 291  public class A4n { Line 248  public class A4n {
248                          super(i18n.getMenuLabel("channels.duplicate"));                          super(i18n.getMenuLabel("channels.duplicate"));
249                                                    
250                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttDuplicateChannels"));                          putValue(SHORT_DESCRIPTION, i18n.getMenuLabel("ttDuplicateChannels"));
251                                                    putValue(Action.SMALL_ICON, Res.iconCopy24);
                         try {  
                                 URL url = ClassLoader.getSystemClassLoader().getResource (  
                                         "org/jsampler/view/classic/res/icons/toolbar/Copy24.gif"  
                                 );  
                                   
                                 ImageIcon icon = new ImageIcon(url);  
                                 if(icon.getImageLoadStatus() == MediaTracker.COMPLETE)  
                                         putValue(Action.SMALL_ICON, icon);  
                         } catch(Exception x) {  
                                 CC.getLogger().log(Level.INFO, HF.getErrorMessage(x), x);  
                         }  
252                                                    
253                          setEnabled(false);                          setEnabled(false);
254                  }                  }
# Line 516  public class A4n { Line 462  public class A4n {
462                  removeChannel(final JSChannel c) {                  removeChannel(final JSChannel c) {
463                          final JSChannelsPane p = CC.getMainFrame().getSelectedChannelsPane();                          final JSChannelsPane p = CC.getMainFrame().getSelectedChannelsPane();
464                          int id = c.getChannelInfo().getChannelID();                          int id = c.getChannelInfo().getChannelID();
                         final org.jsampler.task.RemoveChannel rc =  
                                 new org.jsampler.task.RemoveChannel(id);  
                           
                         rc.addTaskListener(new TaskListener() {  
                                 public void  
                                 taskPerformed(TaskEvent e) {  
                                         if(rc.doneWithErrors()) return;  
                                   
                                         p.removeChannel(c);  
                                 }  
                         });  
465                                                    
466                          CC.getTaskQueue().add(rc);                          CC.getTaskQueue().add(new org.jsampler.task.RemoveChannel(id));
467                  }                  }
468          }          }
469                    

Legend:
Removed from v.910  
changed lines
  Added in v.911

  ViewVC Help
Powered by ViewVC