PlotDataPointIterator
public abstract class PointIterator
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static PointIterator |
EMPTY |
PointIterator instance with no points.
|
Constructor | Description |
---|---|
PointIterator() |
Modifier and Type | Method | Description |
---|---|---|
java.util.BitSet |
getAllPoints() |
Returns a bit vector with bits set for every point index
visited by this iterator.
|
int |
getClosestPoint(java.awt.Point p,
int error) |
Returns the index of the closest plotted point to a given screen point.
|
java.util.BitSet |
getContainedPoints(java.awt.Shape shape) |
Returns a bit vector with bits set for every point index
which falls within a given shape on the screen.
|
int |
getIndex() |
Returns the most recently read point index.
|
int |
getX() |
Returns the most recently read screen X coordinate.
|
int |
getY() |
Returns the most recently read Y coordinate.
|
protected abstract int[] |
nextPoint() |
Returns a triple giving point index, screen X coordinate and
screen Y coordinate.
|
boolean |
readNextPoint() |
Loads the data for the next point if there is one.
|
public static PointIterator EMPTY
protected abstract int[] nextPoint()
int[]
array with different contents each time.
Invoked by readNextPoint()
.public int getIndex()
public int getX()
public int getY()
public boolean readNextPoint()
public java.util.BitSet getContainedPoints(java.awt.Shape shape)
shape
- shape defining inclusion criterionpublic java.util.BitSet getAllPoints()
public int getClosestPoint(java.awt.Point p, int error)
p
- screen point near which plotted points should be locatederror
- number of pixels in any direction which defines the
error box within which a point may be foundCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.