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.ZoomTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

public class ZoomTool
extends DragTool


Nested Class Summary
 
Nested classes/interfaces inherited from class com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
AbstractCursorTool.Listener
 
Field Summary
 
Fields inherited from class com.vividsolutions.jump.workbench.ui.cursortool.DragTool
DEFAULT_VIEW_CLICK_BUFFER
 
Constructor Summary
ZoomTool()
           
 
Method Summary
 void activate(LayerViewPanel layerViewPanel)
           
 void deactivate()
           
 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.cursortool.AbstractCursorTool
add, allowSnapping, cancelGesture, createCursor, createCursor, createStandardSnappingPolicies, getColor, getSnapManager, getWorkbench, isGestureInProgress, isShapeOnScreen, name, setColor, toString, workbench, workbenchFrame
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZoomTool

public ZoomTool()
Method Detail

getIcon

public javax.swing.Icon getIcon()
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 AbstractCursorTool

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