40 |
|
|
41 |
import javax.swing.event.ListSelectionEvent; |
import javax.swing.event.ListSelectionEvent; |
42 |
import javax.swing.event.ListSelectionListener; |
import javax.swing.event.ListSelectionListener; |
43 |
|
|
44 |
import org.jsampler.CC; |
import org.jsampler.CC; |
45 |
import org.jsampler.JSampler; |
import org.jsampler.JSampler; |
46 |
import org.jsampler.SamplerChannelModel; |
import org.jsampler.SamplerChannelModel; |
49 |
import org.jsampler.event.SamplerChannelListEvent; |
import org.jsampler.event.SamplerChannelListEvent; |
50 |
import org.jsampler.event.SamplerChannelListListener; |
import org.jsampler.event.SamplerChannelListListener; |
51 |
|
|
52 |
|
import org.jsampler.view.SessionViewConfig.ChannelConfig; |
53 |
|
|
54 |
|
|
55 |
/** |
/** |
56 |
* Defines the skeleton of a JSampler's main frame. |
* Defines the skeleton of a JSampler's main frame. |
255 |
return; |
return; |
256 |
} |
} |
257 |
|
|
258 |
getSelectedChannelsPane().addChannel(e.getChannelModel()); |
ChannelConfig config = null; |
259 |
|
JSViewConfig viewConfig = CC.getViewConfig(); |
260 |
|
if(viewConfig != null && viewConfig.getSessionViewConfig() != null) { |
261 |
|
config = viewConfig.getSessionViewConfig().pollChannelConfig(); |
262 |
|
} |
263 |
|
|
264 |
|
if(config == null) { |
265 |
|
getSelectedChannelsPane().addChannel(e.getChannelModel()); |
266 |
|
} else { |
267 |
|
int i = config.channelsPanel; |
268 |
|
if(i >= 0 && i < getChannelsPaneCount()) { |
269 |
|
getChannelsPane(i).addChannel(e.getChannelModel(), config); |
270 |
|
} else { |
271 |
|
getSelectedChannelsPane().addChannel(e.getChannelModel(), config); |
272 |
|
} |
273 |
|
} |
274 |
} |
} |
275 |
|
|
276 |
/** |
/** |
362 |
JSChannelsPane chnPane = getChannelsPane(i); |
JSChannelsPane chnPane = getChannelsPane(i); |
363 |
for(int j = 0; j < chnPane.getChannelCount(); j++) { |
for(int j = 0; j < chnPane.getChannelCount(); j++) { |
364 |
if(chnPane.getChannel(j).getChannelId() == channel.getChannelId()) { |
if(chnPane.getChannel(j).getChannelId() == channel.getChannelId()) { |
365 |
return (i + 1) + "/" + (j + 1); |
return (i + 1) + "." + (j + 1); |
366 |
} |
} |
367 |
} |
} |
368 |
} |
} |