ilog.views.maps.interactor
Class IlvContinuousZoomInteractor

java.lang.Object
  extended by ilog.views.IlvManagerViewInteractor
      extended by ilog.views.maps.interactor.IlvContinuousZoomInteractor
All Implemented Interfaces:
IlvPermanentInteractorInterface, Serializable

public class IlvContinuousZoomInteractor
extends IlvManagerViewInteractor
implements IlvPermanentInteractorInterface

Interactor that performs continuous zoom/unzoom on button pressed or zoom/unzoom on mouse wheel action.

Since:
JViews 8.1
See Also:
Serialized Form

Constructor Summary
IlvContinuousZoomInteractor()
          Constructs a new IlvContinuousZoomInteractor
 
Method Summary
protected  void attach(IlvManagerView v)
          Called when the interactor is attached to the manager view.
protected  void detach()
          Called when the interactor is detached from the view.
 double getContinuousZoomFactor()
          Return the zoom factor used in continuous mode.
 double getInstantZoomFactor()
          Get the zoom factor used in instant mode.
 int getPeriod()
          Retrieves the period between two zooms in continuous mode.
 int getUnzoomButton()
          Retrieves the button that is used to unzoom.
 int getUnzoomKeyCode()
          Retrieves the unzoom keycode modifier.
 int getZoomButton()
          Retrieves the button that is used to zoom.
 int getZoomInKeyCode()
          Retrieves the zoom in keycode.
 int getZoomOutKeyCode()
          Retrieves the zoom out keycode.
 boolean isPermanent()
          Returns true if the interactor operates in permanent mode; false otherwise.
 void setContinuousZoomFactor(double factor)
          Sets the zoom factor used in continuous mode.
 void setInstantZoomFactor(double factor)
          Set the zoom factor used in instant mode.
 void setPeriod(int period)
          Sets the period between two zooms in continuous zoom mode.
 void setPermanent(boolean set)
          Changes the mode of the interactor.
 void setUnzoomButton(int unzoomButton)
          Sets the button that is used to unzoom.
 void setUnzoomKeyCode(int code)
          Set the unzoom zoom keycode.
 void setZoomButton(int zoomButton)
          Sets the button that is used to zoom.
 void setZoomInKeyCode(int code)
          Set the zoom in keycode.
 void setZoomOutKeyCode(int code)
          Set the zoom out keycode.
protected  void zoomin(double fact)
          Zooms in on the current point.
 
Methods inherited from class ilog.views.IlvManagerViewInteractor
addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, allowEnsureVisible, allowEnsureVisible, disableEvents, drawGhost, drawGhost, enableEvents, ensureVisible, ensureVisible, getManager, getManagerView, getTransformer, handleExpose, isXORGhost, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeFocusListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, setXORGhost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvContinuousZoomInteractor

public IlvContinuousZoomInteractor()
Constructs a new IlvContinuousZoomInteractor

Method Detail

getUnzoomKeyCode

public int getUnzoomKeyCode()
Retrieves the unzoom keycode modifier. This modifier is used, along with the mouse clicks, to detect the direction of continuous zoom. The default is KEY_CONTROL

Returns:
the zoom in keycode.

setUnzoomKeyCode

public void setUnzoomKeyCode(int code)
Set the unzoom zoom keycode. This modifier is used, along with the mouse clicks, to detect the direction of continuous zoom.

Parameters:
code - the zoomin keycode.

getZoomInKeyCode

public int getZoomInKeyCode()
Retrieves the zoom in keycode. The default is KEY_UP

Returns:
the zoom in keycode.

setZoomInKeyCode

public void setZoomInKeyCode(int code)
Set the zoom in keycode.

Parameters:
code - the zoomin keycode.

getZoomOutKeyCode

public int getZoomOutKeyCode()
Retrieves the zoom out keycode. The default is KEY_DOWN

Returns:
the zoom out keycode.

setZoomOutKeyCode

public void setZoomOutKeyCode(int code)
Set the zoom out keycode.

Parameters:
code - the zoomin keycode.

zoomin

protected void zoomin(double fact)
Zooms in on the current point.

Parameters:
fact - zoom multiplier.

attach

protected void attach(IlvManagerView v)
Called when the interactor is attached to the manager view.

Overrides:
attach in class IlvManagerViewInteractor
Parameters:
v - The manager view.
See Also:
IlvManagerViewInteractor.attach(ilog.views.IlvManagerView)

detach

protected void detach()
Called when the interactor is detached from the view.

Overrides:
detach in class IlvManagerViewInteractor
See Also:
IlvManagerViewInteractor.detach()

isPermanent

public boolean isPermanent()
Returns true if the interactor operates in permanent mode; false otherwise.

Specified by:
isPermanent in interface IlvPermanentInteractorInterface

setPermanent

public void setPermanent(boolean set)
Changes the mode of the interactor.

Specified by:
setPermanent in interface IlvPermanentInteractorInterface
Parameters:
set - the new mode.

getContinuousZoomFactor

public double getContinuousZoomFactor()
Return the zoom factor used in continuous mode.

Returns:
The zoom factor used in continuous mode.

setContinuousZoomFactor

public void setContinuousZoomFactor(double factor)
Sets the zoom factor used in continuous mode.

Parameters:
factor - The zoom factor used in continuous mode.

getInstantZoomFactor

public double getInstantZoomFactor()
Get the zoom factor used in instant mode.

Returns:
The zoom factor used in instant mode.

setInstantZoomFactor

public void setInstantZoomFactor(double factor)
Set the zoom factor used in instant mode.

Parameters:
factor - The zoom factor used in instant mode.

getPeriod

public int getPeriod()
Retrieves the period between two zooms in continuous mode.

Returns:
The period in milliseconds.

setPeriod

public void setPeriod(int period)
Sets the period between two zooms in continuous zoom mode.

Parameters:
period - The period in milliseconds.

getUnzoomButton

public int getUnzoomButton()
Retrieves the button that is used to unzoom.

Returns:
the button that is used to unzoom.

setUnzoomButton

public void setUnzoomButton(int unzoomButton)
Sets the button that is used to unzoom.

Parameters:
unzoomButton - the button that is used to unzoom.

getZoomButton

public int getZoomButton()
Retrieves the button that is used to zoom.

Returns:
the button that is used to zoom.

setZoomButton

public void setZoomButton(int zoomButton)
Sets the button that is used to zoom.

Parameters:
zoomButton - the button that is used to zoom.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.