Public Methods | |
FrameNavigatorDisplayer (FrameNavigator nav) | |
PlayingObserver | makeObserver (PlayingDirector director) |
FrameNavigator | getNavigator () |
This class will be a FrameNavigatorUser that seeks the PlayingDirector when the navigator changes the frame, and will update the navigator while the director is running.
|
00021 { 00022 _navigator = nav; 00023 _navigator.setUser(new FrameNavigatorUser() { 00024 public void handleFrameChanged(int newFrame) { changeFrame(newFrame); } 00025 }); 00026 00027 _expectedFrame = -1; 00028 _pendentSeek = -1; 00029 00030 _director = null; 00031 } |
|
00034 { 00035 //First call navigator and then set the director. This call to the 00036 //navigator may call handleFrameChanged. To avoid calling the director 00037 //as a side effect, set the director later. 00038 00039 _navigator.setNumberOfFrames(director.getNrFrames()); 00040 00041 _director = director; 00042 00043 return new PlayingAdapter() { 00044 public void updateNewFrame(int frameNr) { 00045 visitFrame(frameNr); 00046 } 00047 }; 00048 } |
|
00051 { 00052 return _navigator; 00053 } |