trackPanel.setLayout(new FlowLayout());
MooTrackTitle title = new MooTrackTitle(tracks[0]);
titlePanel.add(title);
- trackPanel.add(new MooTrackView(tracks[0], title));
+ MooTrackView mtv = new MooTrackView(tracks[0], title);
+ trackPanel.add(mtv);
+ title.setTrackView(mtv);
} else {
if (showProgress) {
// Creates dialog for progress bar.
progressDialog.pack();
progressDialog.setLocation((Toolkit.getDefaultToolkit().getScreenSize().width - progressDialog.getWidth()) / 2, (Toolkit.getDefaultToolkit().getScreenSize().height - progressDialog.getHeight()) / 2);
progressDialog.setVisible(true);
- } else System.out.println("Creating track views");
-
+ }
+
// Starts filling the track panel with track views, while updating the progress bar.
GridLayout gL = new GridLayout(1,numberOfTracks);
trackPanel.setLayout(gL);
if (Moosique.shouldBeDrawn(tracks[i])) {
MooTrackTitle title = new MooTrackTitle(tracks[i]);
titlePanel.add(title);
- trackPanel.add(new MooTrackView(tracks[i], title));
+ MooTrackView mtv = new MooTrackView(tracks[i], title);
+ trackPanel.add(mtv);
+ title.setTrackView(mtv);
if (showProgress) progressBar.setValue(i);
else System.out.print(".");
} else {
}
}
if (showProgress) progressDialog.dispose();
- else System.out.print("Done");
}
/* JPanel filler = new JPanel();
int totalViewLength = trackPanel.getComponents().length * MooTrackView.VIEW_WIDTH;