public class ImgMouseListener extends MouseAdapter implements MouseMotionListener
Objects of this class must be registerd as both mouse listener and mouse motion listener.
While the dragging is taking place the cursor is changed to the MOVE_CURSOR type. The original cursor is restored when the mouse is released after the drag.
| Constructor and Description |
|---|
ImgMouseListener(ImgScrollPane isp)
Instantiate a new ImgMouseListener that will work on the specified
ImgScrollPane.
|
| Modifier and Type | Method and Description |
|---|---|
void |
mouseDragged(MouseEvent evt) |
void |
mouseMoved(MouseEvent evt) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
mouseClicked, mouseEntered, mouseExited, mouseWheelMovedpublic ImgMouseListener(ImgScrollPane isp)
isp - The image scroll pane on which the actions should operate.public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenermousePressed in class MouseAdapterpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenermouseReleased in class MouseAdapterpublic void mouseDragged(MouseEvent evt)
mouseDragged in interface MouseMotionListenermouseDragged in class MouseAdapterpublic void mouseMoved(MouseEvent evt)
mouseMoved in interface MouseMotionListenermouseMoved in class MouseAdapterCopyright © 2015. All rights reserved.