Package org.geotools.swing.event
Interface MapMouseEventDispatcher
-
- All Superinterfaces:
EventListener
,MouseListener
,MouseMotionListener
,MouseWheelListener
- All Known Implementing Classes:
DefaultMapMouseEventDispatcher
public interface MapMouseEventDispatcher extends MouseListener, MouseMotionListener, MouseWheelListener
Takes Java AWT mouse events received by a map pane and converts them toMapMouseEvents
which add world location data. The resulting events are then dispatched toMapMouseListeners
by the methods overriden from the AWT listener interfaces.- Since:
- 8.0
- Author:
- Michael Bedward
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addMouseListener(MapMouseListener listener)
Adds a listener for map pane mouse events.MapMouseEvent
convertEvent(MouseEvent ev)
Converts an incoming Java AWT mouse event to a MapMouseEvent.MapMouseEvent
convertEvent(MouseWheelEvent ev)
Converts an incoming Java AWT mouse wheel event to a MapMouseEvent.void
removeAllListeners()
Removes all listeners.boolean
removeMouseListener(MapMouseListener listener)
Removes the given listener.-
Methods inherited from interface MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
-
Methods inherited from interface MouseMotionListener
mouseDragged, mouseMoved
-
Methods inherited from interface MouseWheelListener
mouseWheelMoved
-
-
-
-
Method Detail
-
addMouseListener
boolean addMouseListener(MapMouseListener listener)
Adds a listener for map pane mouse events.- Parameters:
listener
- the new listener- Returns:
- true if successful; false otherwise
- Throws:
IllegalArgumentException
- if thelistener
isnull
-
removeMouseListener
boolean removeMouseListener(MapMouseListener listener)
Removes the given listener.- Parameters:
listener
- the listener to remove- Returns:
- true if successful; false otherwise
- Throws:
IllegalArgumentException
- if thelistener
isnull
-
removeAllListeners
void removeAllListeners()
Removes all listeners.
-
convertEvent
MapMouseEvent convertEvent(MouseEvent ev)
Converts an incoming Java AWT mouse event to a MapMouseEvent.- Parameters:
ev
- the input event
-
convertEvent
MapMouseEvent convertEvent(MouseWheelEvent ev)
Converts an incoming Java AWT mouse wheel event to a MapMouseEvent.- Parameters:
ev
- the input event
-
-