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

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

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

revision 1866 by iliev, Sun Mar 15 19:40:29 2009 UTC revision 2288 by iliev, Wed Nov 23 21:19:44 2011 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-2009 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2011 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 58  import javax.swing.tree.DefaultTreeModel Line 58  import javax.swing.tree.DefaultTreeModel
58  import javax.swing.tree.TreeSelectionModel;  import javax.swing.tree.TreeSelectionModel;
59    
60  import org.jsampler.CC;  import org.jsampler.CC;
 import org.jsampler.HF;  
61  import org.jsampler.MidiInstrument;  import org.jsampler.MidiInstrument;
62  import org.jsampler.MidiInstrumentMap;  import org.jsampler.MidiInstrumentMap;
63    
# Line 66  import org.jsampler.event.MidiInstrument Line 65  import org.jsampler.event.MidiInstrument
65  import org.jsampler.event.MidiInstrumentListener;  import org.jsampler.event.MidiInstrumentListener;
66  import org.jsampler.event.MidiInstrumentMapEvent;  import org.jsampler.event.MidiInstrumentMapEvent;
67  import org.jsampler.event.MidiInstrumentMapListener;  import org.jsampler.event.MidiInstrumentMapListener;
68    import org.jsampler.view.swing.SHF;
69    
70  import org.linuxsampler.lscp.MidiInstrumentInfo;  import org.linuxsampler.lscp.MidiInstrumentInfo;
71    
72  import net.sf.juife.OkCancelDialog;  import net.sf.juife.swing.OkCancelDialog;
73    
74  import static org.jsampler.JSPrefs.FIRST_MIDI_BANK_NUMBER;  import static org.jsampler.JSPrefs.FIRST_MIDI_BANK_NUMBER;
75  import static org.jsampler.JSPrefs.FIRST_MIDI_PROGRAM_NUMBER;  import static org.jsampler.JSPrefs.FIRST_MIDI_PROGRAM_NUMBER;
# Line 282  public class JSMidiInstrumentTree extend Line 282  public class JSMidiInstrumentTree extend
282                          if(c > 1) {                          if(c > 1) {
283                                  String s;                                  String s;
284                                  s = i18n.getMessage("JSMidiInstrumentTree.removeInstruments?", c);                                  s = i18n.getMessage("JSMidiInstrumentTree.removeInstruments?", c);
285                                  if(!HF.showYesNoDialog(CC.getMainFrame(), s)) return;                                  if(!SHF.showYesNoDialog(SHF.getMainFrame(), s)) return;
286                          }                          }
287                                                    
288                          for(int i = c - 1; i >= 0; i--) {                          for(int i = c - 1; i >= 0; i--) {
# Line 476  public class JSMidiInstrumentTree extend Line 476  public class JSMidiInstrumentTree extend
476                  MidiInstrumentMap smap = dlg.getSelectedMidiInstrumentMap();                  MidiInstrumentMap smap = dlg.getSelectedMidiInstrumentMap();
477                                    
478                  if(smap == null) {                  if(smap == null) {
479                          HF.showErrorMessage(i18n.getMessage("JSMidiInstrumentTree.noMap!"), this);                          SHF.showErrorMessage(i18n.getMessage("JSMidiInstrumentTree.noMap!"), this);
480                          return;                          return;
481                  }                  }
482                                    
483                  if(dlg.getMidiBank() == bank.getId() && smap.getMapId() == getMidiInstrumentMap().getMapId()) {                  if(dlg.getMidiBank() == bank.getId() && smap.getMapId() == getMidiInstrumentMap().getMapId()) {
484                          String s = "JSMidiInstrumentTree.sameSourceAndDestination!";                          String s = "JSMidiInstrumentTree.sameSourceAndDestination!";
485                          HF.showErrorMessage(i18n.getMessage(s), this);                          SHF.showErrorMessage(i18n.getMessage(s), this);
486                          return;                          return;
487                  }                  }
488                                    
# Line 549  public class JSMidiInstrumentTree extend Line 549  public class JSMidiInstrumentTree extend
549                  MidiInstrumentMap smap = dlg.getSelectedMidiInstrumentMap();                  MidiInstrumentMap smap = dlg.getSelectedMidiInstrumentMap();
550                                    
551                  if(smap == null) {                  if(smap == null) {
552                          HF.showErrorMessage(i18n.getMessage("JSMidiInstrumentTree.noMap!"), this);                          SHF.showErrorMessage(i18n.getMessage("JSMidiInstrumentTree.noMap!"), this);
553                          return;                          return;
554                  }                  }
555                                    
556                  int bank = instr.getInfo().getMidiBank();                  int bank = instr.getInfo().getMidiBank();
557                  if(dlg.getMidiBank() == bank && smap.getMapId() == getMidiInstrumentMap().getMapId()) {                  if(dlg.getMidiBank() == bank && smap.getMapId() == getMidiInstrumentMap().getMapId()) {
558                          String s = "JSMidiInstrumentTree.sameSourceAndDestination!";                          String s = "JSMidiInstrumentTree.sameSourceAndDestination!";
559                          HF.showErrorMessage(i18n.getMessage(s), this);                          SHF.showErrorMessage(i18n.getMessage(s), this);
560                          return;                          return;
561                  }                  }
562                                    
# Line 896  class JSOverrideInstrumentsConfirmDlg ex Line 896  class JSOverrideInstrumentsConfirmDlg ex
896          private final JTable table;          private final JTable table;
897                    
898          JSOverrideInstrumentsConfirmDlg(String[] instrumentNames) {          JSOverrideInstrumentsConfirmDlg(String[] instrumentNames) {
899                  super(CC.getMainFrame());                  super(SHF.getMainFrame());
900                                    
901                  JPanel mainPane = new JPanel();                  JPanel mainPane = new JPanel();
902                  mainPane.setLayout(new BoxLayout(mainPane, BoxLayout.Y_AXIS));                  mainPane.setLayout(new BoxLayout(mainPane, BoxLayout.Y_AXIS));
903                                    
904                  lMsg.setIcon(CC.getViewConfig().getBasicIconSet().getWarning32Icon());                  lMsg.setIcon(SHF.getViewConfig().getBasicIconSet().getWarning32Icon());
905                  lMsg.setAlignmentX(LEFT_ALIGNMENT);                  lMsg.setAlignmentX(LEFT_ALIGNMENT);
906                  mainPane.add(lMsg);                  mainPane.add(lMsg);
907                                    

Legend:
Removed from v.1866  
changed lines
  Added in v.2288

  ViewVC Help
Powered by ViewVC