Horus Doc || Java GUI Reference || Doxygen's quick Index  

Zoomer Class Reference

List of all members.

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...


Constructor & Destructor Documentation

Zoomer::Zoomer ZoomerUser    u,
double    zoomVal,
double    minVal,
double    maxVal,
double    values[],
int    scrollType
[inline]
 

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 }


Member Function Documentation

double Zoomer::getZoomFactor   [inline]
 

Get the current zoom factor.

00045 {
00046     return _curVal;
00047 }

void Zoomer::updateStatus double    newZoom [inline]
 

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 }

void Zoomer::actionPerformed ActionEvent    e [inline]
 

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 }

void Zoomer::adjustmentValueChanged AdjustmentEvent    e [inline]
 

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 }

void Zoomer::stateChanged ChangeEvent    e [inline]
 

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 }


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 15:11:29 2003 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001