1 |
/* |
/* |
2 |
* JSampler - a java front-end for LinuxSampler |
* JSampler - a java front-end for LinuxSampler |
3 |
* |
* |
4 |
* Copyright (C) 2005-2008 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 |
* |
* |
110 |
if(channel.getChannelInfo().getEngine() == null) channel.expandChannel(); |
if(channel.getChannelInfo().getEngine() == null) channel.expandChannel(); |
111 |
chnList.setSelectedComponent(channel, true); |
chnList.setSelectedComponent(channel, true); |
112 |
scrollToBottom(); |
scrollToBottom(); |
113 |
|
|
114 |
|
firePropertyChange("channelAdded", null, channelModel); |
115 |
} |
} |
116 |
|
|
117 |
/** |
/** |
129 |
); |
); |
130 |
|
|
131 |
chnList.ensureIndexIsVisible(listModel.getSize() - 1); |
chnList.ensureIndexIsVisible(listModel.getSize() - 1); |
132 |
|
|
133 |
|
firePropertyChange("channelsAdded", null, chns); |
134 |
} |
} |
135 |
|
|
136 |
/** |
/** |
140 |
*/ |
*/ |
141 |
@Override |
@Override |
142 |
public void |
public void |
143 |
removeChannel(JSChannel chn) { listModel.remove(chn); } |
removeChannel(JSChannel chn) { |
144 |
|
listModel.remove(chn); |
145 |
|
|
146 |
|
firePropertyChange("channelRemoved", null, chn); |
147 |
|
} |
148 |
|
|
149 |
/** |
/** |
150 |
* Gets the first channel in this channels pane. |
* Gets the first channel in this channels pane. |
244 |
model.remove(i); |
model.remove(i); |
245 |
} |
} |
246 |
|
|
247 |
|
firePropertyChange("channelsRemoved", null, null); |
248 |
|
|
249 |
return l.length; |
return l.length; |
250 |
} |
} |
251 |
|
|
350 |
|
|
351 |
chnList.setSelectionInterval(0, chns.length - 1); |
chnList.setSelectionInterval(0, chns.length - 1); |
352 |
chnList.ensureIndexIsVisible(0); |
chnList.ensureIndexIsVisible(0); |
353 |
|
|
354 |
|
firePropertyChange("channelsPositionChanged", null, chns); |
355 |
} |
} |
356 |
|
|
357 |
@Override |
@Override |
372 |
|
|
373 |
chnList.setSelectedIndices(si); |
chnList.setSelectedIndices(si); |
374 |
chnList.ensureIndexIsVisible(si[0]); |
chnList.ensureIndexIsVisible(si[0]); |
375 |
|
|
376 |
|
firePropertyChange("channelsPositionChanged", null, chns); |
377 |
} |
} |
378 |
|
|
379 |
@Override |
@Override |
392 |
for(int i = 0; i < si.length; i++) si[i] += 1; |
for(int i = 0; i < si.length; i++) si[i] += 1; |
393 |
chnList.setSelectedIndices(si); |
chnList.setSelectedIndices(si); |
394 |
chnList.ensureIndexIsVisible(si[si.length - 1]); |
chnList.ensureIndexIsVisible(si[si.length - 1]); |
395 |
|
|
396 |
|
firePropertyChange("channelsPositionChanged", null, chns); |
397 |
} |
} |
398 |
|
|
399 |
@Override |
@Override |
415 |
listModel.getSize() - chns.length, listModel.getSize() - 1 |
listModel.getSize() - chns.length, listModel.getSize() - 1 |
416 |
); |
); |
417 |
chnList.ensureIndexIsVisible(listModel.getSize() - 1); |
chnList.ensureIndexIsVisible(listModel.getSize() - 1); |
418 |
|
|
419 |
|
firePropertyChange("channelsPositionChanged", null, chns); |
420 |
} |
} |
421 |
|
|
422 |
private void |
private void |
490 |
} |
} |
491 |
} |
} |
492 |
|
|
493 |
|
@Override |
494 |
public void |
public void |
495 |
processChannelSelection(JSChannel c, boolean controlDown, boolean shiftDown) { |
processChannelSelection(JSChannel c, boolean controlDown, boolean shiftDown) { |
496 |
|
|