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

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

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

revision 1540 by iliev, Mon Dec 3 23:22:02 2007 UTC revision 1752 by iliev, Mon Aug 11 22:51:24 2008 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-2007 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 119  public class JSInstrumentsDbTable extend Line 119  public class JSInstrumentsDbTable extend
119          /**          /**
120           * Creates a new instance of <code>JSInstrumentsDbTable</code>           * Creates a new instance of <code>JSInstrumentsDbTable</code>
121           */           */
122          public JSInstrumentsDbTable(JSInstrumentsDbTree tree) {          public
123            JSInstrumentsDbTable(JSInstrumentsDbTree tree) {
124                    this(tree, "");
125            }
126            
127            /**
128             * Creates a new instance of <code>JSInstrumentsDbTable</code>
129             * @param columnPrefix Used to create unique property names for storing
130             * the column preferences for different tables e.g. for DbInstrumentChooser,
131             * InstrumentsDbFrame.
132             */
133            public
134            JSInstrumentsDbTable(JSInstrumentsDbTree tree, String columnPrefix) {
135                    super(columnPrefix);
136                    
137                  instrumentsDbTree = tree;                  instrumentsDbTree = tree;
138                                    
139                  /*for(int i = 0; i < getColumnModel().getColumnCount(); i++) {                  /*for(int i = 0; i < getColumnModel().getColumnCount(); i++) {
# Line 422  public class JSInstrumentsDbTable extend Line 436  public class JSInstrumentsDbTable extend
436                  actionPerformed(ActionEvent e) {                  actionPerformed(ActionEvent e) {
437                          DbDirectoryTreeNode n = instrumentsDbTree.getSelectedDirectoryNode();                          DbDirectoryTreeNode n = instrumentsDbTree.getSelectedDirectoryNode();
438                          if(n == null) return;                          if(n == null) return;
439                          instrumentsDbTree.refreshDirectoryContent(n.getInfo().getDirectoryPath());                          final String path = n.getInfo().getDirectoryPath();
440                            instrumentsDbTree.refreshDirectoryContent(path);
441                            CC.scheduleInTaskQueue(new Runnable() {
442                                    public void
443                                    run() { instrumentsDbTree.setSelectedDirectory(path); }
444                            });
445                  }                  }
446                                    
447                  public void                  public void
# Line 621  public class JSInstrumentsDbTable extend Line 640  public class JSInstrumentsDbTable extend
640                                    
641                  LoadInstrumentAction(SamplerChannelModel model) {                  LoadInstrumentAction(SamplerChannelModel model) {
642                          String s = "instrumentsdb.actions.loadInstrument.onChannel";                          String s = "instrumentsdb.actions.loadInstrument.onChannel";
643                          putValue(Action.NAME, i18n.getMenuLabel(s, model.getChannelId()));                          int i = CC.getSamplerModel().getChannelIndex(model) + 1;
644                            putValue(Action.NAME, i18n.getMenuLabel(s, i));
645                          channelModel = model;                          channelModel = model;
646                  }                  }
647                                    
# Line 1023  public class JSInstrumentsDbTable extend Line 1043  public class JSInstrumentsDbTable extend
1043                                    
1044                  public void                  public void
1045                  channelAdded(SamplerChannelListEvent e) {                  channelAdded(SamplerChannelListEvent e) {
1046                            if(CC.getSamplerModel().getChannelListIsAdjusting()) return;
1047                          updateLoadInstrumentMenus();                          updateLoadInstrumentMenus();
1048                  }                  }
1049                                    

Legend:
Removed from v.1540  
changed lines
  Added in v.1752

  ViewVC Help
Powered by ViewVC