com.vividsolutions.jump.workbench.ui.zoom
Class ZoomTool

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
      extended by com.vividsolutions.jump.workbench.ui.cursortool.DragTool
          extended by com.vividsolutions.jump.workbench.ui.zoom.AbstractZoomTool
              extended by com.vividsolutions.jump.workbench.ui.zoom.ZoomTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class ZoomTool
extends AbstractZoomTool


Nested Class Summary
 
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
 
Field Summary
static java.lang.String ZOOM_TOOL_NAME
          If the selection box has side length less than this value, the input will be considered to be a click rather than a box.
 
Fields inherited from class com.vividsolutions.jump.workbench.ui.zoom.AbstractZoomTool
auxImage, origImage
 
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
 
Constructor Summary
ZoomTool()
           
 
Method Summary
 void activate(LayerViewPanel layerViewPanel)
           
 void deactivate()
           
protected  void gestureFinished()
           
 java.awt.Cursor getCursor()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getName()
          Returns a very brief description of this CursorTool.
 boolean isRightMouseButtonUsed()
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
          Begins handling of the drag.
 void mouseReleased(java.awt.event.MouseEvent e)
           
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.zoom.AbstractZoomTool
cacheImage, createImageIfNeeded, getAnimatingZoom, mouseWheelMoved, setAnimatingZoom, zoomAt
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DragTool
getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getShape, getViewDestination, getViewSource, modelClickBuffer, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClick
 
Methods inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
add, allowSnapping, cancelGesture, check, cleanup, clearShape, createCursor, createCursor, createStandardSnappingPolicies, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getPanel, getSnapManager, getTaskFrame, getWorkbench, isGestureInProgress, isRollingBackInvalidEdits, isShapeOnScreen, name, redrawShape, reportNothingToUndoYet, setColor, setFilling, setStroke, setStrokeWidth, setup, snap, snap, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZOOM_TOOL_NAME

public static final java.lang.String ZOOM_TOOL_NAME
If the selection box has side length less than this value, the input will be considered to be a click rather than a box.

See Also:
Constant Field Values
Constructor Detail

ZoomTool

public ZoomTool()
Method Detail

getIcon

public javax.swing.Icon getIcon()
Specified by:
getIcon in interface CursorTool
Overrides:
getIcon in class AbstractZoomTool
Returns:
null to use a default icon

getName

public java.lang.String getName()
Description copied from interface: CursorTool
Returns a very brief description of this CursorTool.

Specified by:
getName in interface CursorTool
Overrides:
getName in class AbstractCursorTool
Returns:
the name of this CursorTool

getCursor

public java.awt.Cursor getCursor()
Specified by:
getCursor in interface CursorTool
Overrides:
getCursor in class AbstractZoomTool

gestureFinished

protected void gestureFinished()
                        throws java.awt.geom.NoninvertibleTransformException
Overrides:
gestureFinished in class AbstractZoomTool
Throws:
java.awt.geom.NoninvertibleTransformException

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class AbstractCursorTool

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Description copied from class: DragTool
Begins handling of the drag. Subclasses can prevent handling of the drag by overriding this method and not calling it.

Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class DragTool

isRightMouseButtonUsed

public boolean isRightMouseButtonUsed()
Specified by:
isRightMouseButtonUsed in interface CursorTool
Overrides:
isRightMouseButtonUsed in class AbstractCursorTool
Returns:
true if this CursorTool uses the right mouse button; false to allow the panel to show a popup-menu on right-clicks

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class DragTool

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class DragTool

activate

public void activate(LayerViewPanel layerViewPanel)
Specified by:
activate in interface CursorTool
Overrides:
activate in class AbstractCursorTool

deactivate

public void deactivate()
Specified by:
deactivate in interface CursorTool
Overrides:
deactivate in class AbstractCursorTool

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener
Overrides:
mouseEntered in class AbstractCursorTool

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener
Overrides:
mouseExited in class AbstractCursorTool

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class AbstractCursorTool