# 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`

public class Zoomer extends MouseInputAdapter
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
Constructor
Description
`Zoomer()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`List<ZoomRegion>`
`getRegions()`
Returns the list of `ZoomRegion` 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 of `ZoomRegion` objects which defines the behaviour of this object.

### Methods inherited from class MouseAdapter

`mouseClicked, mouseEntered, mouseExited, mouseWheelMoved`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface MouseListener

`mouseClicked, mouseEntered, mouseExited`

## Constructor Details

### Zoomer

public Zoomer()
Constructor.

## Method Details

### getRegions

public List<ZoomRegion> getRegions()
Returns the list of `ZoomRegion` objects which defines the behaviour of this object.

Returns:
  zoom region list

### setRegions

public void setRegions(List<ZoomRegion> regionList)
Sets the list of `ZoomRegion` objects which defines the behaviour of this object.

Parameters:
  `regionList` - list of zoom regions

### setCursorComponent

public void setCursorComponent(Component comp)
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

public void mousePressed(MouseEvent evt)

Specified by:
  `mousePressed` in interface `MouseListener`
Overrides:
  `mousePressed` in class `MouseAdapter`

### mouseMoved

public void mouseMoved(MouseEvent evt)

Specified by:
  `mouseMoved` in interface `MouseMotionListener`
Overrides:
  `mouseMoved` in class `MouseAdapter`

### mouseDragged

public void mouseDragged(MouseEvent evt)

Specified by:
  `mouseDragged` in interface `MouseMotionListener`
Overrides:
  `mouseDragged` in class `MouseAdapter`

### mouseReleased

public void mouseReleased(MouseEvent evt)

Specified by:
  `mouseReleased` in interface `MouseListener`
Overrides:
  `mouseReleased` in class `MouseAdapter`