Class ImageDisplay.ImgDisplayMouseListener
- java.lang.Object
-
- java.awt.event.MouseAdapter
-
- org.openstreetmap.josm.gui.layer.geoimage.ImageDisplay.ImgDisplayMouseListener
-
- All Implemented Interfaces:
MouseListener
,MouseMotionListener
,MouseWheelListener
,EventListener
- Enclosing class:
- ImageDisplay
private class ImageDisplay.ImgDisplayMouseListener extends MouseAdapter
-
-
Field Summary
Fields Modifier and Type Field Description private MouseEvent
lastMouseEvent
private Point
mousePointInImg
-
Constructor Summary
Constructors Modifier Constructor Description private
ImgDisplayMouseListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
isAtMaxZoom(Rectangle visibleRect)
void
mouseClicked(MouseEvent e)
Center the display on the point that has been clickedvoid
mouseDragged(MouseEvent e)
private boolean
mouseIsDragging(MouseEvent e)
private boolean
mouseIsZoomSelecting(MouseEvent e)
void
mousePressed(MouseEvent e)
Initialize the dragging, either with button 1 (simple dragging) or button 3 (selection of a picture part)void
mouseReleased(MouseEvent e)
void
mouseWheelMoved(MouseWheelEvent e)
Zoom in and out, trying to preserve the point of the image that was under the mouse cursor at the same placeprivate void
mouseWheelMovedImpl(int x, int y, int rotation, boolean refreshMousePointInImg)
-
Methods inherited from class java.awt.event.MouseAdapter
mouseEntered, mouseExited, mouseMoved
-
-
-
-
Field Detail
-
lastMouseEvent
private MouseEvent lastMouseEvent
-
mousePointInImg
private Point mousePointInImg
-
-
Constructor Detail
-
ImgDisplayMouseListener
private ImgDisplayMouseListener()
-
-
Method Detail
-
mouseIsDragging
private boolean mouseIsDragging(MouseEvent e)
-
mouseIsZoomSelecting
private boolean mouseIsZoomSelecting(MouseEvent e)
-
isAtMaxZoom
private boolean isAtMaxZoom(Rectangle visibleRect)
-
mouseWheelMovedImpl
private void mouseWheelMovedImpl(int x, int y, int rotation, boolean refreshMousePointInImg)
-
mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent e)
Zoom in and out, trying to preserve the point of the image that was under the mouse cursor at the same place- Specified by:
mouseWheelMoved
in interfaceMouseWheelListener
- Overrides:
mouseWheelMoved
in classMouseAdapter
-
mouseClicked
public void mouseClicked(MouseEvent e)
Center the display on the point that has been clicked- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classMouseAdapter
-
mousePressed
public void mousePressed(MouseEvent e)
Initialize the dragging, either with button 1 (simple dragging) or button 3 (selection of a picture part)- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
-
-