Class DefaultMapMouseEventDispatcher

  • All Implemented Interfaces:
    MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MapMouseEventDispatcher

    public class DefaultMapMouseEventDispatcher
    extends Object
    implements MapMouseEventDispatcher
    Receives mouse events from a MapPane instance, converts them to MapPaneMouseEvents, and sends these to the active map pane tools.
    Since:
    8.0
    Author:
    Michael Bedward
    • Constructor Detail

      • DefaultMapMouseEventDispatcher

        public DefaultMapMouseEventDispatcher​(MapPane mapPane)
        Creates a new manager instance to work with the specified map pane.
        Parameters:
        mapPane - the map pane
    • Method Detail

      • addMouseListener

        public boolean addMouseListener​(MapMouseListener listener)
        Adds a listener for map pane mouse events.
        Specified by:
        addMouseListener in interface MapMouseEventDispatcher
        Parameters:
        listener - the new listener
        Returns:
        true if successful; false otherwise
      • mouseClicked

        public void mouseClicked​(MouseEvent ev)
        Receives a mouse clicked event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseClicked in interface MouseListener
        Parameters:
        ev - the input event
      • mousePressed

        public void mousePressed​(MouseEvent ev)
        Receives a mouse pressed event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mousePressed in interface MouseListener
        Parameters:
        ev - the input event
      • mouseReleased

        public void mouseReleased​(MouseEvent ev)
        Receives a mouse released event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseReleased in interface MouseListener
        Parameters:
        ev - the input event
      • mouseEntered

        public void mouseEntered​(MouseEvent ev)
        Receives a mouse entered event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseEntered in interface MouseListener
        Parameters:
        ev - the input event
      • mouseExited

        public void mouseExited​(MouseEvent ev)
        Receives a mouse exited event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseExited in interface MouseListener
        Parameters:
        ev - the input event
      • mouseDragged

        public void mouseDragged​(MouseEvent ev)
        Receives a mouse dragged event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseDragged in interface MouseMotionListener
        Parameters:
        ev - the input event
      • mouseMoved

        public void mouseMoved​(MouseEvent ev)
        Receives a mouse moved event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseMoved in interface MouseMotionListener
        Parameters:
        ev - the input event
      • mouseWheelMoved

        public void mouseWheelMoved​(MouseWheelEvent ev)
        Receives a mouse wheel event and sends a derived MapMouseEvent to listeners.
        Specified by:
        mouseWheelMoved in interface MouseWheelListener
        Parameters:
        ev - the input event