Class TLcdGXYZoomWheelController

java.lang.Object
com.luciad.view.gxy.controller.ALcdGXYController
com.luciad.view.gxy.controller.TLcdGXYZoomWheelController
All Implemented Interfaces:
ILcdUndoableSource, ILcdAWTEventListener, ILcdStatusSource, ILcdGXYChainableController, ILcdGXYController, MouseMotionListener, MouseWheelListener, Serializable, EventListener

public class TLcdGXYZoomWheelController extends ALcdGXYController implements MouseMotionListener, MouseWheelListener, ILcdUndoableSource, ILcdGXYChainableController
Provides scroll wheel zoom support.

When the mouse wheel is scrolled then the scale of the view to which this controller is set is changed exponentially. The direction of the zoom (in or out for forward scrolling) and the zooming factor can be set.

The controller allows setting whether the view should be repainted continuously or not. When the view contains layers which take a long time to paint and which are not painted asynchronously it is not advisable to use continuous painting as the higher number of repaints blocks the GUI for a longer time.

Since:
8.0
See Also:
  • Constructor Details

    • TLcdGXYZoomWheelController

      public TLcdGXYZoomWheelController()
      Creates a new TLcdGXYZoomWheelController that zooms out when scrolling down and zooms in when scrolling up. It repaints continuously, on every mouse wheel change.
    • TLcdGXYZoomWheelController

      public TLcdGXYZoomWheelController(boolean aScrollUpZoomOut, boolean aContinuousRepaint)
      Constructs a new TLcdGXYZoomWheelController.
      Parameters:
      aScrollUpZoomOut - the zoom direction of the scroll wheel. true means when the scroll wheel is pushed away from the user (scroll up), the map 'moves away' (zooms out). If set to false, scrolling up means zooming in.
      aContinuousRepaint - true means the map will be zoomed on every mouse wheel change. On false, mouse wheel changes are accumulated and performed only once.
  • Method Details