private class StreetsideImageDisplay.ImgDisplayMouseListener extends Object implements MouseListener, MouseWheelListener, MouseMotionListener
| Modifier and Type | Field and Description |
|---|---|
private long |
lastTimeForMousePoint |
private boolean |
mouseIsDragging |
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
|
private boolean mouseIsDragging
private long lastTimeForMousePoint
private Point mousePointInImg
private ImgDisplayMouseListener()
public void mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerprivate void checkPointInVisibleRect(Point p, Rectangle visibleRect)