getViewport().setViewPosition(new Point((int)getViewport().getViewPosition().getX(), (int)(tickPosition / (Moosique.getSequence().getResolution() / 4)) * MooTrackView.NOTE_HEIGHT));
}
+
+ /**
+ * Creates a view for the given track and adds it to the main view.
+ * @param track the track for which to find the view
+ */
+ public MooTrackView getTrackView(Track track) {
+ for (int i = 0; i < trackPanel.getComponents().length; i++) {
+ MooTrackView mtv = (MooTrackView)(trackPanel.getComponents())[i];
+ if(mtv.getTrack() == track) return mtv;
+ }
+ return null;
+ }
+
/**
* Creates a view for the given track and adds it to the main view.
* @param track the track for which to add a view