Inheritance diagram for StoryboardPanel::

Public Methods | |
| StoryboardPanel () | |
| StoryboardPanel (double shotFactor) | |
| void | setUser (FrameNavigatorUser u) |
| void | updateSegs (HxCorba.ImageSeq seq, HxCorba.VxSegmentationOperations seg) |
| void | updateSegs (HxCorba.ImageSeq seq, HxCorba.VxSegmentationOperations seg, int nShots) |
| void | showMoreShots (int nShots) |
| void | showAllShots () |
| void | clear () |
| void | setCurrentFrame (int frameNr) |
| void | setNumberOfFrames (int maxFrame) |
| void | selectShot (int frameNr) |
| void | clearSelection () |
|
|
00023 {
00024 this(0.3);
00025 }
|
|
|
00028 {
00029 setLayout(new FlowLayout(FlowLayout.LEFT, 3, 3));
00030 setBackground(Color.white);
00031 addComponentListener(new StoryboardComponentListener());
00032
00033 _user = null;
00034 _curFrame = 0;
00035 _currentShot = null;
00036 _shotFactor = shotFactor;
00037
00038 updatePreferredSize();
00039 }
|
|
|
Reimplemented from FrameNavigator.
00043 {
00044 _user = u;
00045 }
|
|
||||||||||||
|
00048 {
00049 updateSegs(seq, seg, seg.size());
00050 }
|
|
||||||||||||||||
|
00054 {
00055 clear();
00056
00057 _imageSizes = seq.frameSizes();
00058 _imageSizes.x *= _shotFactor;
00059 _imageSizes.y *= _shotFactor;
00060
00061 _seqDisplayer = seq.getDisplayer();
00062 _seqDisplayer.setDisplayMode("Direct");
00063 _seqDisplayer.setSize(_imageSizes);
00064
00065 _times = seg.getTimeSpans();
00066 _timeList = new TimeSpanList(_times);
00067
00068 for(int i=0; i<_times.length; i++)
00069 add(new ShotComponent(_times[i]));
00070
00071 // Don't compute preferred size now because the newly added
00072 // component still hasn't been placed in it final position
00073 // (next events will do this). Use invokeLater to call
00074 // updatePreferredSize after these events.
00075 SwingUtilities.invokeLater(new Runnable() {
00076 public void run() { updatePreferredSize(); }
00077 });
00078
00079 _shotsShown = 0;
00080 showMoreShots(nShots);
00081 }
|
|
|
00084 {
00085 int maxFrame = Math.min(_shotsShown + nShots, _times.length);
00086 if(maxFrame <= _shotsShown) return; //nothing more to show
00087
00088 PlayingDirector director = new PlayingDirector(maxFrame);
00089 director.addPlayingObserver(new ShotDisplayer(director, _seqDisplayer));
00090 director.playFrom(_shotsShown);
00091
00092 _shotsShown = maxFrame;
00093 }
|
|
|
00096 {
00097 showMoreShots(_times.length - _shotsShown);
00098 }
|
|
|
00101 {
00102 removeAll();
00103 updatePreferredSize();
00104
00105 _seqDisplayer = null;
00106 _currentShot = null;
00107 }
|
|
|
Reimplemented from FrameNavigator.
00111 {
00112 int nComp = _timeList.searchSegmentOfFrame(frameNr);
00113 if((nComp != -1) && (nComp < getComponentCount())) {
00114 if(_currentShot != null) _currentShot.setCurrent(false);
00115 _currentShot = (ShotComponent)getComponent(nComp);
00116 _currentShot.setCurrent(true);
00117
00118 // show shot image
00119 ShotDisplayer displayer = new ShotDisplayer(null, _seqDisplayer);
00120 displayer.prepareNewFrame(nComp);
00121 displayer.updateNewFrame(nComp);
00122
00123 // make sure currentShot is visible
00124 scrollToShot(_currentShot);
00125 }
00126 else {
00127 if(_currentShot != null) _currentShot.setCurrent(false);
00128 _currentShot = null;
00129 }
00130 }
|
|
|
Reimplemented from FrameNavigator.
00134 {
00135 }
|
|
|
00138 {
00139 int nComp = _timeList.searchSegmentOfFrame(frameNr);
00140 if((nComp != -1) && (nComp < getComponentCount())) {
00141 ShotComponent shot = (ShotComponent)getComponent(nComp);
00142 shot.setSelected(true);
00143 }
00144 }
|
|
|
00147 {
00148 Component[] shots = getComponents();
00149 for(int i=0; i<shots.length; i++)
00150 ((ShotComponent)shots[i]).setSelected(false);
00151 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001