]> ruin.nu Git - moosique.git/blobdiff - MooView.java
some restructuring..
[moosique.git] / MooView.java
index 620478ca09b8857983b2cba25d4618e1612b21c1..4f36de3ce0a5d06e20b894cdfbac6d6035579a4f 100644 (file)
@@ -18,10 +18,10 @@ public class MooView extends JScrollPane {
        /** 
         * Creates the main view
         */
-       public MooView(Track[] tracks) {
+       public MooView(Sequence seq) {
                super(VERTICAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED);
+               tracks = seq.getTracks();
 
-               this.tracks = tracks;
 
                trackPanel = new JPanel(new GridLayout(1,3), true);
                createTrackViews();
@@ -42,11 +42,17 @@ public class MooView extends JScrollPane {
                trackPanel.validate();
        }
 
-       public void update(Track[] tracks) {
-               this.tracks = tracks;
+       public void setSequence(Sequence seq) {
+               tracks = seq.getTracks();
                createTrackViews();
        }
 
+       public void update() {
+               // Calls on each track view to update itself.
+               for (int i = 0; i < trackViews.length; i++) {
+                       //trackViews[i].update();
+               }
+       }
        /** 
         * Creates a view for the given track and adds it to the main view.
         * @param track         the track for which to add a view
@@ -62,4 +68,4 @@ public class MooView extends JScrollPane {
        public void removeTrackView(Track track) {
                
        }
-}
\ No newline at end of file
+}