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 ofZoomRegion
objects which defines the behaviour of this object.void
mouseDragged
(MouseEvent evt) void
mouseMoved
(MouseEvent evt) void
mousePressed
(MouseEvent evt) void
mouseReleased
(MouseEvent evt) void
setCursorComponent
(Component comp) Sest the component, if any, over which this object should modify the cursor over.void
setRegions
(List<ZoomRegion> regionList) Sets the list ofZoomRegion
objects which defines the behaviour of this object.Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mouseWheelMoved
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited
-
Constructor Details
-
Zoomer
public Zoomer()Constructor.
-
-
Method Details
-
getRegions
Returns the list ofZoomRegion
objects which defines the behaviour of this object.- Returns:
- zoom region list
-
setRegions
Sets the list ofZoomRegion
objects 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:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classMouseAdapter
-
mouseMoved
- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classMouseAdapter
-
mouseDragged
- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classMouseAdapter
-
mouseReleased
- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classMouseAdapter
-