/[svn]/jsampler/trunk/src/org/jsampler/view/std/JSFxSendsDlg.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/std/JSFxSendsDlg.java

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

revision 1784 by iliev, Sat May 31 23:04:01 2008 UTC revision 1785 by iliev, Tue Oct 7 00:07:14 2008 UTC
# Line 22  Line 22 
22    
23  package org.jsampler.view.std;  package org.jsampler.view.std;
24    
25    import javax.swing.SwingUtilities;
26    
27  import org.jsampler.CC;  import org.jsampler.CC;
28  import org.jsampler.SamplerChannelModel;  import org.jsampler.SamplerChannelModel;
29    
# Line 41  public class JSFxSendsDlg extends Inform Line 43  public class JSFxSendsDlg extends Inform
43          private JSFxSendsPane mainPane;          private JSFxSendsPane mainPane;
44          private final SamplerChannelListListener channelListListener;          private final SamplerChannelListListener channelListListener;
45                    
         private int channelIndex;  
           
46          /** Creates a new instance of <code>JSFxSendsDlg</code> */          /** Creates a new instance of <code>JSFxSendsDlg</code> */
47          public          public
48          JSFxSendsDlg(SamplerChannelModel model) {          JSFxSendsDlg(SamplerChannelModel model) {
# Line 56  public class JSFxSendsDlg extends Inform Line 56  public class JSFxSendsDlg extends Inform
56                                    
57                  mainPane = pane;                  mainPane = pane;
58                                    
59                  channelIndex = CC.getSamplerModel().getChannelIndex(pane.getChannelModel()) + 1;                  String s = CC.getMainFrame().getChannelPath(pane.getChannelModel());
60                  setTitle(i18n.getLabel("JSFxSendsDlg.title", channelIndex));                  setTitle(i18n.getLabel("JSFxSendsDlg.title", s));
61                  setModal(false);                  setModal(false);
62                  showCloseButton(false);                  showCloseButton(false);
63                                    
# Line 65  public class JSFxSendsDlg extends Inform Line 65  public class JSFxSendsDlg extends Inform
65                          public void                          public void
66                          channelAdded(SamplerChannelListEvent e) {                          channelAdded(SamplerChannelListEvent e) {
67                                  if(CC.getSamplerModel().getChannelListIsAdjusting()) return;                                  if(CC.getSamplerModel().getChannelListIsAdjusting()) return;
68                                  updateChannelIndex();                                  updateTitle();
69                          }                          }
70                                                    
71                          public void                          public void
72                          channelRemoved(SamplerChannelListEvent e) {                          channelRemoved(SamplerChannelListEvent e) {
73                                  //if(CC.getSamplerModel().getChannelListIsAdjusting()) return; //TODO:                                  //if(CC.getSamplerModel().getChannelListIsAdjusting()) return; //TODO:
74                                                                    
75                                  updateChannelIndex();                                  updateTitle();
76                          }                          }
77                  };                  };
78                                    
# Line 80  public class JSFxSendsDlg extends Inform Line 80  public class JSFxSendsDlg extends Inform
80          }          }
81                    
82          protected void          protected void
83          updateChannelIndex() {          updateTitle() {
84                  int i = CC.getSamplerModel().getChannelIndex(mainPane.getChannelModel());                  SwingUtilities.invokeLater(new Runnable() {
85                  if(channelIndex == i) return;                          public void
86                            run() {
87                                    String s = CC.getMainFrame().getChannelPath(mainPane.getChannelModel());
88                                    setTitle(i18n.getLabel("JSFxSendsDlg.title", s));
89                            }
90                    });
91                                    
                 channelIndex = i;  
                 setTitle(i18n.getLabel("JSFxSendsDlg.title", channelIndex + 1));  
92          }          }
93  }  }

Legend:
Removed from v.1784  
changed lines
  Added in v.1785

  ViewVC Help
Powered by ViewVC