Class TLcdGXYZoomController

All Implemented Interfaces:
ILcdUndoableSource, ILcdStatusSource, ILcdGXYController, KeyListener, MouseListener, MouseMotionListener, Serializable, EventListener

public class TLcdGXYZoomController extends TLcdGXYDragRectangleController implements MouseListener, MouseMotionListener, ILcdUndoableSource
The TLcdGXYZoomController can be used for performing a zoom in or zoom out on an ILcdGXYView. The mode property indicate if a zoom in or out shall be performed. If the mode "MIXED" has been set, a zoom in ( respectively zoom out ) will be performed when using the right mouse button ( respectively left mouse button).

This controller supports the undo/redo mechanism. An ILcdUndoableListener can be added using ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener).

See Also:
  • Field Details

    • ZOOM_IN

      public static final String ZOOM_IN
      See Also:
    • ZOOM_OUT

      public static final String ZOOM_OUT
      See Also:
    • MIXED

      public static final String MIXED
      See Also:
    • ZOOM_RECTANGLE_MAX

      public static final int ZOOM_RECTANGLE_MAX
      When zooming in/out dragging a rectangle the new scale will be computed so that the view contains at most the rectangle. Parts of the rectangle may be outside the view when zooming in, the current view is contained completely in the rectangle when zooming out. This is aggressive zooming.
      See Also:
    • ZOOM_RECTANGLE_MIN

      public static final int ZOOM_RECTANGLE_MIN
      When zooming in/out dragging a rectangle the new scale will be computed so that the view contains at least the rectangle and possibly some borders to fill the view when zooming in, and the current view is not completely contained in the dragged rectangle. This is non aggressive zooming.
      See Also:
    • ZOOM_RECTANGLE_AVERAGE

      public static final int ZOOM_RECTANGLE_AVERAGE
      When zooming in/out dragging a rectangle the ratio of the new scale to the old scale is equal to the average of the width and height ratio's of the view and the rectangle.
      See Also:
    • ZOOM_RECTANGLE_WIDTH

      public static final int ZOOM_RECTANGLE_WIDTH
      When zooming in/out dragging a rectangle the new scale is chosen so that the new views width agrees with the width of the rectangle.
      See Also:
    • ZOOM_RECTANGLE_HEIGHT

      public static final int ZOOM_RECTANGLE_HEIGHT
      When zooming in/out dragging a rectangle the new scale is chosen so that the new views height agrees with the height of the rectangle.
      See Also:
  • Constructor Details

    • TLcdGXYZoomController

      public TLcdGXYZoomController()
    • TLcdGXYZoomController

      public TLcdGXYZoomController(String aMode)
      Parameters:
      aMode - TLcdGXYPanController.ZOOM_IN or TLcdGXYPanController.ZOOM_OUT
    • TLcdGXYZoomController

      public TLcdGXYZoomController(String aMode, boolean aRegisterInstance)
      Deprecated.
      use one of the constructors without the aRegisterInstance parameter.
  • Method Details