private class ImageDisplay.ImgDisplayMouseListener extends Object implements MouseListener, MouseWheelListener, MouseMotionListener
Modifier and Type | Field and Description |
---|---|
(package private) long |
lastTimeForMousePoint |
(package private) boolean |
mouseIsDragging |
(package private) Point |
mousePointInImg |
Modifier | Constructor and Description |
---|---|
private |
ImgDisplayMouseListener() |
Modifier and Type | Method and Description |
---|---|
private void |
checkPointInVisibleRect(Point p,
Rectangle visibleRect) |
void |
mouseClicked(MouseEvent e)
Center the display on the point that has been clicked
|
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(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 place
|
boolean mouseIsDragging
long lastTimeForMousePoint
Point mousePointInImg
private ImgDisplayMouseListener()
public void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved
in interface MouseWheelListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
private void checkPointInVisibleRect(Point p, Rectangle visibleRect)