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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1743 - (show annotations) (download)
Sat May 31 23:04:01 2008 UTC (15 years, 10 months ago) by iliev
File size: 2573 byte(s)
* Renamed the column labels in the Channel Routing dialog: The column
  representing the sampler channel's audio channels is "Audio In" and
  the column representing the audio device's channels is "Audio Out"
* Remember the last used tab in the Preferences dialog
* Fantasia: The sampler channels are now referenced by their position
  in the list, not by their ID
* Fantasia: Implemented options to show the channel number and/or the MIDI
  input port/channel on the sampler channel screen when using Small View
  (choose Edit/Preferences, then click the `Channels' tab)
* Fantasia: Migrated to substance 5

1 /*
2 * JSampler - a java front-end for LinuxSampler
3 *
4 * Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>
5 *
6 * This file is part of JSampler.
7 *
8 * JSampler is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2
10 * as published by the Free Software Foundation.
11 *
12 * JSampler is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with JSampler; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
21 */
22
23 package org.jsampler.view.std;
24
25 import org.jsampler.CC;
26 import org.jsampler.SamplerChannelModel;
27
28 import org.jsampler.event.SamplerChannelListEvent;
29 import org.jsampler.event.SamplerChannelListListener;
30
31 import net.sf.juife.InformationDialog;
32
33 import static org.jsampler.view.std.StdI18n.i18n;
34
35
36 /**
37 *
38 * @author Grigor Iliev
39 */
40 public class JSFxSendsDlg extends InformationDialog {
41 private JSFxSendsPane mainPane;
42 private final SamplerChannelListListener channelListListener;
43
44 private int channelIndex;
45
46 /** Creates a new instance of <code>JSFxSendsDlg</code> */
47 public
48 JSFxSendsDlg(SamplerChannelModel model) {
49 this(new JSFxSendsPane(model));
50 }
51
52 /** Creates a new instance of <code>JSFxSendsDlg</code> */
53 public
54 JSFxSendsDlg(JSFxSendsPane pane) {
55 super(CC.getMainFrame(), pane);
56
57 mainPane = pane;
58
59 channelIndex = CC.getSamplerModel().getChannelIndex(pane.getChannelModel()) + 1;
60 setTitle(i18n.getLabel("JSFxSendsDlg.title", channelIndex));
61 setModal(false);
62 showCloseButton(false);
63
64 channelListListener = new SamplerChannelListListener() {
65 public void
66 channelAdded(SamplerChannelListEvent e) {
67 if(CC.getSamplerModel().getChannelListIsAdjusting()) return;
68 updateChannelIndex();
69 }
70
71 public void
72 channelRemoved(SamplerChannelListEvent e) {
73 //if(CC.getSamplerModel().getChannelListIsAdjusting()) return; //TODO:
74
75 updateChannelIndex();
76 }
77 };
78
79 CC.getSamplerModel().addSamplerChannelListListener(channelListListener);
80 }
81
82 protected void
83 updateChannelIndex() {
84 int i = CC.getSamplerModel().getChannelIndex(mainPane.getChannelModel());
85 if(channelIndex == i) return;
86
87 channelIndex = i;
88 setTitle(i18n.getLabel("JSFxSendsDlg.title", channelIndex + 1));
89 }
90 }

  ViewVC Help
Powered by ViewVC