118 |
* @author Grigor Iliev |
* @author Grigor Iliev |
119 |
*/ |
*/ |
120 |
public class Channel extends org.jsampler.view.JSChannel { |
public class Channel extends org.jsampler.view.JSChannel { |
121 |
|
private final static ImageIcon iconEdit; |
122 |
|
|
123 |
private final static ImageIcon iconMuteOn; |
private final static ImageIcon iconMuteOn; |
124 |
private final static ImageIcon iconMuteOff; |
private final static ImageIcon iconMuteOff; |
125 |
private final static ImageIcon iconMutedBySolo; |
private final static ImageIcon iconMutedBySolo; |
144 |
= new Vector<PropertyChangeListener>(); |
= new Vector<PropertyChangeListener>(); |
145 |
|
|
146 |
static { |
static { |
147 |
|
iconEdit = new ImageIcon(Channel.class.getResource("res/icons/edit.png")); |
148 |
|
|
149 |
String path = "org/jsampler/view/classic/res/icons/"; |
String path = "org/jsampler/view/classic/res/icons/"; |
150 |
URL url = ClassLoader.getSystemClassLoader().getResource(path + "mute_on.png"); |
URL url = ClassLoader.getSystemClassLoader().getResource(path + "mute_on.png"); |
151 |
iconMuteOn = new ImageIcon(url); |
iconMuteOn = new ImageIcon(url); |
311 |
private final ChannelProperties propertiesPane; |
private final ChannelProperties propertiesPane; |
312 |
private final JButton btnInstr = new InstrumentButton(i18n.getLabel("Channel.btnInstr")); |
private final JButton btnInstr = new InstrumentButton(i18n.getLabel("Channel.btnInstr")); |
313 |
private final Action actInstr; |
private final Action actInstr; |
314 |
|
private final JButton btnEdit = new JButton(iconEdit); |
315 |
private final JButton btnMute = new JButton(); |
private final JButton btnMute = new JButton(); |
316 |
private final JButton btnSolo = new JButton(); |
private final JButton btnSolo = new JButton(); |
317 |
private final JSlider slVolume = new JSlider(0, 100); |
private final JSlider slVolume = new JSlider(0, 100); |
355 |
p.add(btnInstr); |
p.add(btnInstr); |
356 |
p.add(Box.createRigidArea(new Dimension(6, 0))); |
p.add(Box.createRigidArea(new Dimension(6, 0))); |
357 |
|
|
358 |
|
btnEdit.setToolTipText(i18n.getLabel("Channel.btnEdit.tt")); |
359 |
|
btnEdit.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
360 |
|
p.add(btnEdit); |
361 |
|
p.add(Box.createRigidArea(new Dimension(6, 0))); |
362 |
|
|
363 |
lStreams.setHorizontalAlignment(JLabel.CENTER); |
lStreams.setHorizontalAlignment(JLabel.CENTER); |
364 |
lVoices.setHorizontalAlignment(JLabel.CENTER); |
lVoices.setHorizontalAlignment(JLabel.CENTER); |
365 |
|
|
439 |
|
|
440 |
btnInstr.addActionListener(actInstr); |
btnInstr.addActionListener(actInstr); |
441 |
|
|
442 |
|
btnEdit.addActionListener(new ActionListener() { |
443 |
|
public void |
444 |
|
actionPerformed(ActionEvent e) { |
445 |
|
CC.getSamplerModel().editBackendInstrument(getChannelId()); |
446 |
|
} |
447 |
|
}); |
448 |
|
|
449 |
btnMute.addActionListener(new ActionListener() { |
btnMute.addActionListener(new ActionListener() { |
450 |
public void |
public void |
451 |
actionPerformed(ActionEvent e) { changeMute(); } |
actionPerformed(ActionEvent e) { changeMute(); } |