From ae45edfc5dff1e0a098df4afe747a2dec6c90362 Mon Sep 17 00:00:00 2001 From: Einar Pehrson Date: Tue, 13 May 2003 16:56:26 +0000 Subject: [PATCH] *** empty log message *** --- MooInstrumentList.java | 6 ++++-- MooTrackTitle.java | 2 -- MooView.java | 4 +++- To Do.txt | 31 +++---------------------------- 4 files changed, 10 insertions(+), 33 deletions(-) diff --git a/MooInstrumentList.java b/MooInstrumentList.java index 88903e0..8f1afcb 100644 --- a/MooInstrumentList.java +++ b/MooInstrumentList.java @@ -12,9 +12,10 @@ import java.awt.event.*; public class MooInstrumentList extends JComboBox implements ActionListener { protected int channel; - public MooInstrumentList(int chan) { + + public MooInstrumentList(int instrument) { super(instruments); - setChannel(chan); + setSelectedIndex(instrument); setFont(new Font("Helvetica", Font.PLAIN, 10)); addActionListener(this); } @@ -23,6 +24,7 @@ public class MooInstrumentList extends JComboBox implements ActionListener { channel = chan; setSelectedIndex(Moosique.getChannel(chan).getProgram()); } + public void actionPerformed(ActionEvent e) { JComboBox box = (JComboBox)e.getSource(); int instrument = box.getSelectedIndex(); diff --git a/MooTrackTitle.java b/MooTrackTitle.java index 4630a76..2dfd67f 100644 --- a/MooTrackTitle.java +++ b/MooTrackTitle.java @@ -115,8 +115,6 @@ public class MooTrackTitle extends JPanel { mute.setSelected(false); }}); checkboxes.add(solo); - - add(instruments); add(checkboxes); } diff --git a/MooView.java b/MooView.java index 2defbc6..29314d9 100644 --- a/MooView.java +++ b/MooView.java @@ -38,8 +38,11 @@ public class MooView extends JScrollPane { */ public void setTracks(Track[] tracks) { numberOfTracks = tracks.length; + trackPanel.removeAll(); + titlePanel.removeAll(); if (numberOfTracks == 1) { // If MIDI file is of type 0, creates a view for the track. + trackPanel.setLayout(new FlowLayout()); trackPanel.add(new MooTrackView(tracks[0])); titlePanel.add(new MooTrackTitle(tracks[0])); } else { @@ -54,7 +57,6 @@ public class MooView extends JScrollPane { progressDialog.setVisible(true); // Starts filling the track panel with track views, while updating the progress bar. - trackPanel.removeAll(); trackPanel.setLayout(new GridLayout(1,numberOfTracks)); for (int i = 1; i < tracks.length; i++) { trackPanel.add(new MooTrackView(tracks[i])); diff --git a/To Do.txt b/To Do.txt index f13bcb3..a1038ea 100644 --- a/To Do.txt +++ b/To Do.txt @@ -13,7 +13,6 @@ VIKTIGT! Implementera playfunktionens beteende. Göra detta som en tråd?!? -x Scrollningen?!? Horisontell behövs på både MooView och MooTrackView, men vertikal bara på MooView. Hur göra? x Får Moosique vara statisk? Fult? x Spara konfiguration? Arbetskatalog @@ -34,33 +33,6 @@ Sequence Track private ShortMessage trackName, programChange; - -MooMenu - -x Kom ihåg sökväg vid Open - - Musikrelaterade menyer i Midisoft Recording Session: - - Track Insert New... Har vi - Delete... Har vi - Move... Har vi - Copy... Har vi - Combine... Onödig - Rechannel... Kanske - Split by Pitch... Onödig - - Music Insert Measure... Lagt till - Delete Measure... Lagt till - Clef... Onödig - Time Signature... Lagt till - Key Signature... Onödig - Tempo... Lagt till - Scale Velocity... Lagt till - Transpose... Lagt till - Quantize... Onödig - - Kanske också: Reset Solo / Mute - MooNote / MootrackView / MooNoteElement @@ -71,6 +43,7 @@ MooNote / MootrackView / MooNoteElement ...add(MooNote.getNoteOffEvent()); * set/getDuration verkar inte fungera. + MooTrackTitle @@ -144,3 +117,5 @@ Skr MooNoteProp * textfält som gör att man bara kan skriva in siffror? + + \ No newline at end of file -- 2.39.2