Inheritance diagram for SimpleFrameNavigator::

Public Methods | |
| SimpleFrameNavigator (FrameNavigatorUser u, int curFrame, int minFrame, int maxFrame, int scrollType) | |
| Construct a SimpleFrameNavigator. More... | |
| SimpleFrameNavigator (int scrollType) | |
| SimpleFrameNavigator () | |
| double | getCurrentFrame () |
| Get the current frame. More... | |
| void | setUser (FrameNavigatorUser u) |
| void | setCurrentFrame (int newFrame) |
| Update the GUI to reflect the given status. More... | |
| void | setNumberOfFrames (int maxFrame) |
| void | updateStatus (int curFrame, int minFrame, int maxFrame) |
| Update the GUI to reflect the given status. More... | |
| void | actionPerformed (ActionEvent e) |
| Implementation of ActionListener. More... | |
| void | adjustmentValueChanged (AdjustmentEvent e) |
| Implementation of AdjustmentListener. More... | |
| void | stateChanged (ChangeEvent e) |
| Implementation of ChangeListener. More... | |
Static Public Attributes | |
| final int | SCROLL_BAR = 1 |
| final int | SLIDER = 2 |
|
||||||||||||||||||||||||
|
Construct a SimpleFrameNavigator. scrollType indicates whether the GUI uses a ScrollBar (scrollType == 1) or a Slider (scrollType == 2).
00036 {
00037 doInit(u, curFrame, minFrame, maxFrame, scrollType);
00038 }
|
|
|
00041 {
00042 doInit(null, 0, 0, 0, scrollType);
00043 }
|
|
|
00046 {
00047 doInit(null, 0, 0, 0, SCROLL_BAR);
00048 }
|
|
|
Get the current frame.
00053 {
00054 return _curFrame;
00055 }
|
|
|
Reimplemented from FrameNavigator.
00058 {
00059 _user = u;
00060 }
|
|
|
Update the GUI to reflect the given status. Will not call the _user (it is assumed that the _user does it). Reimplemented from FrameNavigator.
00066 {
00067 if (newFrame == _curFrame)
00068 return;
00069 changeFrame(newFrame);
00070 }
|
|
|
Reimplemented from FrameNavigator.
00073 {
00074 updateStatus(0, 0, maxFrame);
00075 }
|
|
||||||||||||||||
|
Update the GUI to reflect the given status. Will not call the _user (it is assumed that the _user does it).
00081 {
00082 _minFrame = minFrame;
00083 _maxFrame = maxFrame;
00084 if (_sb != null) {
00085 _sb.setMinimum(_minFrame);
00086 _sb.setMaximum(_maxFrame);
00087 }
00088 if (_slider != null) {
00089 _slider.setMinimum(_minFrame);
00090 _slider.setMaximum(_maxFrame);
00091 }
00092 changeFrame(curFrame);
00093 }
|
|
|
Implementation of ActionListener.
00099 {
00100 if (e.getSource() == _frameField) {
00101 if (_updatingFrame) // check whether we did this ourself
00102 return;
00103 String s = _frameField.getText();
00104 changeFrame(java.lang.Integer.valueOf(s).intValue());
00105 if(_user != null) _user.handleFrameChanged(_curFrame);
00106 }
00107 }
|
|
|
Implementation of AdjustmentListener.
00113 {
00114 if (_updatingFrame) // check whether we did this ourself
00115 return;
00116 int value = _sb.getValue();
00117 changeFrame(value);
00118 if(_user != null) _user.handleFrameChanged(_curFrame);
00119 }
|
|
|
Implementation of ChangeListener.
00125 {
00126 if (_updatingFrame) // check whether we did this ourself
00127 return;
00128 int value = _slider.getValue();
00129 changeFrame(value);
00130 if(_user != null) _user.handleFrameChanged(_curFrame);
00131 }
|
|
|
|
|
|
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001