--- jsampler/trunk/src/org/jsampler/view/fantasia/NormalChannelView.java 2008/09/08 00:19:27 1767 +++ jsampler/trunk/src/org/jsampler/view/fantasia/NormalChannelView.java 2008/09/11 18:48:36 1776 @@ -38,7 +38,6 @@ import java.util.Vector; -import javax.swing.Action; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; @@ -231,6 +230,7 @@ screen.installListeners(); addEnhancedMouseListener(channel.getContextMenu()); + addEnhancedMouseListener(getHandler()); } public void @@ -239,6 +239,7 @@ btnOptions.onDestroy(); uninstallChannelOptionsView(); //removeEnhancedMouseListener(channel.getContextMenu()); + removeEnhancedMouseListener(getHandler()); } public void @@ -470,6 +471,21 @@ public boolean contains(int x, int y) { return (x > 5 && x < 23) && (y > 5 && y < 16); } } + + private final EventHandler eventHandler = new EventHandler(); + + private EventHandler + getHandler() { return eventHandler; } + + private class EventHandler extends MouseAdapter { + public void + mouseClicked(MouseEvent e) { + if(e.getButton() != e.BUTTON1) return; + // TAG: channel selection system + CC.getMainFrame().getChannelsPane(0).setSelectedChannel(channel); + /////// + } + } }