com.vividsolutions.jump.workbench.ui.cursortool
Class DelegatingTool

java.lang.Object
  extended by com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool
All Implemented Interfaces:
CursorTool, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener
Direct Known Subclasses:
QuasimodeTool

public abstract class DelegatingTool
extends java.lang.Object
implements CursorTool

Enables the behaviour of a CursorTool instance to be overridden.


Constructor Summary
DelegatingTool(CursorTool cursorTool)
           
 
Method Summary
 void activate(LayerViewPanel layerViewPanel)
           
 void cancelGesture()
          Notifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.
 void deactivate()
           
 java.awt.Cursor getCursor()
           
 CursorTool getDelegate()
           
 javax.swing.Icon getIcon()
           
 java.lang.String getName()
          Returns a very brief description of this CursorTool.
 boolean isGestureInProgress()
           
 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)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void setDelegate(CursorTool delegate)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingTool

public DelegatingTool(CursorTool cursorTool)
Method Detail

getDelegate

public CursorTool getDelegate()

setDelegate

public void setDelegate(CursorTool delegate)

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
Returns:
the name of this CursorTool

getIcon

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

isGestureInProgress

public boolean isGestureInProgress()
Specified by:
isGestureInProgress in interface CursorTool

cancelGesture

public void cancelGesture()
Description copied from interface: CursorTool
Notifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.

Specified by:
cancelGesture in interface CursorTool

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

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

activate

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

getCursor

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

deactivate

public void deactivate()
Specified by:
deactivate in interface CursorTool

mouseReleased

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

mouseEntered

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

mouseExited

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

mouseDragged

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

mouseMoved

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

isRightMouseButtonUsed

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