45 |
import javax.swing.event.ListSelectionEvent; |
import javax.swing.event.ListSelectionEvent; |
46 |
import javax.swing.event.ListSelectionListener; |
import javax.swing.event.ListSelectionListener; |
47 |
|
|
48 |
|
import net.sf.juife.ComponentList; |
49 |
|
import net.sf.juife.ComponentListModel; |
50 |
|
import net.sf.juife.DefaultComponentListModel; |
51 |
|
|
52 |
import org.jsampler.CC; |
import org.jsampler.CC; |
53 |
import org.jsampler.SamplerChannelModel; |
import org.jsampler.SamplerChannelModel; |
54 |
|
|
55 |
import org.jsampler.view.JSChannel; |
import org.jsampler.view.JSChannel; |
56 |
import org.jsampler.view.JSChannelsPane; |
import org.jsampler.view.JSChannelsPane; |
57 |
|
|
|
import net.sf.juife.ComponentList; |
|
|
import net.sf.juife.ComponentListModel; |
|
|
import net.sf.juife.DefaultComponentListModel; |
|
|
|
|
58 |
import org.linuxsampler.lscp.SamplerChannel; |
import org.linuxsampler.lscp.SamplerChannel; |
59 |
|
|
60 |
import static org.jsampler.view.classic.ClassicI18n.i18n; |
import static org.jsampler.view.classic.ClassicI18n.i18n; |
68 |
private final ComponentList chnList = new ComponentList(); |
private final ComponentList chnList = new ComponentList(); |
69 |
private final DefaultComponentListModel listModel = new DefaultComponentListModel(); |
private final DefaultComponentListModel listModel = new DefaultComponentListModel(); |
70 |
|
|
71 |
/** Creates a new instance of ChannelsPane */ |
/** |
72 |
|
* Creates a new instance of <code>ChannelsPane</code> with |
73 |
|
* the specified <code>title</code>. |
74 |
|
* @param title The title of this <code>ChannelsPane</code> |
75 |
|
*/ |
76 |
public |
public |
77 |
ChannelsPane(String title) { |
ChannelsPane(String title) { |
78 |
super(title); |
super(title); |
111 |
* Adds the specified channels to this channels pane. |
* Adds the specified channels to this channels pane. |
112 |
* @param chns The channels to be added. |
* @param chns The channels to be added. |
113 |
*/ |
*/ |
114 |
public void addChannels(JSChannel[] chns) { |
public void |
115 |
|
addChannels(JSChannel[] chns) { |
116 |
|
if(chns == null || chns.length == 0) return; |
117 |
|
|
118 |
for(JSChannel c : chns) listModel.add(c); |
for(JSChannel c : chns) listModel.add(c); |
119 |
chnList.setSelectionInterval ( |
chnList.setSelectionInterval ( |
120 |
listModel.getSize() - chns.length, listModel.getSize() - 1 |
listModel.getSize() - chns.length, listModel.getSize() - 1 |