Package uk.ac.starlink.topcat.plot
Class Zoomer
java.lang.Object
java.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
uk.ac.starlink.topcat.plot.Zoomer
- All Implemented Interfaces:
MouseListener,MouseMotionListener,MouseWheelListener,EventListener,MouseInputListener
Mouse listener which can manufacture zoom requests on the basis of
mouse gestures. The zones over which mouse gestures are gathered
from and over which graphical feedback is given is defined by a list
of
ZoomRegion objects held by instances of this class.
To use an instance of this class, you must install it as both a
MouseListener and a
MouseMotionListener on the relevant component.
- Since:
- 28 Mar 2006
- Author:
- Mark Taylor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the list ofZoomRegionobjects which defines the behaviour of this object.voidmouseDragged(MouseEvent evt) voidmouseMoved(MouseEvent evt) voidmousePressed(MouseEvent evt) voidmouseReleased(MouseEvent evt) voidsetCursorComponent(Component comp) Sest the component, if any, over which this object should modify the cursor over.voidsetRegions(List<ZoomRegion> regionList) Sets the list ofZoomRegionobjects which defines the behaviour of this object.Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMovedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited
-
Constructor Details
-
Zoomer
public Zoomer()Constructor.
-
-
Method Details
-
getRegions
Returns the list ofZoomRegionobjects which defines the behaviour of this object.- Returns:
- zoom region list
-
setRegions
Sets the list ofZoomRegionobjects which defines the behaviour of this object.- Parameters:
regionList- list of zoom regions
-
setCursorComponent
Sest the component, if any, over which this object should modify the cursor over. The cursor will be altered to indicate when the mouse is in an active zoom target region.- Parameters:
comp- component over which the cursor can be changed
-
mousePressed
- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classMouseAdapter
-
mouseMoved
- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classMouseAdapter
-
mouseDragged
- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classMouseAdapter
-