170 |
* @param chnPane The <code>JSChannelsPane</code> to be added. |
* @param chnPane The <code>JSChannelsPane</code> to be added. |
171 |
*/ |
*/ |
172 |
public void |
public void |
173 |
addChannelsPane(JSChannelsPane chnPane) { chnPaneList.add(chnPane); } |
addChannelsPane(JSChannelsPane chnPane) { |
174 |
|
chnPaneList.add(chnPane); |
175 |
|
firePropertyChange("channelLaneAdded", null, chnPane); |
176 |
|
} |
177 |
|
|
178 |
/** |
/** |
179 |
* Removes the specified <code>JSChannelsPane</code> from the view. |
* Removes the specified <code>JSChannelsPane</code> from the view. |
184 |
* is actually removed from the view, <code>false</code> otherwise. |
* is actually removed from the view, <code>false</code> otherwise. |
185 |
*/ |
*/ |
186 |
public boolean |
public boolean |
187 |
removeChannelsPane(JSChannelsPane chnPane) { return chnPaneList.remove(chnPane); } |
removeChannelsPane(JSChannelsPane chnPane) { |
188 |
|
boolean b = chnPaneList.remove(chnPane); |
189 |
|
firePropertyChange("channelLaneRemoved", null, chnPane); |
190 |
|
return b; |
191 |
|
} |
192 |
|
|
193 |
/** |
/** |
194 |
* Gets the current number of <code>JSChannelsPane</code>s added to the view. |
* Gets the current number of <code>JSChannelsPane</code>s added to the view. |
208 |
|
|
209 |
/** |
/** |
210 |
* Inserts the specified <code>JSChannelsPane</code> at the specified position |
* Inserts the specified <code>JSChannelsPane</code> at the specified position |
211 |
* in the view and in the code>JSChannelsPane</code> list. |
* in the view and in the <code>JSChannelsPane</code> list. |
212 |
* Where and how this pane will be shown depends on the view/GUI implementation. |
* Where and how this pane will be shown depends on the view/GUI implementation. |
213 |
* Note that some GUI implementation may have only one pane containing sampler channels. |
* Note that some GUI implementation may have only one pane containing sampler channels. |
214 |
* @param pane The <code>JSChannelsPane</code> to be inserted. |
* @param pane The <code>JSChannelsPane</code> to be inserted. |
319 |
} |
} |
320 |
|
|
321 |
/** |
/** |
322 |
* Removes the first occurence of a channel with numerical ID <code>id</code>. |
* Removes the first occurrence of a channel with numerical ID <code>id</code>. |
323 |
* This method is invoked when a sampler channel is removed in the back-end. |
* This method is invoked when a sampler channel is removed in the back-end. |
324 |
* @return The removed channel or <code>null</code> |
* @return The removed channel or <code>null</code> |
325 |
* if there is no channel with numerical ID <code>id</code>. |
* if there is no channel with numerical ID <code>id</code>. |
332 |
for(JSChannel c : cp.getChannels()) { |
for(JSChannel c : cp.getChannels()) { |
333 |
if(c.getChannelId() == id) { |
if(c.getChannelId() == id) { |
334 |
cp.removeChannel(c); |
cp.removeChannel(c); |
335 |
|
firePropertyChange("channelRemoved", null, c); |
336 |
return c; |
return c; |
337 |
} |
} |
338 |
} |
} |
365 |
} |
} |
366 |
|
|
367 |
/** |
/** |
368 |
* Returns a string in the format <code>channelPaneNumber/channelNumber</code>, |
* Returns a string in the format <code>channelPaneNumber.channelNumber</code>, |
369 |
* where <code>channelPaneNumber</code> is the one-based number of the channels |
* where <code>channelPaneNumber</code> is the one-based number of the channels |
370 |
* pane containing the specified channel and <code>channelNumber</code> is the |
* pane containing the specified channel and <code>channelNumber</code> is the |
371 |
* one-based number of the channel's position in the channels pane. |
* one-based number of the channel's position in the channels pane. |