# Class ZoomRegion

java.lang.Object
uk.ac.starlink.topcat.plot.ZoomRegion

Direct Known Subclasses:
  `AxisZoomRegion, CentreZoomRegion, XYZoomRegion`

public abstract class ZoomRegion extends Object
Defines a region for use with a Zoomer object.

Since:
  28 Mar 2006
Author:
  Mark Taylor
See Also:
  - `Zoomer`

## Constructor Summary

Constructors
Constructor
Description
`ZoomRegion()`

## Method Summary

Modifier and Type
Method
Description
`abstract ZoomDrag`
`createDrag(Component comp, Point start)`
Returns a new ZoomDrag object appropriate for this region.
`Cursor`
`getCursor()`
Returns the custom cursor for use in the target region.
`Rectangle`
`getDisplay()`
Returns the display region.
`Rectangle`
`getTarget()`
Returns the target region.
`void`
`setCursor(Cursor cursor)`
Sets a custom cursor for use in the target region.
`void`
`setDisplay(Rectangle display)`
Sets the display region.
`void`
`setTarget(Rectangle target)`
Sets the target region.
`abstract void`
`zoomed(double[][] bounds)`
Callback which will be invoked when a zoom invoked on this region has been completed successfully.

### Methods inherited from class Object

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

## Constructor Details

### ZoomRegion

public ZoomRegion()

## Method Details

### setTarget

public void setTarget(Rectangle target)
Sets the target region. This is the region within which the mouse must be clicked and dragged in order to generate a zoom event.

Parameters:
  `target` - target region

### getTarget

public Rectangle getTarget()
Returns the target region. This is the region within which the mouse must be clicked and dragged in order to generate a zoom event.

Returns:
  target region

### setDisplay

public void setDisplay(Rectangle display)
Sets the display region. This is the region used to provide visual feedback to the user during a drag gesture.

Parameters:
  `display` - display region

### getDisplay

public Rectangle getDisplay()
Returns the display region. This is the region used to display visual feedback to the user during a drag gesture.

Returns:
  display region

### setCursor

public void setCursor(Cursor cursor)
Sets a custom cursor for use in the target region.

Parameters:
  `cursor` - custom cursor

### getCursor

public Cursor getCursor()
Returns the custom cursor for use in the target region.

Returns:
  custom cursor

### createDrag

public abstract ZoomDrag createDrag(Component comp, Point start)
Returns a new ZoomDrag object appropriate for this region.

Parameters:
  `comp` - component on which the drag is taking place
  `start` - start point for the drag
Returns:
  new drag object

### zoomed

public abstract void zoomed(double[][] bounds)
Callback which will be invoked when a zoom invoked on this region has been completed successfully. Elements of the parameter array are two-element arrays giving (lower, upper) bounds in one or more dimensions, according to the type of region. The units should normally be dimensionless: a range of (0,1) indicates the same range as is currently contained by the display region. Bounds may be larger or smaller than the (1,0) interval.

Parameters:
  `bounds` - array of (lower, upper) zoom bounds