Package uk.ac.starlink.topcat.plot
Class ZoomRegion
java.lang.Object
uk.ac.starlink.topcat.plot.ZoomRegion
- Direct Known Subclasses:
AxisZoomRegion
,CentreZoomRegion
,XYZoomRegion
Defines a region for use with a Zoomer object.
- Since:
- 28 Mar 2006
- Author:
- Mark Taylor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ZoomDrag
createDrag
(Component comp, Point start) Returns a new ZoomDrag object appropriate for this region.Returns the custom cursor for use in the target region.Returns the display region.Returns the target region.void
Sets a custom cursor for use in the target region.void
setDisplay
(Rectangle display) Sets the display region.void
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.
-
Constructor Details
-
ZoomRegion
public ZoomRegion()
-
-
Method Details
-
setTarget
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
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
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
Returns the display region. This is the region used to display visual feedback to the user during a drag gesture.- Returns:
- display region
-
setCursor
Sets a custom cursor for use in the target region.- Parameters:
cursor
- custom cursor
-
getCursor
Returns the custom cursor for use in the target region.- Returns:
- custom cursor
-
createDrag
Returns a new ZoomDrag object appropriate for this region.- Parameters:
comp
- component on which the drag is taking placestart
- 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
-