+ solo.setSelected(false);
+ Moosique.setTrackSolo(track, false);
+ solo.setFont(Moosique.getGUI().FONT);
+ solo.addActionListener(tl);
+ checkboxes.add(solo);
+
+ record = new JButton("Record");
+ record.setFont(Moosique.getGUI().FONT);
+ record.addActionListener(tl);
+ checkboxes.add(record);
+
+ add(checkboxes);
+ }
+
+ /**
+ * Returns the channel of the track that the view is visualising.
+ * @return the chanel of the visualised track
+ */
+ public int getChannel() {
+ return channel;
+ }
+
+ /**
+ * Sets the track view this title should update after recording.
+ * @param the track view
+ */
+ public void setTrackView(MooTrackView tv) {
+ mtv = tv;
+ }
+
+ /**
+ * Checks if the focus is lost.
+ */
+ class TitleFocusListener extends FocusAdapter {
+ public void focusLost(FocusEvent e) {
+ // Update the MidiEvent containing the title of this track
+ }
+ }
+
+ /**
+ * Takes the appropriate action when a user selects an item on the popup menu.
+ */
+ class TitleListener implements ActionListener {
+ public void actionPerformed(ActionEvent e) {
+ Object source = e.getSource();
+ if (source == channelBox) {
+ channel = channelBox.getSelectedIndex();
+ MidiEvent me;
+ MooNote mn;
+ instruments.setChannel(channel);
+ // Query the user before rechannelling???
+ for (int j = 0; j < track.size(); j++) {
+ me = track.get(j);
+ if (me instanceof MooNote){
+ mn = (MooNote)me;
+ mn.setChannel(channel);
+ }
+ }
+ } else if (source == solo) {
+ boolean selected = mute.isSelected();
+ if (selected){
+ solo.setSelected(false);
+ Moosique.setTrackSolo(track, false);
+ }
+ Moosique.setTrackMute(track, selected);
+ } else if (source == mute) {
+ boolean selected = solo.isSelected();
+ if (selected){