Class CanvasMapEditorMouseListener

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

    public final class CanvasMapEditorMouseListener
    extends AbstractCanvasListener
    implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener
    Listens to the mouse being moved at the level of the Canvas.
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • endPoint

        private java.awt.Point endPoint
      • startPoint

        private java.awt.Point startPoint
    • Constructor Detail

      • CanvasMapEditorMouseListener

        public CanvasMapEditorMouseListener​(FreeColClient freeColClient)
        The constructor to use.
        Parameters:
        freeColClient - The enclosing FreeColClient.
    • Method Detail

      • drawBox

        private void drawBox​(javax.swing.JComponent component,
                             java.awt.Point startPoint,
                             java.awt.Point endPoint)
        Draw a box on screen.
        Parameters:
        component - The JComponent to draw on.
        startPoint - The starting Point.
        endPoint - The end Point.
      • mouseClicked

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

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • 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