Class DelegatingTool
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.cursortool.DelegatingTool
-
- All Implemented Interfaces:
CursorTool
,MouseListener
,MouseMotionListener
,EventListener
- Direct Known Subclasses:
QuasimodeTool
public abstract class DelegatingTool extends Object implements CursorTool
Enables the behaviour of a CursorTool instance to be overridden.
-
-
Constructor Summary
Constructors Constructor Description DelegatingTool(CursorTool cursorTool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(LayerViewPanel layerViewPanel)
void
cancelGesture()
Notifies the CursorTool that a party is requesting that the gesture currently in progress be aborted.void
deactivate()
Cursor
getCursor()
CursorTool
getDelegate()
Icon
getIcon()
String
getName()
Returns a very brief description of this CursorTool.boolean
isGestureInProgress()
boolean
isRightMouseButtonUsed()
void
mouseClicked(MouseEvent e)
void
mouseDragged(MouseEvent e)
void
mouseEntered(MouseEvent e)
void
mouseExited(MouseEvent e)
void
mouseMoved(MouseEvent e)
void
mousePressed(MouseEvent e)
void
mouseReleased(MouseEvent e)
void
setDelegate(CursorTool delegate)
-
-
-
Constructor Detail
-
DelegatingTool
public DelegatingTool(CursorTool cursorTool)
-
-
Method Detail
-
getDelegate
public CursorTool getDelegate()
-
setDelegate
public void setDelegate(CursorTool delegate)
-
getName
public String getName()
Description copied from interface:CursorTool
Returns a very brief description of this CursorTool.- Specified by:
getName
in interfaceCursorTool
- Returns:
- the name of this CursorTool
-
getIcon
public Icon getIcon()
- Specified by:
getIcon
in interfaceCursorTool
- Returns:
- null to use a default icon
-
isGestureInProgress
public boolean isGestureInProgress()
- Specified by:
isGestureInProgress
in interfaceCursorTool
-
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 interfaceCursorTool
-
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interfaceMouseListener
-
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interfaceMouseListener
-
activate
public void activate(LayerViewPanel layerViewPanel)
- Specified by:
activate
in interfaceCursorTool
-
getCursor
public Cursor getCursor()
- Specified by:
getCursor
in interfaceCursorTool
-
deactivate
public void deactivate()
- Specified by:
deactivate
in interfaceCursorTool
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interfaceMouseListener
-
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interfaceMouseListener
-
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interfaceMouseListener
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseMotionListener
-
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interfaceMouseMotionListener
-
isRightMouseButtonUsed
public boolean isRightMouseButtonUsed()
- Specified by:
isRightMouseButtonUsed
in interfaceCursorTool
- Returns:
- true if this CursorTool uses the right mouse button; false to allow the panel to show a popup-menu on right-clicks
-
-