public class PointSelectionEvent extends EventObject
source
Constructor and Description |
---|
PointSelectionEvent(Object source,
Point point,
int isurf,
long[] closestRows)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long[] |
getClosestRows()
Returns an array of row indices, one for each plotted layer.
|
Point |
getPoint()
Returns the point indicated by the user.
|
int |
getSurfaceIndex()
Returns the index of the surface to which this event applies.
|
getSource, toString
public PointSelectionEvent(Object source, Point point, int isurf, long[] closestRows)
source
- event sourcepoint
- point indicated by the userisurf
- numeric label of surface to which this event appliesclosestRows
- array of dataset row index for each plotted layerpublic Point getPoint()
public int getSurfaceIndex()
public long[] getClosestRows()
PlotLayer
closest to the indicated graphics position.
If that layer contains no data point within a few pixels of the
given position, the corresponding value is -1.
For layers without data positions, the corresponding value is
always -1.
The close-enough threshold for a point to be included is
given by PlotUtil.NEAR_PIXELS
(4.0).
Note the event may represent no successful selections (all elements of the returned array equal to -1).
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.