Public Methods | |
Zoomer (ZoomerUser u, double zoomVal, double minVal, double maxVal, double[] values, int scrollType) | |
Construct a Zoomer. More... | |
double | getZoomFactor () |
Get the current zoom factor. More... | |
void | updateStatus (double newZoom) |
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... |
|
Construct a Zoomer. scrollType indicates whether the GUI uses a ScrollBar (scrollType == 1) or a Slider (scrollType == 2).
00037 { 00038 doInit(u, zoomVal, minVal, maxVal, values, scrollType); 00039 } |
|
Get the current zoom factor.
00045 { 00046 return _curVal; 00047 } |
|
Update the GUI to reflect the given status. Will not call the _user (it is assumed that the _user does it).
00054 { 00055 setZoomValue(newZoom); 00056 } |
|
Implementation of ActionListener.
00062 { 00063 if (e.getSource() == _zoomBox) { 00064 if (_updatingZoom) // check whether we did this ourself 00065 return; 00066 String s = (String) _zoomBox.getSelectedItem(); 00067 setZoomValue(java.lang.Double.valueOf(s).doubleValue()); 00068 _user.handleZoomed(_curVal); 00069 } 00070 } |
|
Implementation of AdjustmentListener.
00076 { 00077 if (_updatingZoom) // check whether we did this ourself 00078 return; 00079 int value = _sb.getValue(); 00080 setZoomValue((double) value / 10.0); 00081 _user.handleZoomed(_curVal); 00082 } |
|
Implementation of ChangeListener.
00088 { 00089 if (_updatingZoom) // check whether we did this ourself 00090 return; 00091 int value = _slider.getValue(); 00092 setZoomValue((double) value / 10.0); 00093 _user.handleZoomed(_curVal); 00094 } |