--- jsampler/trunk/src/org/jsampler/view/classic/Channel.java 2007/09/10 22:29:09 1341 +++ jsampler/trunk/src/org/jsampler/view/classic/Channel.java 2007/09/11 15:38:28 1343 @@ -118,6 +118,8 @@ * @author Grigor Iliev */ public class Channel extends org.jsampler.view.JSChannel { + private final static ImageIcon iconEdit; + private final static ImageIcon iconMuteOn; private final static ImageIcon iconMuteOff; private final static ImageIcon iconMutedBySolo; @@ -142,6 +144,8 @@ = new Vector(); static { + iconEdit = new ImageIcon(Channel.class.getResource("res/icons/edit.png")); + String path = "org/jsampler/view/classic/res/icons/"; URL url = ClassLoader.getSystemClassLoader().getResource(path + "mute_on.png"); iconMuteOn = new ImageIcon(url); @@ -307,6 +311,7 @@ private final ChannelProperties propertiesPane; private final JButton btnInstr = new InstrumentButton(i18n.getLabel("Channel.btnInstr")); private final Action actInstr; + private final JButton btnEdit = new JButton(iconEdit); private final JButton btnMute = new JButton(); private final JButton btnSolo = new JButton(); private final JSlider slVolume = new JSlider(0, 100); @@ -350,6 +355,11 @@ p.add(btnInstr); p.add(Box.createRigidArea(new Dimension(6, 0))); + btnEdit.setToolTipText(i18n.getLabel("Channel.btnEdit.tt")); + btnEdit.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + p.add(btnEdit); + p.add(Box.createRigidArea(new Dimension(6, 0))); + lStreams.setHorizontalAlignment(JLabel.CENTER); lVoices.setHorizontalAlignment(JLabel.CENTER); @@ -429,6 +439,13 @@ btnInstr.addActionListener(actInstr); + btnEdit.addActionListener(new ActionListener() { + public void + actionPerformed(ActionEvent e) { + CC.getSamplerModel().editBackendInstrument(getChannelId()); + } + }); + btnMute.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { changeMute(); }