// need code to close and open another movie;
void openFromPath (String url, long startTime) throws QTException {
if (currentURL != null) {
if (currentURL.equals(url)) {
mc.goToTime(new TimeRecord (mc.getTimeScale(), startTime)); // set start-time
return;
}
System.out.println("Falling through url check");
}
saveMovie sc = (saveMovie) drawers.get(url);
if (sc != null) {
if (currentComponent != null) {
remove (currentComponent.asComponent());
}
mc = sc.mc;
QTComponent qtc = QTFactory.makeQTComponent(mc);
currentComponent = qtc;
mc.goToTime(new TimeRecord (mc.getTimeScale(), startTime));
add (currentComponent.asComponent(),
BorderLayout.CENTER);
//mc.validate();
//validate();
currentURL = url;
currentMovie = sc.movie;
//invalidate();
//repaint();
System.out.println("fetching from cache");
}
else
try {
QTFile qtf = new QTFile (url);
OpenMovieFile omf = OpenMovieFile.asRead (qtf);
currentMovie = Movie.fromFile (omf);
mc = new MovieController (currentMovie);
mc.enableEditing(false);
mc.goToTime(new TimeRecord (mc.getTimeScale(), startTime));
if (currentComponent != null)
remove (currentComponent.asComponent());
currentComponent = QTFactory.makeQTComponent(mc);
add (currentComponent.asComponent(),
BorderLayout.CENTER);