ucar.jpeg.jj2000.disp
Class ImgMouseListener
java.lang.Object
java.awt.event.MouseAdapter
ucar.jpeg.jj2000.disp.ImgMouseListener
- All Implemented Interfaces:
- MouseListener, MouseMotionListener, MouseWheelListener, EventListener
public class ImgMouseListener
- extends MouseAdapter
- implements MouseMotionListener
This class handles the dragging of an image displayed in an
ImgScrollPane. When the mouse is dragged the image scrolls accordingly.
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImgMouseListener
public ImgMouseListener(ImgScrollPane isp)
- Instantiate a new ImgMouseListener that will work on the specified
ImgScrollPane.
- Parameters:
isp - The image scroll pane on which the actions should operate.
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed in interface MouseListener- Overrides:
mousePressed in class MouseAdapter
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased in interface MouseListener- Overrides:
mouseReleased in class MouseAdapter
mouseDragged
public void mouseDragged(MouseEvent evt)
- Specified by:
mouseDragged in interface MouseMotionListener- Overrides:
mouseDragged in class MouseAdapter
mouseMoved
public void mouseMoved(MouseEvent evt)
- Specified by:
mouseMoved in interface MouseMotionListener- Overrides:
mouseMoved in class MouseAdapter
Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.